Cross-Site Scripting CSCD 498/539 Secure Coding Principles Amazing Legion of Fuzzy Backdoor Intruder Worms Bryan Smith Allen Greaves Zach Moore Rebecca.

Slides:



Advertisements
Similar presentations
Web 2.0 Programming 1 © Tongji University, Computer Science and Technology. Web Web Programming Technology 2012.
Advertisements

Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems © 2002, Predictive Systems.
Nick Feamster CS 6262 Spring 2009
Cross Site Scripting (XSS)
Cross-Site Scripting (XSS) Vulnerability in AJAX and Adobe Flex Applications Danielle Cauthen 04/09/2010 COMS E6125 – Web enHanced Information Management.
Cross-site Request Forgery (CSRF) Attacks
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.
© 2009 IBM Corporation IBM Rational Application Security The Bank Job Utilizing XSS Vulnerabilities Adi Sharabani IBM Rational Application Security Research.
The OWASP Foundation Web Application Security Host Apps Firewall Host Apps Database Host Web serverApp serverDB server Securing the.
Path Cutter: Severing the Self-Propagation Path of XSS JavaScript Worms in Social Web Networks Yinzhi Cao, Vinod Yegneswaran, Phillip Porras, and Yan Chen.
©2009 Justin C. Klein Keane PHP Code Auditing Session 5 XSS & XSRF Justin C. Klein Keane
17 th ACM CCS (October, 2010).  Introduction  Threat Model  Cross-Origin CSS Attacks  Example Attacks  Defenses  Experiment  Related Work 2 A Presentation.
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
WebGoat & WebScarab “What is computer security for $1000 Alex?”
EECS 354 Network Security Cross Site Scripting (XSS)
Cross Site Scripting a.k.a. XSS Szymon Siewior. Disclaimer Everything that will be shown, was created for strictly educational purposes. You may reuse.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
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.
Chapter 4 Application Security Knowledge and Test Prep
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
Exploits: XSS, SQLI, Buffer Overflow
CROSS SITE SCRIPTING..! (XSS). Overview What is XSS? Types of XSS Real world Example Impact of XSS How to protect against XSS?
Lab 3 Cookie Stealing using XSS Kara James, Chelsea Collins, Trevor Norwood, David Johnson.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
WEB SECURITY WORKSHOP TEXSAW 2013 Presented by Joshua Hammond Prepared by Scott Hand.
 A cookie is a piece of text that a Web server can store on a user's hard disk.  Cookie data is simply name-value pairs stored on your hard disk by.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Microsoft October 2004 Security Bulletins Briefing for Senior IT Managers updated October 20, 2004 Marcus H. Sachs, P.E. The SANS Institute October 12,
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.
Prevent Cross-Site Scripting (XSS) attack
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
Server-side Scripting Powering the webs favourite services.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
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.
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.
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.
1 Internet Browsing Vulnerabilities and Security ECE4112 Final Lab Ye Yan Frank Park Scott Kim Neil Joshi.
Client Side Vulnerabilities Aka, The Perils of HTTP Lesson 14.
Web Engineering we define Web Engineering as follows: 1) Web Engineering is the application of systematic and proven approaches (concepts, methods, techniques,
Cross-Site Attacks James Walden Northern Kentucky University.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
Foundations of Network and Computer Security J J ohn Black CSCI 6268/TLEN 5550, Spring 2013.
Week 10-11c Attacks and Malware III. Remote Control Facility distinguishes a bot from a worm distinguishes a bot from a worm worm propagates itself and.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Web Security.
Cross Site Scripting and its Issues By Odion Oisamoje.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
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,
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.
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.
XSS 101 Jason Clark 12/20.
Web Programming Language
Javascript worms By Benjamin Mossé SecPro
Building Secure ColdFusion Applications
CSCE 548 Student Presentation Ryan Labrador
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
World Wide Web policy.
CISC103 Web Development Basics: Web site:
Static Detection of Cross-Site Scripting Vulnerabilities
Cross Sight scripting: Type-2
CSC 482/582: Computer Security
Database Driven Websites
CSC 495/583 Topics of Software Security Intro to Web Security
Protecting Against Common Web Application Vulnerabilities
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems
Exploring DOM-Based Cross Site Attacks
Cross-Site Scripting Attack (XSS)
Cross Site Request Forgery (CSRF)
Presentation transcript:

Cross-Site Scripting CSCD 498/539 Secure Coding Principles Amazing Legion of Fuzzy Backdoor Intruder Worms Bryan Smith Allen Greaves Zach Moore Rebecca Long

Introduction & Overview Amazing Legion of Fuzzy Backdoor Intruder Worms Zachary Moore

Cross-Site Scripting (XSS): Abbreviation: XSS stands for cross-site scripting rather than CSS to avoid confusion with Cascading Style Sheets. Definition: A computer security vulnerability typically found in web applications which allows code injection by malicious web users into the web pages viewed by other users. Code Injection: A technique to introduce code into a computer program or system by taking advantage of the unenforced and unchecked assumptions the system makes about its inputs.

A Note on the Term 'XSS': The term 'Cross-Site Scripting' is actually a technically incorrect name for this vulnerability. This is for two reasons: 1) The issue is not just dependent on scripting. It is dependent on the browser settings, the level of privilege, malicious social engineering, etc. It may not even be script but rather plain HTML that is injected. 2) It's not even typically cross-site based. Some versions of this exploit depend on injected code only, not another site.

