Using Sprajax to Test AJAX. OWASP AppSec Seattle Oct 2006. The OWASP Foundation http://www.owasp.org/



Similar documents
Introduction to Web Application Security. Microsoft CSO Roundtable Houston, TX. September 13 th, 2006

Agile and Secure: OWASP AppSec Seattle Oct The OWASP Foundation

Adobe Systems Incorporated

Turning the Battleship: How to Build Secure Software in Large Organizations. Dan Cornell May 11 th, 2006

Vulnerability Management in an Application Security World. AppSec DC November 12 th, The OWASP Foundation

(WAPT) Web Application Penetration Testing

Detecting and Defending Against Security Vulnerabilities for Web 2.0 Applications

Bust a cap in a web app with OWASP ZAP

Hybrid Analysis Mapping: Making Security and Development Tools Play Nice Together. Dan Cornell. CTO, Denim

Learning objectives for today s session

Black Box versus White Box: Different App Testing Strategies John B. Dickson, CISSP

Web Application Penetration Testing

Application Code Development Standards

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

Web application testing

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

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Evaluation of Penetration Testing Software. Research

WHITEPAPER. Nessus Exploit Integration

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

Remediation Statistics: What Does Fixing Application Vulnerabilities Cost?

Attack Vector Detail Report Atlassian

Security vulnerabilities in new web applications. Ing. Pavol Lupták, CISSP, CEH Lead Security Consultant

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications

An Introduction to Application Security in J2EE Environments

Aiming at Higher Network Security Levels Through Extensive PENETRATION TESTING. Anestis Bechtsoudis. abechtsoudis (at) ieee.

Detecting Web Application Vulnerabilities Using Open Source Means. OWASP 3rd Free / Libre / Open Source Software (FLOSS) Conference 27/5/2008

Chapter 1 Web Application (In)security 1

Web Application Threats and Vulnerabilities Web Server Hacking and Web Application Vulnerability

Mobile Security Framework

Excellence Doesn t Need a Certificate. Be an. Believe in You AMIGOSEC Consulting Private Limited

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

Web Application Vulnerability Testing with Nessus

Adobe ColdFusion. Secure Profile Web Application Penetration Test. July 31, Neohapsis 217 North Jefferson Street, Suite 200 Chicago, IL 60661

HackMiami Web Application Scanner 2013 PwnOff

Strategic Information Security. Attacking and Defending Web Services

ABC LTD EXTERNAL WEBSITE AND INFRASTRUCTURE IT HEALTH CHECK (ITHC) / PENETRATION TEST

Revisiting SQL Injection Will we ever get it right? Michael Sutton, Security Evangelist

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

Application Security Testing

Web application security: Testing for vulnerabilities

How To Write A Web Application Vulnerability Scanner And Security Auditor

Security Testing For RESTful Applications

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

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

SANDCAT THE WEB APPLICATION SECURITY ASSESSMENT SUITE WHAT IS SANDCAT? MAIN COMPONENTS. Web Application Security

Intrusion detection for web applications

NoSQL, But Even Less Security Bryan Sullivan, Senior Security Researcher, Adobe Secure Software Engineering Team

Conducting Web Application Pentests. From Scoping to Report For Education Purposes Only

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

Web Application Security

Bank Hacking Live! Ofer Maor CTO, Hacktics Ltd. ATC-4, 12 Jun 2006, 4:30PM

Improving Web Application Security by Eliminating CWEs Weijie Chen, China INFSY 6891 Software Assurance Professor Dr. Maurice Dawson 15 December 2015

STOPPING LAYER 7 ATTACKS with F5 ASM. Sven Müller Security Solution Architect

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

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

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

Recon and Mapping Tools and Exploitation Tools in SamuraiWTF Report section Nick Robbins

Web Application Security

Security Products Development. Leon Juranic

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

OWASP Top Ten Tools and Tactics

Java Web Application Security

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

Using Nessus In Web Application Vulnerability Assessments

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

Webapps Vulnerability Report

Client Side Cross Site Scripting

Security Testing with Selenium

Exploiting Web 2.0 Next Generation Vulnerabilities

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

The Dark Side of Ajax. Jacob West Fortify Software

Ruby on Rails Secure Coding Recommendations

