Finding Your Way in Testing Jungle. A Learning Approach to Web Security Testing.



Similar documents
Check list for web developers

Security Research Advisory IBM inotes 9 Active Content Filtering Bypass

Creating Stronger, Safer, Web Facing Code. JPL IT Security Mary Rivera June 17, 2011

Acunetix Website Audit. 5 November, Developer Report. Generated by Acunetix WVS Reporter (v8.0 Build )

Intrusion detection for web applications

Detect and Sanitise Encoded Cross-Site Scripting and SQL Injection Attack Strings Using a Hash Map

Bug Report. Date: March 19, 2011 Reporter: Chris Jarabek

HTTPParameter Pollution. ChrysostomosDaniel

Web Application Security

SECURITY ADVISORY. December 2008 Barracuda Load Balancer admin login Cross-site Scripting

Protection, Usability and Improvements in Reflected XSS Filters

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

State of The Art: Automated Black Box Web Application Vulnerability Testing. Jason Bau, Elie Bursztein, Divij Gupta, John Mitchell

ASL IT Security Advanced Web Exploitation Kung Fu V2.0

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

Project 2: Web Security Pitfalls

External Network & Web Application Assessment. For The XXX Group LLC October 2012

WEB APPLICATION VULNERABILITY STATISTICS (2013)

Web Application Attacks And WAF Evasion

What about MongoDB? can req.body.input 0; var date = new Date(); do {curdate = new Date();} while(curdate-date<10000)

Out of the Fire - Adding Layers of Protection When Deploying Oracle EBS to the Internet

SQL Injection. By Artem Kazanstev, ITSO and Alex Beutel, Student

SQL INJECTION IN MYSQL

Cross-Site Scripting

Cross Site Scripting Prevention

Automatic vs. Manual Code Analysis

Document Structure Integrity: A Robust Basis for Cross-Site Scripting Defense

Security Test s i t ng Eileen Donlon CMSC 737 Spring 2008

A Tale of the Weaknesses of Current Client-side XSS Filtering

CSE598i - Web 2.0 Security OWASP Top 10: The Ten Most Critical Web Application Security Vulnerabilities

Detecting and Defending Against Security Vulnerabilities for Web 2.0 Applications

EC-Council CAST CENTER FOR ADVANCED SECURITY TRAINING. CAST 619 Advanced SQLi Attacks and Countermeasures. Make The Difference CAST.

SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova

CS 558 Internet Systems and Technologies

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

Web Application Hacking (Penetration Testing) 5-day Hands-On Course

A Tale of the Weaknesses of Current Client-Side XSS Filtering

Application security testing: Protecting your application and data

Webapps Vulnerability Report

Web Application Scan. Document Revision Initial Report Prepared By: AppCheck-NG Version: 1.0

REDCap General Security Overview

(WAPT) Web Application Penetration Testing

HP WebInspect Tutorial

Complete Cross-site Scripting Walkthrough

Cracking the Perimeter via Web Application Hacking. Zach Grace, CISSP, CEH January 17, Mega Conference

Bypassing Web Application Firewalls (WAFs) Ing. Pavol Lupták, CISSP, CEH Lead Security Consultant

Web Application Security 101

Cross Site Scripting (XSS) and PHP Security. Anthony Ferrara NYPHP and OWASP Security Series June 30, 2011

Java Program Vulnerabilities

How To Fix A Web Application Security Vulnerability

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

Client logo placeholder XXX REPORT. Page 1 of 37

The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.

Automating Security Testing. Mark Fallon Senior Release Manager Oracle

Web Application Security. Vulnerabilities, Weakness and Countermeasures. Massimo Cotelli CISSP. Secure

Web Application Firewalls Evaluation and Analysis. University of Amsterdam System & Network Engineering MSc

Magento Security and Vulnerabilities. Roman Stepanov

Input Validation Vulnerabilities, Encoded Attack Vectors and Mitigations OWASP. The OWASP Foundation. Marco Morana & Scott Nusbaum

Security at Scale: Effective approaches to web application

Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant

QualysGuard WAS. Getting Started Guide Version 3.3. March 21, 2014

Carlos Muñoz Application Security Engineer WhiteHat

The Devils Behind Web Application Vulnerabilities

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

EVADING ALL WEB-APPLICATION FIREWALLS XSS FILTERS

Application Security Testing. Erez Metula (CISSP), Founder Application Security Expert

OWASP TOP 10 ILIA

Adobe Systems Incorporated

Web application vulnerability statistics for

Threat Modeling/ Security Testing. Tarun Banga, Adobe 1. Agenda

elearning for Secure Application Development

Ethical Hacking Penetrating Web 2.0 Security

Blackbox Reversing of XSS Filters

Practical Exploitation Using A Malicious Service Set Identifier (SSID)

Testing the OWASP Top 10 Security Issues

Web Application Firewalls: What the vendors do NOT want you to know SHAKACON III

AppDefend Application Firewall Overview

Web Security Testing Cookbook*

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

Architectural Design Patterns. Design and Use Cases for OWASP. Wei Zhang & Marco Morana OWASP Cincinnati, U.S.A.

Towards More Security in Data Exchange

ASP.NET MVC Secure Coding 4-Day hands on Course. Course Syllabus

Web Application Vulnerability Testing with Nessus

OWASP and OWASP Top 10 (2007 Update) OWASP. The OWASP Foundation. Dave Wichers. The OWASP Foundation. OWASP Conferences Chair

A Server and Browser-Transparent CSRF Defense for Web 2.0 Applications. Slides by Connor Schnaith

Web Application Penetration Testing

Security Research Advisory SugarCRM Cross-Site Scripting Vulnerability

