Closing the Gap: Analyzing the Limitations of Web Application Vulnerability Scanners David Shelly Randy Marchany Joseph Tront Virginia Polytechnic Institute.

Slides:



Advertisements
Similar presentations
PHP Form and File Handling
Advertisements

Nick Feamster CS 6262 Spring 2009
Webgoat.
© 2008 Security Compass inc. 1 Firefox Plug-ins for Application Penetration Testing Exploit-Me.
HI-TEC 2011 SQL Injection. Client’s Browser HTTP or HTTPS Web Server Apache or IIS HTML Forms CGI Scripts Database SQL Server or Oracle or MySQL ODBC.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike.
OWASP WEBGOAT Alaa Darabseh Department of Computer Science
AUTOMATED DISCOVERY OF PARAMETER POLLUTION VULNERABILITIES IN WEB APPLICATIONS Marco Balduzzi, Carmen Torrano Gimenez, Davide Balzarotti, and Engin Kirda,
Attacking Session Management Juliette Lessing
Automating Bespoke Attack Ruei-Jiun Chapter 13. Outline Uses of bespoke automation ◦ Enumerating identifiers ◦ Harvesting data ◦ Web application fuzzing.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
Leveraging User Interactions for In-Depth Testing of Web Application Sean McAllister Secure System Lab, Technical University Vienna, Austria Engin Kirda.
Handling Security Threats in Kentico CMS Karol Jarkovsky Sr. Solution Architect Kentico Software
Presenter Deddie Tjahjono.  Introduction  Website Application Layer  Why Web Application Security  Web Apps Security Scanner  About  Feature  How.
Web Application Vulnerabilities Checklist. EC-Council Parameter Checklist  URL request  URL encoding  Query string  Header  Cookie  Form field 
Nikto LUCA ALEXANDRA ADELA. Nikto  Web server assessment tool  Written by Chris Solo and David Lodge  Released on December 27, 2001  Stable release:
Web-based Document Management System By Group 3 Xinyi Dong Matthew Downs Joshua Ferguson Sriram Gopinath Sayan Kole.
Martin Kruliš by Martin Kruliš (v1.0)1.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Security.NET Chapter 1. How Do Attacks Occur? Stages of attack Examples of attacker actions 1. FootprintRuns a port scan on the firewall 2. PenetrationExploits.
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
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.
Penetration Testing James Walden Northern Kentucky University.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Web 2.0 Security James Walden Northern Kentucky University.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 5 “Database and Cloud Security”.
OSI and TCP/IP Models And Some Vulnerabilities AfNOG th May 2011 – 10 th June 2011 Tanzania By Marcus K. G. Adomey.
Online Translation Service Capstone Design Eunyoung Ku Jason Roberts Jennifer Pitts Gregory Woodburn Kim Tran.
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
Software Project Documentation. Types of Project Documents  Project Charter  Requirements  Mockups and Prototypes  Test Cases  Architecture / Design.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
NMD202 Web Scripting Week3. What we will cover today Includes Exercises PHP Forms Exercises Server side validation Exercises.
OWASP Top Ten #1 Unvalidated Input. Agenda What is the OWASP Top 10? Where can I find it? What is Unvalidated Input? What environments are effected? How.
Analysis of SQL injection prevention using a filtering proxy server By: David Rowe Supervisor: Barry Irwin.
Prof Frankl, Spring 2008CS Polytechnic University 1 Overview of Web database applications with PHP.
SEC835 Runtime authentication Secure session management Secure use of cryptomaterials.
Beyond negative security Signatures are not always enough Or Katz Trustwave ot.com/
APPLICATION PENETRATION TESTING Author: Herbert H. Thompson Presentation by: Nancy Cohen.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
Web Applications Testing By Jamie Rougvie Supported by.
Evaluating & Maintaining a Site Domain 6. Conduct Technical Tests Dreamweaver provides many tools to assist in finalizing and testing your website for.
Web Security Group 5 Adam Swett Brian Marco. Why Web Security? Web sites and web applications constantly growing Complex business applications are now.
PHP Error Handling & Reporting. Error Handling Never allow a default error message or error number returned by the mysql_error() and mysql_errno() functions.
 Shopping Basket  Stages to maintain shopping basket in framework  Viewing Shopping Basket.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
What Is XSS ? ! Cross-site scripting (XSS) is a type of computer security vulnerability typically found in Web applications. XSS enables attackers to.
Example – SQL Injection MySQL & PHP code: // The next instruction prompts the user is to supply an ID $personID = getIDstringFromUser(); $sqlQuery = "SELECT.
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,
Javascript worms By Benjamin Mossé SecPro
Group 18: Chris Hood Brett Poche
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Static Detection of Cross-Site Scripting Vulnerabilities
A Security Review Process for Existing Software Applications
PHP Training at GoLogica in Bangalore
PHP / MySQL Introduction
CSC 495/583 Topics of Software Security Intro to Web Security
Lecture 2 - SQL Injection
PHP Forms and Databases.
Enterprise Class Security Scanner
Presentation transcript:

Closing the Gap: Analyzing the Limitations of Web Application Vulnerability Scanners David Shelly Randy Marchany Joseph Tront Virginia Polytechnic Institute and State University

Purpose 2 To analyze the limitations of web application scanners by using both a secure and insecure version of a custom-built web application Identify scanner weaknesses Improve scanner detection techniques Reduce false-negatives and false-positives

Problem > 60% of attacks seen on Internet aimed at web applications [SANS 2009] Web application vulnerability scanners are not capable of detecting all of the vulnerabilities and attack vectors that exist Numerous false-negatives and false- positives False sense of web application security Web application flaws remain unpatched