Magento Security and Vulnerabilities. Roman Stepanov

Security Research Advisory IBM inotes 9 Active Content Filtering Bypass

Automatic vs. Manual Code Analysis

How to Build a Trusted Application. John Dickson, CISSP

Information Supplement: Requirement 6.6 Code Reviews and Application Firewalls Clarified

Web application security

Web Application Security

Smashing Web Apps Applying Fuzzing to Web Applications and Web Services. Michael Sutton, Security Evangelist

Security Testing for Developers using OWASP ZAP

JavaScript static security analysis made easy with JSPrime

Transcription:

Using Sprajax to Test AJAX Security OWASP AppSec Seattle Oct 2006 Dan Cornell, OWASP San Antonio Leader Principal, Denim Group, Ltd. dan@denimgroup.com (210) 572-4400 Copyright 2006 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 2.5 License. To view this license, visit http://creativecommons.org/licenses/by-sa/2.5/ The OWASP Foundation http://www.owasp.org/

OWASP AppSec Seattle 2006 2

Agenda Introduction AJAX Security Basics Current Black Box Scanners Issues with Current Scanners How Sprajax is Different Demonstration Sprajax Approach and Architecture Example: Microsoft Atlas Support Next Steps Questions OWASP AppSec Seattle 2006 3

Introduction Dan Cornell Principal Pi i lof fdenim Group, Ltd. MCSD, Java 2 Certified Programmer OWASP AppSec Seattle 2006 4

AJAX Security Basics Shares many principles with normal web application security Risks are poorly understood AJAX increases an application s attack surface Same problems as before: SQL injection Parameter tampering Authentication/Authorization issues OWASP AppSec Seattle 2006 5

Why Sprajax? Deal with the issue of increased attack surface Deal D l with the issue of multiple l AJAX frameworks OWASP AppSec Seattle 2006 6

Current Black Box Scanners Current scanners are good at scanning traditional web applications Pages, forms, parameters Normal HTTP request are easy to craft Current scanners have limited AJAX abilities Scan JavaScript for URLs Parse/execute JavaScript to find endpoints OWASP AppSec Seattle 2006 7

Issues with Current Scanners AJAX applications often use frameworks that build on top of raw XMLHttpRequest Frameworks do not necessarily use plain HTTP requests JSON for Atlas Serialized Java for Google Web Toolkit And so on Normal HTTP POST data: key=zen+and+the+art+of+motorcycle+maintenance&key=cryptonomicon JSON HTTP POST data: [ Zen and the Art of Motorcycle Maintenance, Cryptonomicon ] If the AJAX framework expects JSON (or something else) it will never see normally-formatted requests OWASP AppSec Seattle 2006 8

Normal HTTP Request Sent to Web Application OWASP AppSec Seattle 2006 9

Normal HTTP Requests Sent to AJAX Framework OWASP AppSec Seattle 2006 10

How Sprajax Is Different Spiders web applications as current scanners do Detects D t t AJAX frameworks in use Detects AJAX-specific endpoints for the frameworks in use Fuzzes endpoints using framework-appropriate HTTP requests OWASP AppSec Seattle 2006 11

AJAX Web Request Sent to AJAX Framework OWASP AppSec Seattle 2006 12

Types of Vulnerabilities Technical Vulnerabilities Surface due to insecure programming techniques Typically due to poor input handling, input validation and output handling and escaping Most scanner tools primarily il find technical vulnerabilities i Remediation: coding changes Logical Vulnerabilities Surface due to insecure program logic Typically due to poor decisions about trust Most scanner tools are powerless to find logical vulnerabilities Most scanner tools are powerless to find logical vulnerabilities Remediation: architecture and design changes OWASP AppSec Seattle 2006 13

Sprajax Limitations Should actually be limitations of automated black-box box testing Can find technical application flaws SQL Q injection Cross site scripting (XSS) Bad error handling Can t find logicall application flaws Many parameter and cookie tampering flaws Authentication/authorization Not a limitation of the tool, but a limitation of the approach OWASP AppSec Seattle 2006 14

Demonstration Simple Sprajax demonstration on a Microsoft Atlas site Simple Sprajax demonstration on a Google Web Toolkit site Footprinting and fuzzing are in-progress OWASP AppSec Seattle 2006 15