The XSS Scenario: 1) One or more browser windows are open by a user. 2) A client-side scripting language (i.e. JavaScript) can successfully run. 3) The access-control policies (i.e. same-origin policy) used by either the browser or language can be bypassed by a malicious user. 4) This scenario leads to an XSS 'hole' in the web page. The malicious user can inject script into pages served by other domains. This gains elevated access privileges to sensitive page content, session cookies, and a variety of other objects.

Security Bypassed via 'XSS': The Sandbox: the restricted environment that limits the executing code of a web page to a limited amount of resources. Limits include making data non-persistent and disabling reading from input devices. A JavaApplet or a scratch disk are both sandboxes. The same-origin policy: this policy allows any interaction between objects and pages, so long as these objects come from the same domain and over the same protocol. (Other policies may also need to be bypassed.)

Types of XSS: There are three types of XSS. Type 1 is most common. Each type is based off the origin of exploit and the resulting vulnerability : Type 0: aka DOM-based or Local Origin: Client-side. ==> Socially engineered! Vulnerability: Remote (delayed) execution via local zone privilege. Type 1: aka Non-Persistent or Reflected Origin: Client-side. ==> Socially engineered! Vulnerability: Affects immediate results for only this client. Type 2: aka Persistent or Stored Origin: Server-side. Vulnerability: Affects all results for all clients. The names of the types are not necessarily industry standard nomenclature.

Type 0: Local 1) Mallory sends a URL to Alice (via or another mechanism) of a maliciously constructed web page. 2) Alice clicks on the link. 3) The malicious web page's JavaScript opens a vulnerable HTML page installed locally on Alice's computer. 4) The vulnerable HTML page contains JavaScript which executes in Alice's computer's local zone. 5) Mallory's malicious script now may run commands with the privileges Alice holds on her own computer. ** Example adapted from:

Type 1: Non-Persistent 1) Alice often visits a particular website hosted by Bob where Alice can log in and store sensitive information. 2) Mallory observes Bob's website contains an XSS vulnerability. 3) Mallory crafts a URL to exploit the vulnerability and sends Alice a spoofed which looks as if it came from Bob. 4) Alice visits Mallory's malicious URL while logged into Bob's website. 5) The malicious script embedded in the URL executes in Alice's browser as if it came directly from Bob's server. 6) The script steals sensitive information and sends this to Mallory's web server without Alice's knowledge. ** Example adapted from:

Type 2: Persistent 1) Bob hosts a web site which allows users to post messages to the site for later viewing by other members. 2) Mallory notices that Bob's website contains an XSS vulnerability. 3) Mallory posts a message, controversial in nature, which may encourage many other users of the site to view it. 4) Other site users viewing the posted message can then have their session cookies or other credentials taken and sent to Mallory's webserver without their knowledge. 5) Later, Mallory logs in as other site users and posts messages on their behalf. ** Example adapted from:

History of Exploits Amazing Legion of Fuzzy Backdoor Intruder Worms Rebecca Long

Hotmail October 2001 Allowed an attacker to steal a users Microsoft.NET Passport session cookie. How? Malicious code containing malformed HTML would be sent to a Hotmail user. Hotmails filters would not recognize the HTML and fail to parse it out. Internet Explorer was more than happy to read the malicious code.

Gmail November 2004 Gmail had an XSS vulnerability that gave a possible route for an attacker to gain full access to a users account by just knowing their username. Attacker can steal the users cookie file by using a hex- encoded XSS link who could then use it to identify him/herself as the original owner of the account. References:

MySpace.com October 2005 A XSS worm spread through MySpace.com affecting millions of users. How? MySpace user Samy placed JavaScript code in his profile. When other users viewed the profile, the script initiated a background request (via AJAX) to add Samy to their friends list, bypassing the normal approval process. Self-replicated itself into the other users profile. Thus, repeating the process on the newly infected profile. Reference:

CBS & BBC News August 2006 A Russian site reported President Bush appointed a 9 year old boy to be the chairperson of the Information Security Department. Claim was backed up by links to CBS News and BBC News which were both vulnerable to XSS holes allowing articles of the attackers choosing to be injected. Reference:

Acrobat Reader January 2007 Adobe Acrobat and Acrobat Reader 7 and prior on both Internet Explorer and Firefox are vulnerable to XSS allowing for JavaScript injection. User interaction required by clicking on a link or just visiting a page that has a XSS PDF exploit. Attacker can gain access of your session IDs for other sites (i.e. social networking sites such as MySpace). Attacker is able to then tamper with your profile page to insure future access to your page and your friends pages. Reference:

Google Desktop February 2007 Vulnerability in Google Desktop could allow an attacker to use JavaScript to search and steal data from a users system. Malicious JavaScript could be installed on the users computer that Google Desktop repeatedly will run giving the attacker ability to search the computer using terms most likely to dig up interesting information. Reference:

XSS for President XSS Blog that shows XSS vulnerabilities on Presidential candidate websites.

In-Class Example Amazing Legion of Fuzzy Backdoor Intruder Worms Bryan Smith

Mitigation Amazing Legion of Fuzzy Backdoor Intruder Worms Allen Greaves

Mitigating Filter characters Convert evil characters to HTML Authentication scripts Check for malicious code

Mitigating Client side mitigation The client can turn off JavaScript This limits the user

Mitigating Noxes Personal firewall application Other firewalls are useless All web connections pass through Noxes Noxes allows user to block filth

Noxes Allows user to create rules for filter Manual Creation Firewall Prompts Snapshot mode User has knowledge of every connection Theoretical

Noxes All statically embedded links are safe No cookie being sent back All local links are safe Why steal a cookie for your own site? Every link is given a temporary rule

Noxes Evil server can still steal Request cookie one byte at a time Limit the number of domain requests User specified Pop-up attacks Noxes injects its own JavaScript Warns user if parent domain is different