Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.

Slides:



Advertisements
Similar presentations
Nick Feamster CS 6262 Spring 2009
Advertisements

Protecting Browser State from Web Privacy Attacks Collin Jackson, Andrew Bortz, Dan Boneh, John Mitchell Stanford University.
Enabling Secure Internet Access with ISA Server
What is code injection? Code injection is the exploitation of a computer bug that is caused by processing invalid data. Code injection can be used by.
The OWASP Foundation Web Application Security Host Apps Firewall Host Apps Database Host Web serverApp serverDB server Securing the.
Unit 11 Using the Internet & Browsing the Web.  Define the Internet and the Web  Set up & troubleshoot an Internet connection  Categorize webs sites.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike.
Talking to Yourself for Fun and Profit Lin-Shung Huang ∗, Eric Y. Chen ∗, Adam Barth †, Eric Rescorla ‡ and Collin Jackson ∗ ∗ Carnegie Mellon University.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
An Evaluation of the Google Chrome Extension Security Architecture
EECS 354 Network Security Cross Site Scripting (XSS)
Site and user security concerns for real time content serving Chris Mejia, IAB Sean Snider, Yahoo! Prabhakar Goyal, Microsoft.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Chapter 9 Web Applications. Web Applications are public and available to the entire world. Easy access to the application means also easy access for malicious.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Web Same-Origin-Policy Lab Zutao Zhu 11/06/2009. Outline Background Setting SOP.
The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under.
Introduction 2: Internet, Intranet, and Extranet J394 – Perancangan Situs Web Program Sudi Manajemen Universitas Bina Nusantara.
Happy Hacking HTML5! Group members: Dongyang Zhang Wei Liu Weizhou He Yutong Wei Yuxin Zhu.
Lab 3 Cookie Stealing using XSS Kara James, Chelsea Collins, Trevor Norwood, David Johnson.
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP does not maintain state. State Information can be passed using: HTTP Headers.
Frame isolation and the same origin policy Collin Jackson CS 142 Winter 2009.
1 Subspace: Secure Cross Domain Communication for Web Mashups Collin Jackson and Helen J. Wang Mamadou H. Diallo.
Subspace: Secure Cross-Domain Communication for Web Mashups Collin Jackson Stanford University Helen J. Wang Microsoft Research ACM WWW, May, 2007 Presenter:
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Presented by…. Group 2 1. Programming language 2Introduction.
Computer Concepts 2014 Chapter 7 The Web and .
HTML5 Group 3: Dongyang Zhang, Wei Liu, Weizhou He, Yutong Wei, Yuxin Zhu.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
HTTP and Server Security James Walden Northern Kentucky University.
Cross-Site Scripting Vulnerabilities Adam Doupé 11/24/2014.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
Ladd Van Tol Senior Software Engineer Security on the Web Part One - Vulnerabilities.
1-Vulnerabilities 2-Hackers 3-Categories of attacks 4-What a malicious hacker do? 5-Security mechanisms 6-HTTP Web Servers 7-Web applications attacks.
Chapter 9 Web Applications. Web Applications are public and available to the entire world. Easy access to the application means also easy access for malicious.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
JavaScript, Fourth Edition
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
CSE 154 LECTURE 12: COOKIES. Including files: include include("filename"); PHP include("header.html"); include("shared-code.php"); PHP inserts the entire.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Chapter 8 Cookies And Security JavaScript, Third Edition.
BetterAuth: Web Authentication Revisited Martin Johns, Sebastian Lekies, Bastian Braun, Benjamin Flesch In ACSAC /01/08 A.C. ADL.
Srikar Nadipally. Outline Finding and Exploiting XSS Vulnerabilities Standard Reflected XSS Stored XSS DOM based XSS Prevention of XSS attack Reflect.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
Pete LePage Senior Product Manager Microsoft Corporation SESSION CODE: WEB301.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Web Applications Testing By Jamie Rougvie Supported by.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP Headers Client IP Address HTTP User Login FAT URLs Cookies.
University of Central Florida The Postman Always Rings Twice: Attacking & Defending postMessage in HTML5 Websites Ankur Verma University of Central Florida,
1 Isolating Web Programs in Modern Browser Architectures CS6204: Cloud Environment Spring 2011.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Rich Internet Applications 9. HTML 5 and RIAs. HTML 5 Standard currently under development by W3C Aims to improve the language with support for the latest.
JavaScript, Sixth Edition Chapter 11 Updating Web Pages with Ajax.
Browser code isolation John Mitchell CS 155 Spring 2016.
By Collin Donaldson. Hacking is only legal under the following circumstances: 1.You hack (penetration test) a device/network you own. 2.You gain explicit,
Open Solutions for a Changing World™ Eddy Kleinjan Copyright 2005, Data Access WordwideNew Techniques for Building Web Applications June 6-9, 2005 Key.
IBM Rational Application Security Group (aka Watchfire) Web Based Man In the Middle Attack © 2009 IBM Corporation 1 Active Man in the Middle Attacks The.
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
ArcGIS for Server Security: Advanced
World Wide Web policy.
Ad-blocker circumvention System
What is Cookie? Cookie is small information stored in text file on user’s hard drive by web server. This information is later used by web browser to retrieve.
The Application Lifecycle
Exploring DOM-Based Cross Site Attacks
Presentation transcript:

Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP Foundation OWASP OWASP – Browser Security Roberto Suggi Liverani Security Consultant Security-Assessment.com 3 September 2008

