17 th ACM CCS (October, 2010).  Introduction  Threat Model  Cross-Origin CSS Attacks  Example Attacks  Defenses  Experiment  Related Work 2 A Presentation.

Slides:



Advertisements
Similar presentations
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems © 2002, Predictive Systems.
Advertisements

Nick Feamster CS 6262 Spring 2009
ForceHTTPS: Protecting High-Security Web Sites from Network Attacks Collin Jackson and Adam Barth.
The OWASP Foundation Web Application Security Host Apps Firewall Host Apps Database Host Web serverApp serverDB server Securing the.
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
Protecting Browsers from Cross-Origin CSS Attacks Lin-Shung Huang, Zack Weinberg Carnegie Mellon University Chris Evans Google Collin Jackson Carnegie.
DT228/3 Web Development WWW and Client server model.
EECS 354 Network Security Cross Site Scripting (XSS)
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Blackbox Reversing of XSS Filters Alexander Sotirov ekoparty 2008.
© 2010, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet 1.
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.
WHAT IS AJAX? Zack Sheppard [zts2101] WHIM April 19, 2011.
Web Privacy Topics Andy Zeigler Senior Program Manager, Internet Explorer Microsoft.
© 2004, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet.
Happy Hacking HTML5! Group members: Dongyang Zhang Wei Liu Weizhou He Yutong Wei Yuxin Zhu.
Injection Attacks by Example SQL Injection and XSS Adam Forsythe Thomas Hollingsworth.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Web Application Attacks ECE 4112 Fall 2007 Group 9 Zafeer Khan & Simmon Yau.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Computer Concepts 2014 Chapter 7 The Web and .
Workshop 3 Web Application Security Li Weichao March
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
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.
Origins, Cookies and Security – Oh My! John Kemp, Nokia Mobile Solutions.
Prevent Cross-Site Scripting (XSS) attack
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Ladd Van Tol Senior Software Engineer Security on the Web Part One - Vulnerabilities.
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.
Robust Defenses for Cross-Site Request Forgery CS6V Presented by Saravana M Subramanian.
JavaScript, Fourth Edition
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Cross Site Scripting (XSS) Chaitanya Lakshmi
1 Internet Browsing Vulnerabilities and Security ECE4112 Final Lab Ye Yan Frank Park Scott Kim Neil Joshi.
Srikar Nadipally. Outline Finding and Exploiting XSS Vulnerabilities Standard Reflected XSS Stored XSS DOM based XSS Prevention of XSS attack Reflect.
Robust Defenses for Cross-Site Request Forgery
PHP2010/11 : [‹#›] PHP Security. PHP2010/11 : [‹#›] Two Golden Rules 1.FILTER external input Obvious.. $_POST, $_COOKIE, etc. Less obvious.. $_SERVER.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
1 Robust Defenses for Cross-Site Request Forgery Adam Barth, Collin Jackson, John C. Mitchell Stanford University 15th ACM CCS.
Web Database Programming Week 7 Session Management & Authentication.
THE DEVIL IS IN THE (IMPLEMENTATION) DETAILS: AN EMPIRICAL ANALYSIS OF OAUTH SSO SYSTEMS SAN-TSAI SUN & KONSTANTIN BEZNOSOV PRESENTED BY: NAZISH KHAN COMPSCI.
Evil Code and how to defend against it CSCI 4300
University of Central Florida The Postman Always Rings Twice: Attacking & Defending postMessage in HTML5 Websites Ankur Verma University of Central Florida,
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
CS526Topic 12: Web Security (2)1 Information Security CS 526 Topic 9 Web Security Part 2.
Cross-site request forgery Collin Jackson CS 142 Winter 2009.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
Introduction to the World Wide Web & Internet CIS 101.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
The Postman Always Rings Twice: Attacking and Defending postMessage in HTML5 Websites Paper by Sooel Son and Vitaly Shmatikov, The University of Texas.
Redmond Protocols Plugfest 2016 Tarun Chopra Accessing APIs through Add-Ins Sr. Escalation Engineer.
Web Page Design The Basics. The Web Page A document (file) created using the HTML scripting language. A document (file) created using the HTML scripting.
Some from Chapter 11.9 – “Web” 4 th edition and SY306 Web and Databases for Cyber Operations Cookies and.
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
National College of Science & Information Technology.
An Introduction to Web Application Security
TMG Client Protection 6NPS – Session 7.
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
CISC103 Web Development Basics: Web site:
CISC103 Web Development Basics: Web site:
Web Systems Development (CSC-215)
CSC 495/583 Topics of Software Security Intro to Web Security
Cross Site Request Forgery New Attacks and Defenses
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems
Client-Server Model: Requesting a Web Page
Cross Site Request Forgery (CSRF)
Presentation transcript:

17 th ACM CCS (October, 2010)

 Introduction  Threat Model  Cross-Origin CSS Attacks  Example Attacks  Defenses  Experiment  Related Work 2 A Presentation in Advanced Defense Lab

 Web-hosted applications have supplanted traditional desktop applications for almost everything that requires network communication. A Presentation in Advanced Defense Lab 3

4

 The same-origin policy is the basic principle used to secure Web applications from each other. A Presentation in Advanced Defense Lab 5

 Content › HTML  Behavior › JavaScript  Appearance › Cascading Style Sheet › The first specification of CSS dates to A Presentation in Advanced Defense Lab 6

 To allow future extensibility, the CSS specification mandates error-tolerant parsing [link].link  This leads to a security hole. › GreyMagic Security Advisory GM#004-IE (2002) [link]link › To date, all published attacks of this type have required JavaScript, and most have been specific to Internet Explorer. A Presentation in Advanced Defense Lab 7

 Attacker Abilities › Sending and receiving arbitrary network traffic from its own servers.  Target Behavior › Attacker’s Inject strings must pass server-side cross-site scripting (XSS) filters such as HTML Purifier [link].link  Victim Behavior › The web attacker can entice the victim into visiting its site. A Presentation in Advanced Defense Lab 8

 Cross-origin CSS attacks are possible because of existing browser behaviors, reasonable taken in isolation, but with unexpected interactions. A Presentation in Advanced Defense Lab 9

 Session Authentication › Once a user has logged into a web application, their browser will transmit a credential with every HTTP request to that server. A Presentation in Advanced Defense Lab 10

 Cross-Origin Content Inclusion › Requests for cross-origin resources transmit any credentials associated with the site that hosts the resource, not credentials associated with the site whose page made the reference. A Presentation in Advanced Defense Lab 11

 Error-Tolerant Style Sheet Parsing › When browsers encounter syntax errors in CSS, they discard the current syntactic construct, skip ahead until what appears to be the beginning of the next one.  CSS parsing mode [link]link › Quirks mode › Strict/standards mode  A Presentation in Advanced Defense Lab 12

 Principles of error-tolerant style sheet parsing › Even while skipping, parentheses, square brackets, and curly braces must be properly balanced and nested. › The next syntactic construct might begin after the next semicolon, after going up one brace level, or after the next brace-enclosed block. › The end of a style sheet closes all open constructs without error. A Presentation in Advanced Defense Lab 13

 In a cross-origin CSS attack, the attacker injects strings into the target document that bracket the data to be stolen. A Presentation in Advanced Defense Lab 14

A Presentation in Advanced Defense Lab 15

 When the victim user visits attacker.com  url( A Presentation in Advanced Defense Lab 16

A Presentation in Advanced Defense Lab 17

A Presentation in Advanced Defense Lab 18

 Insufficient Injection points › The attacker must inject two strings into the document containing the secret.  Quotes › If the secret contains both types of quotes, or the attacker cannot predict which type of quotes it will contain, the attack may fail. A Presentation in Advanced Defense Lab 19

 Line Breaks › Internet Explorer permits unescaped line breaks in CSS string constants and url()s.  Character Escapes  Forcing UTF-7 › › {}#f{font-family:+ACI- A Presentation in Advanced Defense Lab 20

 Forcing UTF-7 › › {}#f{font-family:+ACI- A Presentation in Advanced Defense Lab 21

 The Internet Movie Database (IMDb) [link]link › allows registered users to rate films, make posts on message boards, and send private messages to each other. A Presentation in Advanced Defense Lab 22

A Presentation in Advanced Defense Lab 23

 Send an to the victim with the subject line: › ');}  Wait for some time while the victim receives other messages.  Send another to the victim with the subject line: › {}body{background-image:url(' A Presentation in Advanced Defense Lab 24

A Presentation in Advanced Defense Lab 25

 A Presentation in Advanced Defense Lab 26

 Content Type Enforcement Proposal › HTTP header  Content-Type: text/css  Content-Type: text/html › Strict Enforcement  Strict enforcement refuses to load any style sheet crossorigin, unless it is properly labeled text/css.  content type misconfigurations are common A Presentation in Advanced Defense Lab 27

› Minimal Enforcement  Block if:  cross-origin  invalid content type  syntactically malformed A Presentation in Advanced Defense Lab 28

 we crawled the top 100,000 web sites ranked by Alexa and identified all of the style sheet resources used by their front pages. A Presentation in Advanced Defense Lab 29

A Presentation in Advanced Defense Lab 30 Strict Enforcement  62 sites ≈ 0.06%

A Presentation in Advanced Defense Lab 31

 Block Cookies › Some browsers have the option to block only “third-party” cookies, which prevents cookies from being set by a cross-origin load. › But not read… A Presentation in Advanced Defense Lab 32

 Block JavaScript Style APIs › Many browsers already prevent JavaScript from reading parsed style rules when those rules were loaded cross-origin. A Presentation in Advanced Defense Lab 33

 Newlines › Internet Explorer  HTML Encoding  Avoid Ambient Authentication › However, if a URL with a credential becomes visible to the victim user (e.g. via the location bar), they might be tricked into revealing it. A Presentation in Advanced Defense Lab 34

 Content-Sniffing XSS  Barth et al  IE 8 [link]link A Presentation in Advanced Defense Lab 35

A Presentation in Advanced Defense Lab 36

A Presentation in Advanced Defense Lab 37

A Presentation in Advanced Defense Lab 38

 Firefox 4.0 [link]link › Http Response Header › X-CONTENT-SECURITY-POLICY A Presentation in Advanced Defense Lab 39

 Microsoft Research(February, 2009)  Strict enforcement A Presentation in Advanced Defense Lab 40

A Presentation in Advanced Defense Lab 41