By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)

Slides:



Advertisements
Similar presentations
PHP Form and File Handling
Advertisements

Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems © 2002, Predictive Systems.
Nick Feamster CS 6262 Spring 2009
Protecting Browser State from Web Privacy Attacks Collin Jackson, Andrew Bortz, Dan Boneh, John Mitchell Stanford University.
Past, Present and Future By Eoin Keary and Jim Manico
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.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Java Script Session1 INTRODUCTION.
Team Members: Brad Stancel,
XP Tutorial 9 New Perspectives on JavaScript, Comprehensive1 Working with Cookies Managing Data in a Web Site Using JavaScript Cookies.
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
CROSS SITE SCRIPTING..! (XSS). Overview What is XSS? Types of XSS Real world Example Impact of XSS How to protect against XSS?
Leveraging User Interactions for In-Depth Testing of Web Application Sean McAllister Secure System Lab, Technical University Vienna, Austria Engin Kirda.
DYNAMIC DATA TAINTING AND ANALYSIS. Roadmap  Background  TaintDroid  JavaScript  Conclusion.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Is Your Website Hackable? Check with Acunetix Web Vulnerability Scanner. Acunetix Web Vulnerability Scanner V9.
HTML5 Group 3: Dongyang Zhang, Wei Liu, Weizhou He, Yutong Wei, Yuxin Zhu.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Prevent Cross-Site Scripting (XSS) attack
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
NDSS 2007 Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, Giovanni Vigna.
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
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.
Working with Cookies Managing Data in a Web Site Using JavaScript Cookies* *Check and comply with the current legislation regarding handling cookies.
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.
3-Protecting Systems Dr. John P. Abraham Professor UTPA.
document.location ✗ Location Hijacking Phishing.
Chapter 8 Cookies And Security JavaScript, Third Edition.
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
Web Spoofing Steve Newell Mike Falcon Computer Security CIS 4360.
Introduction To Web Application Security in PHP. Security is Big And Often Difficult PHP doesn’t make it any easier.
Defending Browsers against Drive-by Downloads:Mitigating Heap-Spraying Code Injection Attacks Authors:Manuel Egele, Peter Wurzinger, Christopher Kruegel,
By Davide Balzarotti Marco Cova Viktoria V. FelmetsgerGiovanni Vigna Presented by: Mostafa Saad.
University of Central Florida The Postman Always Rings Twice: Attacking & Defending postMessage in HTML5 Websites Ankur Verma University of Central Florida,
Presented By: Chandra Kollipara. Cross-Site Scripting: Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Introduction Program File Authorization Security Theorem Active Code Authorization Authorization Logic Implementation considerations Conclusion.
Saner: Composing Static and Dynamic Analysis to Validate Sanitization in Web Applications Davide Balzarotti, Marco Cova, Vika Felmetsger, Nenad Jovanovic,
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Software Security. Bugs Most software has bugs Some bugs cause security vulnerabilities Incorrect processing of security related data Incorrect processing.
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,
Carrie Estes Collin Donaldson.  Zero day attacks  “zero day”  Web application attacks  Signing up for a class  Hardening the web server  Enhancing.
The Postman Always Rings Twice: Attacking and Defending postMessage in HTML5 Websites Paper by Sooel Son and Vitaly Shmatikov, The University of Texas.
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
Javascript worms By Benjamin Mossé SecPro
Web Application Security
Unit 20 - Client Side Customisation of Web Pages
CSE 154 Lecture 20: Cookies.
Automatic Web Security Unit Testing: XSS Vulnerability Detection Mahmoud Mohammadi, Bill Chu, Heather Richter, Emerson Murphy-Hill Presenter:
WWW and HTTP King Fahd University of Petroleum & Minerals
World Wide Web policy.
Static Detection of Cross-Site Scripting Vulnerabilities
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.
CSC 495/583 Topics of Software Security Intro to Web Security
PHP.
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
PHP an introduction.
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems
Exploring DOM-Based Cross Site Attacks
Web Application Development Using PHP
Cross-Site Scripting Attack (XSS)
Cross Site Request Forgery (CSRF)
Presentation transcript:

By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07) 1 / 18

Authors  Philipp Vogt  Main developer of the XSS Attack Prevention in Firefox project  Cross site scripting detection  Giovanni Vigna  Associate Professor of UCSB  Web Security, Intrusion Detection 2 / 18

Introduction [1/5]  Cross Site Scripting  An attack against web applications where malicious scripting code is injected into the output of an application that is further delivered to a user’s web browser  This scripting code transfers sensitive information to the attacker  This information allows the attacker to impersonate the victim or hijack the victim’s session 3 / 18