OWASP 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 2

OWASP 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 3

OWASP Introduction  Present: web security focus is mainly on web apps rather than browsers  But: browser bugs affect much more users than web application bugs 4

OWASP Introduction  Browsers statistics from w3schools.com  JavaScript statistics 5

OWASP 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 6

OWASP 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 7

OWASP HMTL5  Relaxing Origin-Policy:  Window objects origin-policy exceptions:  Location object  postMessage()  frames attribute  XXX4 method 8 y.hello.comx.hello.com XSS Injection document.domain = hello.com Communication between 2 subdomains through XSS

OWASP HTML5  Browsing Contexts and Navigations  Opener browsing context – 1.COM  Auxiliary Browser Context - 3.COM  Nested browser context - 2.COM 9 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

OWASP HTML5  Custom Protocol and content handlers  registerProtocolHandler() – ftp:, fax:, foo:  registerContentHandler() – MIME type, text/foo 10 A.COM B.COM navigator.registerCont entHandler(‘text/foo', ‘foo?url=%s', ‘foo') Download Test.foo served as text/foo redirection to: b.com/test.foo

OWASP 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  User redirected to external site which handles text/foo  Leaking HTTPS  User redirected to site with HTTPS URL  Leaking credentials in GET Request 11

OWASP 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”… 12

OWASP HTML5  Client Storage Attack Example (A. Trivero)  Browser SQL Injection Example (A. Trivero)  Cross-Directory Attack  XSS in can read/write data from/to  User Tracking - UI put in client-storage in multiple sites (marketing, botnet, etc.)  Cookie Resurrection 13

OWASP HTML5  Offline Web Applications  Extensive Application Cache API   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 14

OWASP 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 15

OWASP 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) 16 window.addEventListener('message', receiver, false); function receiver(e) { if (e.origin == ' { 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', ' NOTE: this condition can be omitted or = *

OWASP 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)  17 data: data: data: EventStream PULLS

OWASP HTML5  Next generation web botnet – C&M interface 18 BOTNET badsite.com/ evil.php Stored XSS in botnet websites: Data Stream (MIME: text/event-stream) Data: wait();\n Data: document.write(<img src=‘ Botnet operates following XHR access control for data exchange

OWASP HTML5  Web Sockets – websocket(url);  Botnet scenario applies as well 19 Client at 123.comServer at aa.com GET ws://aa.com/ HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: 123.com Origin: Authorization: Basic d2FsbGU6ZXZl HTTP/ Web Socket Protocol Handshake Upgrade: WebSocket Connection: Upgrade WebSocket-Origin: 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

OWASP WebApps (XHR)  XHR Access Control (GET and POST) 20 Resource: aaa.com/test.txt Client: bbb.com JavaScript + XHR: new client = new XMLHttpRequest(); client.open("GET or POST", " client.onreadystatechange = function() { /* do something */ } client.send() HTTP Response: Access-Control-Allow- Origin: 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("GET or POST", " ss-Control-Allow-Origin: client.onreadystatechange = function() { /* do something */ } client.send()

OWASP WebApps (XHR)  XHR Access Control (Other HTTP methods) 21 Resource: aaa.com/test.txt Client: bbb.com JavaScript + XHR: new client = new XMLHttpRequest(); client.open(“OPTIONS", " client.onreadystatechange = function() { /* do something */ } client.send() HTTP Response: Access-Control-Allow- Origin: Access-Control-Max- Age: Preflight Request: OPTIONS JavaScript + XHR: new client = new XMLHttpRequest(); client.open(“DELETE", " client.onreadystatechange = function() { /* do something */ } client.send() DELETE NOTE: the entire access control system relies on HTTP headers

OWASP XHR Alternative – XDR (Xdomain Request)  Cross-domain request developed by Microsoft 22 Resource: aaa.com/xdr.txt Client: bbb.com JavaScript + XDR: xdr = new XDomainRequest(); xdr.open(“GET", “ HTTP Response: XDomainRequestAllo wed=1 Hello! GET HTTP Request: GET /xdr.txt XDomainRequest: 1 Host: bbb.com NOTE: the entire XDR relies on HTTP headers

OWASP 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 23

OWASP 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: 24 test.addEventListener(MouseEvent.CLICK, downloadFile); var fileRef:FileReference = new FileReference(); function downloadFile(event:MouseEvent):void { fileRef.download(new URLRequest(" “file.html"); }

OWASP 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 25

OWASP Questions?   

OWASP References  HTML5   XHR and XHR Level 2    Access Controls XHR   XDR    LSO    s_manager07.html   27

OWASP References  HTML5 - Presentation   Abusing HTML 5 Structured Client-side Storage   Web Stats   Browser Stats  28