Relevant Vulnerabilities SQL Injection Cross-Site Scripting (XSS) Session Management Flaws

Web Application Scanners

Related Work Evaluation Applications WebMaven’s BuggyBank Foundstone’s Hacme Bank, Hacme Shipping, Hacme Travel Evaluation Techniques Scan publicly available web applications Benchmark system

Related Work Evaluation Applications WebMaven’s BuggyBank Foundstone’s Hacme Bank, Hacme Shipping, Hacme Travel Evaluation Techniques Scan publicly available web applications Benchmark system

Test Bed Design

Client-Side Features Regular users Submit, assess, purchase, and categorize products Password reminder Register new user Edit account settings Administrator users Add other administrators Approve/deny uploaded templates and item categorizations View validated templates

Server-Side Features Database Users table (10 regular, 1 administrator) Categories table (12 static, 1 custom) Categorize table (15 uncategorized, 5 categorized) Items table (10 available) Templates 5 validated item templates 5 awaiting approval

Vulnerabilities Implemented SQL Injection Form input (12) Cookie Variable (8) Session Management Predictable session ID (1) Unprotected variables (9) Cross-Site Scripting Reflected (10) Stored (6) DOM-based (1)

SQL Injection Example

XSS Injection Example

Session Management Example

Methodology CentOS 4.4 MySQL 4.1 Apache 2.0 PHP Most popular web server technologies:

Methodology Controlled benchmark environment: Controlled variables Web server technologies Independent variables Number of deliberate vulnerabilities Dependent variables Observed false positives and false negatives

Methodology Black-box and White-box Analysis: Black-box Analysis Perspective of client-side user Manipulates user supplied input White-box Analysis Source code is available Verify actual number of vulnerabilities

Testing Approach Phases: 1. Initialization 3. Classification 2. Execution4. Analysis

Initialization 1. Restore the MySQL database to its original state 2. Delete all client side and server side cookies 3. Restore the entire web server directory with a clean backup 4. Restart the web server

Execution 1. Configure the web application vulnerability scanner (primarily default settings) 2. Start Wireshark packet capturing 3. Execute the web application vulnerability scan 4. Stop Wireshark packet capturing and save the trace 5. Save the contents of the database, cookie files, and scanner results

Classification False Positives: 1. The scan result is due to an application robustness problem (error page, format exception, etc.) and not a vulnerability 2. Normal operation of the web application results in the same error/problem 3. Source code analysis determines scan result is incorrect 4. The results duplicate a vulnerability that has already been accounted for Note: Repeated input forms that are displayed recursively on a web page are not considered duplicate vulnerabilities if they are detected multiple times by a web application scanner (e.g. user comment boxes)

Analysis HTTP requests and responses Client and server cookies Database copies Scanner result reports

SQL Injection Results – Form Inputs

SQL Injection Results – Cookie Variables

XSS Injection Results - Reflected

XSS Injection Results - Stored

XSS Injection Results – DOM-based

Session Management Results – Predictable SID

Session Management Results – Insecure Cookie Variables

False Positives – SQL Injection

False Positives – XSS Injection

Analysis – SQL Injection False Negatives Unable to recognize reflected SQL error in response page Required fields not completed (ex: register and log-in forms need more than one input) Cookie variables not tested for injection Improvements Flag any error or warning response as suspected vulnerability (information disclosure) All possible combinations of form inputs should be tested Add cookie variables to list of parameters to be checked

Analysis – SQL Injection False Positives Duplicate entries reported Tested both GET and POST methods Multiple exploit strings for same vulnerability instance Blind SQL injection returned the same HTML page Improvements Only report the implemented HTTP method (unless both methods are supported) Verify vulnerability using multiple exploit scenarios, but only report SQL injection vulnerability once Blind SQL injection tests should use time delay statements

Analysis – XSS Injection False Negatives Required fields not completed Did not test all possible user supplied input (DOM variable, cookie variables, and uploadable files) Stored XSS detected through reflected techniques (relies on SQL error pages) Improvements Attempt every combination of form inputs Test all parameters (even search embedded scripts) Use unique injection strings and then crawl web application multiple times searching for string

Analysis – XSS Injection False Positives Duplicate entries reported Same exploit string with different set of parameters (causes request to appear different) Improvements Same as SQL injection Verify vulnerability using multiple exploit scenarios, but only report one XSS vulnerability per input form

Analysis – Session Management False Negatives Did not attempt to manipulate cookie to perform session hijacking (only tested for information disclosure) Most determined cookie not set as HttpOnly Only tested for session management vulnerabilities using information from initial connection Improvements Tamper with all unprotected session variables throughout the application (check if response page different) Analyze SIDs for strong algorithm

Analysis – Other Findings Possible explanations Overload of requests Server not producing proper response pages Scanners not handling all of server responses Failures in spidering techniques Scanners missing parameters and links while crawling Did not test initial log-in page Improvements Monitor current connection speed and throttle number of simultaneous connections Test all pages and variables within scope of web application

Conclusions Scanners detect simple forms of reflected XSS and SQL injection relatively well Work still needs to be done to detect non-traditional instances of these vulnerabilities Most false-positives observed from insecure version of web application Expected secure version to produce false-positives Did not test enough of the input parameters Better to use multiple web application scanners Combined results better than any one individually

Future Work Expand to include analysis of other web application technologies and server configurations Web 2.0 technologies (Ajax, Flash, Ruby, Python) Develop black-box web application scanner Using proposed techniques

Questions security.vt.edu