Introduction [2/5]  Cross Site Scripting Attacker Server Victim Send to with XSS code Send to request with XSS Code Send to response with XSS Code XSS Code is executed Sensitive information is trasfered 4 / 18

Introduction [3/5]  Stored XSS Attacker persistently stores the malicious code in a resource managed by the web application, such as a database. when the victim requests a dynamic page, The actual attack is carried out at a later time.  Reflected XSS The attack script is not persistently stored, instead, it is reflected(sent back) to the victim.  Example Sending to the victim an with a link that contains the malicious JavaScript code. 5 / 18

Introduction [4/5]  Sensitive Data Sources 6 / 18

Introduction [5/5]  The Goal JavaScript program can send sensitive information only to the site from which it was loaded So the information flow of sensitive data is tracked inside the JavaScript engine of the browser. Whenever an attack is detected, the user is warned and given the possibility to stop the transfer. 7 / 18

Dynamic Tainting [1/5]  Dynamic Tainting Sensitive data is first marked, and then, when this data is accessed by scripts running in the web browser, its use is dynamically tracked by system. it is sufficient to model the taint value associated with a piece of data as a simple boolean flag. 8 / 18

Dynamic Tainting [2/5]  Taint Propagation  Assignments  Arithmetic and logic operations (+, -, &, etc.)  Control structures and loops (if, while, switch, for in)  Function call and eval 9 / 18

Static Tainting [1/3]  Indirect Control Dependency To cover both direct and indirect control dependencies, all possible program path in a scope need to be examined. Static analysis is necessary. 10 / 18

Static Tainting [2/3]  Linear Static Taint Analysis Ensure all variables that are assigned values (tainted or not) inside the tainted scope are also tainted. 11 / 18

Static Tainting [3/3]  Stack Analysis  Instructions responsible for setting object properties do not specify the target object because of stack-based nature of JavaScript.  Abstraction stack which has boolean values. 12 / 18

Data Transmission  The tainted data has to be transferred to a third party, using a variety of methods.  document.location.  source of an image in the web page.  Submitting a form in the web page.  XMLHttpRequest object. 13 / 18

Evaluation [1/4]  XSS attacks  XSS sources that group’s members collected  Successful in detecting XSS  Manual test  The modified browser was used by the authors for web surfing on a daily basis  The overhead of is negligible.  The amount of false positives was low. 14 / 18

Evaluation [2/4]  Automatic test  Integrate a web crawling engine into modified Firefox.  Visited 1,033,000 unique web pages  88,589 (8.58%) web pages raised an XSS warning  The scripts are inserted into the web page with the con sent of the web site owner. 15 / 18

Evaluation [3/4]  Top -30 destination domain  These domains belong to companies that collect statistics about traffic on web sites of their customers  Deny top 30 domains, reduce to 13,964(1.35%)  Reduced to 5,289 (0.51%) if only transfer of cookies were considered 16 / 18

Evaluation [4/4]  Reasons of small false positives  Transfer of cookies to different domains, but within company borders (eg. cnn.net -> cnn.com)  Transfer of cookies between different domains, but same company (eg. discover.com -> unitedstreaming.com)  Our indirect control flow 17 / 18

Conclusion  Prevent XSS attacks using a dynamic taint analysis and static analysis when necessary.  Integrate the solution into Firefox web browser by modifying its JavaScript engine.  Generate small false positives and feasible in practice. 18 / 18

Extra - Dynamic Tainting [3/5]  Assignments  If the right-hand side of the assignment is tainted, then the target on the left-hand side is also tainted. x = document.cookie;  The variable that is assigned a tainted value is not the only object that must be tainted.  Arithmetic and Logic Operation  Javascript is a stack-based language.  First pop the operands from the stack and then push back the result.  The result is tainted if one of the used operands is tainted. 19

Extra - Dynamic Tainting [4/5]  Control Structures and Loops if the condition of a control structure tests a tainted value, a tainted scope is generated that covers the whole control structures. A variable is dynamically tainted only when its value is modified inside a scope during the actual execution of the program  Function Calls If a function is defined in a tainted scope, the function itself (operations, parameters, return value) is also tainted  Eval If eval is called in a tainted scope or if its parameter is tainted, a scope is generated. 20

Extra - Dynamic Tainting [5/5]  Example 21

Extra - Implementation  Extends Mozilla firefox 1.o pre  Two parts for containing tainted data objects  The javascript engine (Spider-Monkey)  Variable, functions, scopes, and objects  DOM tree  location.href, etc  Every time a JavaScript program attempts to transfer sensitive data, a check is performed to determine whether sensitive data is sent to own host 22