Hai un account facebook e/o un account linkedin?
Visita e interagisci con le pagine:
http:// l a b . m e d i a s e r v i c e . n e t / f b /
http:// l a b . m e d i a s e r v i c e . n e t / i n /
Il contenuto delle pagine e i dati registrati saranno utilizzati solo per
questa presentazione e al termine di essa verranno cancellati.
Milano, 19 dicembre 2014
Aspetti meno noti e/o sconosciuti dei
social network - quello che sappiamo di sapere,
non sappiamo di non sapere e sappiamo di non
sapere sul mondo social network (e non solo)
© 2014 - @ Mediaservice.net
AIEA 2014
Maurizio Agazzini Senior Security Advisor @ Mediaservice.net
• CISSP CSSLP OPST
• + 10 anni di Penetration Test
(IP, Web Application, Mobile, RFID, smartcard, VoIP, …)
• Reverse engineering
• Training
Chi sono?
© 2014 - @ Mediaservice.net
AIEA 2014
E sui social?
© 2014 - @ Mediaservice.net
AIEA 2014
Reports that say that something hasn't happened are
always interesting to me, because as we know, there are
known knowns; there are things we know that we know.
There are known unknowns; that is to say, there are
things that we now know we don't know.
But there are also unknown unknowns; there are things
we do not know we don't know.
Donald Rumsfeld
(United States Secretary of Defense 2001-2006)
Agenda
”
“
© 2014 - @ Mediaservice.net
AIEA 2014
Problematiche note e meno note
• Privacy policy
• Le applicazioni mobile
• I social plugin
Cosa si può ottenere dai social
• Facebook Single Sign-On
• Facebook Like Plugin
• Linkedin "Who's Viewed Your Profile"
Come proteggersi e cosa non sappiamo
Agenda
quello che sappiamo di
sapere e/o di non sapere
quello che non sappiamo
di sapere
quello che non sappiamo
di non sapere
Problematiche note e meno note
© 2014 - @ Mediaservice.net
AIEA 2014
Problematiche note e meno note
• Privacy policy
• Le applicazioni mobile
• I social plugin
Cosa si può ottenere dai social
• Facebook Single Sign-On
• Facebook Like Plugin
• Linkedin "Who's Viewed Your Profile"
Come proteggersi e cosa non sappiamo
Agenda
© 2014 - @ Mediaservice.net
AIEA 2014
● Nome e cognome
● Foto
● Informazioni anagrafiche
e non solo (istruzione,
lavoro, famiglia, …)
● Informazioni di contatto
● Location geografiche (dove sono, dove vivo,
dove sono nato, …)
● La mia rete di amicizie
● Informazioni sui mie gusti (libri, film, musica preferita)
● Le mie chat e conversazioni
● Informazioni sulle mie condivisioni e sui miei like
● Le mie abitudini di navigazione
Quali informazioni? (utente)
© 2014 - @ Mediaservice.net
AIEA 2014
● Informazioni aziendali (sedi, contatti, …)
● Informazioni sui componenti,
la struttura e l’organigramma
di un’organizzazione
● Informazioni sulle carriere
e i movimenti interni
● Rete di collegamenti
● Comunicazioni pubbliche con
i clienti (ad esempio bacheche
pubbliche su twitter, facebook, …)
Quali informazioni? (corporate)
© 2014 - @ Mediaservice.net
AIEA 2014
Minacce / problematiche note
● Profilazione utenti
● Social Engineering
● Phishing (Whaling)
● Sostituzione / furto di identità e frodi
● Stalking
● Geolocalizzazione
● Malware (trojan, worms, rootkits, …)
● Spam
● Perdita di dati riservati e di proprietà intellettuale
● Danni alla reputazione
● Danni alla privacy
● Perdita del controllo dei canali social
© 2014 - @ Mediaservice.net
AIEA 2014
http://www.trendmicro.co.uk/infographics/geography-of-
social-media-threats/
Minacce / problematiche note
http://www.upgrademag.com/web/free-security-protection-on-linkedin-safety-center/
© 2014 - @ Mediaservice.net
AIEA 2014
● Informazioni ricevute da Facebook e relative
modalità di utilizzo
● Condivisione e possibilità di trovarti su
● Altri siti Web e applicazioni
● Pubblicità e contenuti di Facebook
● Cookie, pixel e altre tecnologie simili
Le policy privacy
https://facebook.com/
about/privacy/
© 2014 - @ Mediaservice.net
AIEA 2014
● Registrazione
● Informazioni relative al profilo
● Rubrica indirizzi, Contatti di LinkedIn e altri
servizi che si sincronizzano con LinkedIn
● Servizio clienti
● Utilizzo del sito LinkedIn e delle applicazioni
● Utilizzo di servizi di terze parti e visita di
siti di terze parti
● Pubblicità e Web beacon
● Cookie
● File di log, indirizzi IP e informazioni
relative al Suo computer e dispositivo
mobile
● Altri
Le policy privacy
https://www.linkedin.com/
legal/privacy-policy
© 2014 - @ Mediaservice.net
AIEA 2014
● Per garantire un’usabilità maggiore su mobile sono state create
apposite applicazioni
● Praticamente identiche alla versione web per mobile,
ma hanno accesso a molti più dati
● Le informazioni mandate dal nostro browser: Mozilla/5.0 (Linux;
Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/33.0.1750.136 Mobile
Safari/537.36
Le applicazioni mobile
© 2014 - @ Mediaservice.net
AIEA 2014
Le applicazioni mobile (i dati inviati a terzi) Data Type Description
App ID The randomly generated Crittercism ID identifying an app
App Version The version of the app
Battery Level Percentage of battery life left on the device
Carrier Wireless carrier
Disk Space Free The number of bytes of free disk space
Disk Space Total The total number of bytes of total capacity of disk space
DPI Dots per inch resolution on the device
Locale The language/country set on the device
Low Memory Describes whether the app is in a low memory state
Memory Usage The number of bytes of memory used by the app
Mobile Network Status of the cellular internet network
Model The make and model of the device
Orientation The direction in which the end-user was holding the device
SD Space Free The number of bytes of free space on the Secure Digital memory card
SD Space Total The number of bytes of total capacity on the SD memory card
System Type of operating system (i.e. Android, iOS, Windows Phone 8)
Wifi Status of wireless network connectivity
xDPI Dots per inch in the horizontal dimension
yDPI Dots per inch in the vertical dimension
Hashed Device ID Randomly generated string used as an internal Crittercism identifier for a user
Library Version The version of the Crittercism Agent (SDK)
© 2014 - @ Mediaservice.net
AIEA 2014
plist={"applicationVersion":"3.3.1","nativeTimings":[ {"start":1394897213920,"timingValue":0,"timingName":"linkedin_android_app_launch_activity_time","cpuTime":1246}],"osVersion":"4.4.2","httpMetrics":[],"deviceManufacturer":"LGE","deviceID":"f4e56771431d218b","applicationName":"LinkedIn","deviceModel":"google","connectionType":"WIFI","carrierName":"I TIM"}
plist={"fpsMetrics":[],"applicationName":"LinkedIn","sessionID":"3753385906","deviceID":"05DA85B1-E7AA-3CD3-2312-7E0B91387364","connectionType":"","osVersion":"6.1.3","appVersion":"7.1.1","osName":"iPhone OS","httpMetrics":[],"nativeTimings":[{"timingPageKey":"","timingValue":36,"timingName":"linkedin_core_data_query_size"}],"carrierName":"TIM","deviceModel":"iPhone3,1"}
Le applicazioni mobile (i dati inviati a LinkedIn)
© 2014 - @ Mediaservice.net
AIEA 2014
● Possibilità per gli utenti di un sito
di condividere le loro esperienze/azioni
compiute sul sito stesso direttamente
con i loro amici/follower
● Importante canale di marketing e di seo
● Sempre più diffusi su tutti i siti più
importanti
I social plugins… cosa sono?
© 2014 - @ Mediaservice.net
AIEA 2014
● Facebook social plugins sono i più diffusi (https://developers.facebook.com/docs/plugins/)
● Tutte le piattaforme social hanno i loro social plugin
I social plugins… la diffusione
© 2014 - @ Mediaservice.net
AIEA 2014
Il "referer"
© 2014 - @ Mediaservice.net
AIEA 2014
Attraverso queste informazioni i social network possono:
● Sapere cosa visitiamo e quando
(anche senza interazione con il plugin)
● Con interazione ottenere le informazioni
sui like o i commenti che lasciamo
● Quanto stiamo su quella pagina
(ad esempio tenendo conto del tempo di cambio pagina)
● Da dove le visitiamo
(indirizzo IP, ufficio, …)
E se non siamo autenticati?
Il "referer" - Cosa condividiamo al social plugin?
© 2014 - @ Mediaservice.net
AIEA 2014
E se non siamo autenticati?
Se utente non li cancella o non naviga in modalità anonima posso
usare i cookies (o similari)
http://samy.pl/evercookie/
Standard HTTP Cookies
Local Shared Objects (Flash Cookies)
Silverlight Isolated Storage
force-cached PNGs using HTML5 Canvas tag to read pixels (cookies)
Storing cookies in Web History
Storing cookies in HTTP ETags
Storing cookies in Web cache
window.name caching
Internet Explorer userData storage
HTML5 Session Storage
HTML5 Local Storage
HTML5 Global Storage
HTML5 Database Storage via SQLite
© 2014 - @ Mediaservice.net
AIEA 2014
Utilizziamo le informazioni inviate dal browser dell’utente per
identificarlo univocamente (in parte crossbrowser):
https://panopticlick.eff.org | http://fingerprint.pet-portal.eu | http://ip-check.info
Browser Fingerprinting
Locality en-GB
OS Windows 7 [it, Sat Mar 15
2014 12:00:50 AM]
Screen
resolution 1366x768 (72 DPI)
Timezone -60
User Agent Mozilla/5.0 (Windows NT
6.1; WOW64; rv:27.0)
Headers gzip, deflate en-gb,en;q=0.5
Plugins 345 plugins
Fonts 246 fonts
MimeTypes 72 types
Your browser fingerprint appears
to be unique among the
3,963,188 tested so far.
Currently, we estimate that your
browser has a fingerprint that
conveys at least 21.92 bits of
identifying information.
© 2014 - @ Mediaservice.net
AIEA 2014
Diffusione dei social plugin
* **
1 google.it x
2 facebook.com x
3 google.com x
4 youtube.com x x s.ytimg.com, gstatic.com, 2mdn.net, ytimg.com, googlevideo.com
5 yahoo.com x x x x yimg.com, adinterax.com, rubiconproject.com, scorecardresearch.com, sitestat.com
6 wikipedia.org
7 libero.it x x x x virgilio.it, alice.it, matrixspa.it, imrworldwide.com, scorecardresearch.com, criteo.com, plug.it,
weborama.fr, adrcdn.com, neodatagroup.com, adrcdn.com, iol.it, smartadserver.com
8 repubblica.it x x x repstatic.it, kataweb.it, imrworldwide.com, repstatic.it, 247realmedia.com, 4wnet.com,
webtrekk.net, 2mdn.net, gigya.com, serving-sys.com, weborama.fr, smartadserver.com,
indoona.com, serving-sys.com, performgroup.com, adtech.de, tinyurl.com
9 ebay.it x x x x
ebaystatic.com, ebayrtm.com, bluekai.com, bluelithium.com, mathtag.com, adextent.com,
mediaplex.com, rubiconproject.com, mathtag.com, 254a.com, dotomi.com, exelator.com,
nexac.com, adsafeprotected.com, amazonaws.com, abmr.net, serving-sys.com, heias.com,
360yield.com, media6degrees.com, pubmatic.com, zenoviaexchange.com, openx.net,
mathtag.com, switchads.com, abmr.net, korrelate.net, openx.net, creative-serving.com
10 adcasch.com
11 corriere.it x x x
corriereobjects.it, rcs.it, rcsadv.it, rcsmetrics.it, rcsquotidiani-lh.akamaihd.net, mookie1.com,
2mdn.net, cloudfront.net, nspmotion.com, neodatagroup.com, edgesuite.net,
imrworldwide.com, nspmotion.com, edgesuite.net, 247realmedia.com, 4wnet.com,
visualrevenue.com, smartcampaign.it, www.telecomitalia.it
12 amazon.it x x amazon.com, images-amazon.com, amazon-adsystem.com, cloudfront.net, openx.net,
contextweb.com, ads.yahoo.com, ib.adnxs.com, rubiconproject.com, pubmatic.com,
burstnet.com, 2mdn.net, adnxs.com
13 live.com
14 akamaihd.net
15 linkedin.com x x slidesharecdn.com, licdn.com, imrworldwide.com, quantserve.com, scorecardresearch.com
* Classifica Alexa http://www.alexa.com/topsites/countries/IT ** dati non esaustivi, ricerca di inclusione di domini esterni nelle pagine principali
© 2014 - @ Mediaservice.net
AIEA 2014
Storyline di una navigazione tipo
© 2014 - @ Mediaservice.net
AIEA 2014
Non solo facebook e linkedin
© 2014 - @ Mediaservice.net
AIEA 2014
Fonte: http://www.addthis.com/
Non solo facebook e linkedin
Cosa possiamo ottenere dai social
© 2014 - @ Mediaservice.net
AIEA 2014
Problematiche note e meno note
• Privacy policy
• Le applicazioni mobile
• I social plugin
Cosa si può ottenere dai social
• Facebook Single Sign-On
• Facebook Like Plugin
• Linkedin "Who's Viewed Your Profile"
Come proteggersi e cosa non sappiamo
Agenda
© 2014 - @ Mediaservice.net
AIEA 2014
l a b . m e d i a s e r v i c e . n e t / f b l a b . m e d i a s e r v i c e . n e t / i n
Demo e proof of concept
© 2014 - @ Mediaservice.net
AIEA 2014
Hai un account facebook e/o un account linkedin?
Visita e interagisci con le pagine:
http:// l a b . m e d i a s e r v i c e . n e t / f b /
http:// l a b . m e d i a s e r v i c e . n e t / i n /
Il contenuto delle pagine e i dati registrati saranno utilizzati solo per
questa presentazione e al termine di essa verranno cancellati.
Interagisci con la presentazione
© 2014 - @ Mediaservice.net
AIEA 2014
Informazioni rimangono solo nel social?
© 2014 - @ Mediaservice.net
AIEA 2014
Obiettivo: invertire il flusso
Capire come sfruttare i social per ottenere informazioni sui nostri visitatori
Cosa possiamo ottenere da un social?
© 2014 - @ Mediaservice.net
AIEA 2014
Un modo semplice, chiediamo ai nostri utenti di identificarsi con il
SSO (single sign-on) messo a disposizione da Facebook
FB.login(function(response) {}, {scope: '...'});};
Come riconoscere i visitatori? Facebook SSO
In rosso lo spazio per
richiedere i permessi
sulle informazioni che
chiederemo all’utente di
condividere con noi.
(del tutto simile al sistema di
accettazione permessi del
mondo mobile)
© 2014 - @ Mediaservice.net
AIEA 2014
Quali informazioni possiamo ottenere?
● Basic Info (Default) permissions (id, name, first_name, last_name, link,
username, gender, locale, age_range, Other public information)
● Email permissions (email)
● Extended profile properties (user_about_me, user_activities, user_birthday,
user_checkins, user_education_history, user_events, user_groups, user_hometown,
user_interests, user_likes, user_location, user_notes, user_photos, user_questions,
user_relationships, user_relationship_details, user_religion_politics, user_status,
user_subscriptions, user_videos, user_website, user_work_history)
● Extended permissions Read / Publish (read_friendlists, read_insights, read_mailbox, read_requests, read_stream, xmpp_login,
user_online_presence, friends_online_presence)
(ads_management, create_event, manage_friendlists, manage_notifications, publish_actions,
publish_stream, rsvp_event)
● Open Graph permissions (publish_actions, user_actions.music, user_actions.news,
user_actions.video, user_actions:APP_NAMESPACE, user_games_activity)
● Page permissions (manage_pages, read_page_mailboxes)
https://developers.facebook.com/docs/facebook-login/permissions
Facebook SSO - Permission
© 2014 - @ Mediaservice.net
AIEA 2014
FB.login(function(response) { }, {scope: ''}); };
FB.login(function(response) { }, {scope: 'email, user_about_me, user_activities, user_birthday, user_checkins, user_education_history, user_events, user_groups, user_hometown, user_interests, user_likes, user_location, user_notes, user_photos, user_questions, user_relationships, user_relationship_details, user_religion_politics, user_status, user_subscriptions, user_videos, user_website, user_work_history'}); };
Facebook SSO - Esempi
© 2014 - @ Mediaservice.net
AIEA 2014
FB.login(function(response) { }, {scope: 'email,user_about_me, user_activities, user_birthday, user_checkins, user_education_history, user_events, user_groups, user_hometown, user_interests, user_likes, user_location, user_notes, user_photos, user_questions, user_relationships, user_relationship_details, user_religion_politics, user_status, user_subscriptions, user_videos, user_website, user_work_history, read_friendlists, read_insights, read_mailbox, read_requests, read_stream, xmpp_login, user_online_presence, friends_online_presence,ads_management, create_event, manage_friendlists, manage_notifications, publish_actions, publish_stream, rsvp_event, publish_actions, user_actions.music, user_actions.news, user_actions.video, user_games_activity, manage_pages, read_page_mailboxes'}); };
Facebook SSO - Esempi
© 2014 - @ Mediaservice.net
AIEA 2014
2 differenti tipologie di "like"
● Like Button A single click on the Like button will 'like' pieces of content
on the web and share them on Facebook.
(https://developers.facebook.com/docs/plugins/like-button)
● Like Box The Like Box is a special version of the Like Button
designed only for Facebook Pages. It allows admins
to promote their Pages and embed a simple feed
of content from a Page into other sites.
(https://developers.facebook.com/docs/plugins/like-box-for-pages )
Facebook Like
© 2014 - @ Mediaservice.net
AIEA 2014
1. Catturo l’identificativo del
browser utente (fingerprinting)
2. Quando utente clicca sul like
catturo l’evento attraverso la
funzionalità "edge.create"
3. In background visito la pagina
facebook e catturo l’id dell’utente
4. Correlo l’id facebook con i dati
di sessione e il fingerprinting
Facebook Like - Proof of concept
FB.Event.subscribe('edge.create', function(response) { ... } );
© 2014 - @ Mediaservice.net
AIEA 2014
● Possibilità di inserire contenuti statici su Facebook
(HTML, JS, …)
Inserisco contenuti attraverso delle applicazioni ad hoc, per
questa demo: http://woobox.com/statichtml
● Proof of concept
Punto un iframe verso una mia pagina web e registro
timestamp e browser fingerprinting dell’utente che sta
visitando la mia pagina facebook
Come vedere chi visita il mio profilo fb?
© 2014 - @ Mediaservice.net
AIEA 2014
https://www.facebook.com/pages/Demo-Like/1469530179928521?id=1469530179928521&sk=app_190322544333196
Facebook Static HTML
© 2014 - @ Mediaservice.net
AIEA 2014
● Trovare una funzionalità che ci offra delle
informazioni sugli altri utenti e non su di noi che
venga aggiornata ad un determinato evento
● Possiamo utilizzare questi dati assieme ad altri già
in nostro possesso o che possederemo in futuro?
● Capire se ci sono delle limitazioni ed in caso
eluderle.
Linkedin "Who's Viewed Your Profile"
© 2014 - @ Mediaservice.net
AIEA 2014
Linkedin "Who's Viewed Your Profile"
Come proteggersi e cosa non sappiamo
© 2014 - @ Mediaservice.net
AIEA 2014
Problematiche note e meno note
• Privacy policy
• Le applicazioni mobile
• I social plugin
Cosa si può ottenere dai social
• Facebook Single Sign-On
• Facebook Like Plugin
• Linkedin "Who's Viewed Your Profile"
Come proteggersi e cosa non sappiamo
Agenda
© 2014 - @ Mediaservice.net
AIEA 2014
● Same-origin policy
● X-frame-options
● Tab protection
● Protezione da siti malevoli, Controllo certificati,
Protezione Cache, Anti XSS, …
Da che cosa ci proteggono i browser?
httpː//www.example.com/dir/page2.html
httpː//www.example.com/dir2/other.html
httpː//username:[email protected]/page2.html
httpː//www.example.com:81/dir/other.html
https://www.example.com/dir/other.html
http://en.example.com/dir/other.html
http://example.com/dir/other.html
http://v2.www.example.com/dir/other.html
httpː//www.example.com:80/dir/other.html
© 2014 - @ Mediaservice.net
AIEA 2014
● Ghostery (https://www.ghostery.com/)
See which companies are tracking you. Block over 1900 trackers.
● NoScript (http://noscript.net/)
Allows JavaScript, Java, Flash and other plugins to be executed only by
trusted web sites of your choice
● Adblock Plus (https://adblockplus.org/)
Blocks banners, pop-ups and video ads - even on Facebook and YouTube
● Lightbeam (https://addons.mozilla.org/it/firefox/addon/lightbeam/)
● FireGloves (http://fingerprint.pet-portal.eu/?menu=6)
Firefox plugin to impede fingerprinting-based tracking
● Disconnect.me (https://disconnect.me/)
Disconnect lets you visualize and block the invisible sites that track your
search and browsing history.
● Collusion (http://collusion.toolness.org/)
● …
Strumenti per la difesa
266 chiamate
180 immagini | 36 js | 9 html | 6 flash | 6 css | 2 xml | 27 other
142 chiamate
135 immagini | 0 js | 1 html | 0 flash | 0 xml | 5 css | 0 other
290 chiamate
203 immagini | 41 js | 15 html | 8 flash | 7 xml | 5 css | 11 other
203 chiamate
178 immagini | 0 js | 2 html | 0 flash | 0 xml | 3 css | 0 other
91 chiamate
61 immagini | 18 js | 6 html | 4 flash | 0 css | 2xml | 6 other
24 chiamate
23 immagini | 0 js | 1 html | 0 flash | 0 xml | 0 css | 0 other
© 2014 - @ Mediaservice.net
AIEA 2014
Questi accorgimenti potrebbero non bastare se pensiamo a:
• Nuovi servizi di tracciamento non ancora mappati
• Fingerprinting
• Studio delle abitudini di navigazione / interazione con gui
• …
Attenzione
© 2014 - @ Mediaservice.net
AIEA 2014
● Quali sono gli algoritmi? E’ possibile reversarli? (Teoria del mondo piccolo - Sei gradi di separazione)
● Il Numero di Erdős-Bacon (la somma del suo numero di Erdős e del suo numero di Bacon
http://it.wikipedia.org/wiki/Numero_di_Erdős-Bacon)
● Ricerca del Prof. Sebastiano Vigna (UNIMI) ha calcolato i gradi di separazione tra
tutte le coppie di individui su Facebook. Il 92% delle coppie è separato da non più
di 4 gradi (http://www.unimi.it/ateneo/comunicati/52860.htm)
Friend suggestion
© 2014 - @ Mediaservice.net
AIEA 2014
• Possiamo trovare i collegamenti fra le persone
senza necessità di un effettivo link sui social? (pensiamo a un sistema di anti frode di una assicurazione)
• How does the "People You May Know" feature work? (http://help.linkedin.com/app/answers/detail/a_id/29/from_auth/true)
E’ vero quanto ci dicono o ci sono altre tecniche?
• GeoLocation su mobile (2 o + persone negli stessi luoghi)
• Comportamenti condivisi
• Rubrica condivisa
• Altro?
Scenari?
© 2014 - @ Mediaservice.net
AIEA 2014
La rubrica condivisa
© 2014 - @ Mediaservice.net
AIEA 2014
Nuove features… altro?
Grazie per l’attenzione, domande?