Sprajax Approach and Architecture NOTE: Included Open Source packages do not necessarily endorse Sprajax Spider the web site Uses Jeff Heaton s C# spider (www.jeffheaton.com) Determine what frameworks are in use Look at included JavaScript files Enumerate AJAX endpoints Plugin architecture watches pages and tags through the course of the spidering Implement DocumentWorkerListener interface Fuzz the endpoints with framework-appropriate requests Microsoft Atlas uses SOAP web services with JSON Uses DynWSLib for dynamic SOAP client creation (www.thinktecture.com) OWASP AppSec Seattle 2006 16

Sprajax Fuzzing Use a list of interesting values for various data types: String: string.empty, JUNK, JUNK and so on Integer: int.minvalue, -1025, -1024, -1023, -1, 0, 1 and so on Single Float: float.minvalue, float.maxvalue, float.nan, float.negativeinfinity, float.positiveinfinity, 0.0 and so on OWASP AppSec Seattle 2006 17

Sprajax Fuzzing Fuzzing creates an n-dimensional search space based on lists of primitives Strings: currently 6 Integers: currently 25 Single Floats: currently 9 Double Floats: currently 9 MyMethod(int) 1D - 25 calls MyMethod2(int, string) 2D 150 calls MyMethod3(int, int, string) 3D 3750 calls Adding multi-threadingthreading will be key going forward OWASP AppSec Seattle 2006 18

Example: Microsoft Atlas Support Included files that are an indicator Atlas.js j (older versions) WebResource.axd Web Service endpoints indicated by: <page xmlns:script="http://schemas.microsoft.com/xml-script/2005"> <references> <add src="services/userservice.asmx/js onscriptload="userservice.path = '/DenimGroup.Sprajax.Atlas.DemoSite/Services/UserService.asmx'" /> Valid requests make calls to SOAP Web Services Object serialization uses JSON rather than XML ["Zen and the Art of Motorcycle Maintenance","Cryptonomicon"] OWASP AppSec Seattle 2006 19

Next Steps More modular persistence support Add support for more AJAX frameworks Increase sophistication of testing Improve fuzzing Break out into individual tools OWASP AppSec Seattle 2006 20

Next Steps: More Modular Persistence Support Right now SQL Server 2005 is required Not t really necessary how many people need to compare results across scans at the current time People have requested MySQL support Side note: Run using Mono? Replace current implementation with a Provider model Support for SQL Server, MySQL (perhaps) p and in- memory OWASP AppSec Seattle 2006 21

Next Steps: More AJAX Frameworks Google Web Toolkit (GWT) Detection already works Finding endpoints is more complicated but not impossible Requests appear to send serialized Java objects Direct Web Remoting (DWR) And A d so on at tleast tdetect tall major frameworks and fuzz test the most popular Next release will have more modular design so that the plugins can be developed and maintained separately OWASP AppSec Seattle 2006 22

Next Steps: Increase Sophistication of Testing Current: Only looking for error responses SOAP errors Can tag inputs as being associated with a vulnerability type (SQL injection, Cross Site Scripting, etc) Can flag suspicious text in error messages ODBC SQL Test for injection attacks that might not result in errors Could also add tests for flawed versions of AJAX frameworks More like what you would see from Nessus OWASP AppSec Seattle 2006 23

Next Steps: Improve Fuzzing Multi-threading will be key Current C t only methods with primitive iti parameters are supported Add support for objects with properties as their own n-dimensional spaces to be traversed Will eventually need to get smart about which combinations are selected Selectively choose input patterns Data mine the results OWASP AppSec Seattle 2006 24

Next Steps: Break Out Into Individual Tools This would assist in manual vulnerability testing SOAP Web Services Fuzzer GWT Request Crafter JSON Console And so on OWASP AppSec Seattle 2006 25

Questions Dan Cornell dan@denimgroup.com (210) 572-4400 Sprajax Site: www.owasp.org/index.php/sprajax org/index php/sprajax Sprajax Mailing List: owasp-sprajax@lists.owasp.org Denim Group Website: www.denimgroup.com Denim Group Blog: denimgroup.typepad.com OWASP AppSec Seattle 2006 26