Understanding Cross Site Scripting

Defending against XSS,CSRF, and Clickjacking David Bishop

Integrated Network Vulnerability Scanning & Penetration Testing SAINTcorporation.com

Securing Your Web Application against security vulnerabilities. Ong Khai Wei, IT Specialist, Development Tools (Rational) IBM Software Group

An Analysis of the Effectiveness of Black-Box Web Application Scanners in Detection of Stored XSSI Vulnerabilities

Transcription:

Finding Your Way in Testing Jungle A Learning Approach to Web Security Testing.

Research Questions Why is it important to improve website security? What techniques are already in place to test security? What are the benefits of a learning based web testing approach?

Why is it important to improve web security? Studies show web apps highly vulnerable to security attacks o o report by WASC lists 97,554 detected vulnerabilities 49% of sites contain high-risk vulnerabilities Black-box security testing of web apps is a hard problem o only able to find 58.5% of high-risk vulnerabilities and 12.1% of medium risk Cross-site scripting (XSS) o one of top two web vulnerabilities

Learning Approach to Testing Fresh approach - cast into learning setting Testing algorithm has large database of test payloads If web app s defenses are broken, one of these payloads is able to demonstrate the vulnerability Question: how do we search through payloads to find a good candidate?

XSS Analyzer Learning algorithm for black-box detection of XSS vulnerabilities 500 million test payloads Infers from failed tests which other payloads are also likely to fail and prunes the search space

Example - PHP Sanitizer

Example - PHP Sanitizer filter function sanitizes its input string o o o o deletes all spaces from HTML tags deletes img tags deletes javascript directives contained in href attribute values deletes all tags with no attributes This permits only <a> tags with href values

Example - PHP Sanitizer <script>alert( XSS )</script> Fails due to removal of tags with no attributes Problem with filter : user can replace space character with tab character (\t) <input autofocus onfocus= alert( XSS )> o can penetrate through filter s defense

How XSS Analyzer works 1. Sends basic payload, <script>alert(1)</ script> fails, XSS analyzer learns nothing 2. Sends another: <input type= text onfocus= alert( XSS ) /> fails, but teaches XSS Analyzer a constraint, filter rejects spaces 3. Sends one with tab character <input autofocus onfocus= alert( XSS ) > this will demonstrate vulnerability

What techniques are already in place to test security? Black Box Security Testing Brute Force Testing Random Testing Expert Testing

Brute-Force Testing Accepts as input list of L payloads and iterates over it trying each payload Optimal from coverage standpoint, ensures 0 misses with respect to available payloads High cost of HTTP traffic restricts number of payloads that can be spent on a given input

Random Testing Parameterized by list of payloads L and sample size n n payloads sampled at random are tried with brute-force algorithm Advantage: prevents biases such as giving more weight to payloads in beginning of list Disadvantages: o o interconnections between payloads ignored random testing not reproducible in general

Expert Testing Rely on expert knowledge when making short list of payloads Works really well for average case defects Non-standard or uncommon defects, which are most dangerous, are outside of reach

The Learning Approach Using fingerprinting, we test for structural and bypass attacks Fingerprints are defined by a certain word being used in the attack Bypassing attacks Structural attacks

What does the XSS Analyzer actually do? Tests to find vulnerabilities in the webpage Uses probes to ensure certain attacks are prevented Sees where tests fail, and gathers tokens tl;dr its testing the sanitizer for allowing malicious tokens through

Important Concepts Test Fails: The sanitizer blocks the payload Payload: Set of tokens that represents a client side injection Token: a word in a script, examples being onmouseover or = Sanitizer: removes words from payload

Structural XSS Analyzer When a test fails, the analyzer parses the payload to find out what happened for each token send to website if token is not accepted add it to the constraint list

Bypass Strategy In addition to structural constraints, the analyzer checks bypass strategies A bypass strategy is if someone is using a similar word that could become a word used in a XSS attack These words are added to a mapping, so the analyzer knows what the word maps back to

Bypass Example <script> Test fails, but now XSS Analyzer knows that script is a constraint <SCscriptRIPT> Test passes, uncovers a flaw in the filter which allows the bypass SCscriptRIPT to be used

This all works together Create a new set of constraints, structural and bypass while there are more payloads traverse tokens replace bypass tokens with mapping test if modified payload is blocked by sanitizer if blocked : run structural analysis for each token sanitized, try bypass mapping if accepted : try next payload

What are the benefits of a learning based web testing approach? Better Quicker More awesome

Testing Experiment XSS Analyzer, along with 21 other testing alternatives were compared with one another 15,552 different server side defenses defenses contain wide rang of sanitization and validation strategies

Performance and Coverage Coverage: measured by the total number of vulnerabilities detected Performance: average the number of requests sent by the testing algorithm in total

Analysis of Results Two issues addressed: (1) overall value of each algorithm and (2) viability of random algorithms.

Overall Value Measuring the effectiveness of each of the testing algorithms by computing a normalized ratio between the total number of detected vulnerabilities, v, and the total number of requests r log(10^3*(v/r))

Overall Value Normalized ratio between findings and sent requests

Overall Value Coverage vs Performance

Random Testing The rate at which coverage improves decays significantly

In conclusion.. XSS Analyzer is being enhanced Glass box Address more issues Developed by IBM, learn more about it at their blogspot! tinyurl.com/xssanalyzer

Questions What are the benefits of a learning based web testing approach? Why is R100 considered to be wasteful? How does the XSS Analyzer complement the sanitizer?

Questions How could the learning technique be applied to non-web based programs? How may this approach be data heavy? Why is black-box security testing generally a hard problem?