Top Banner
Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software
19

Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Jun 27, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Comparing Application Security Tools

Defcon 15 - 8/3/2007

Eddie LeeFortify Software

Page 2: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Agenda

Intro to experimentMethodology to reproduce experiment on your ownResults from my experimentConclusions

Page 3: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Introduction

Tools Used“Market Leading” Dynamic Testing ToolsA Static Code AnalyzerDynamic Test Tracing Tool

The ApplicationOpen source Java based Bloghttp://pebble.sourceforge.netReasons for choosing this application

The ExperimentOut of the box scansCompared findings from each tool

Page 4: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

How The Tools Work

Dynamic Testing ToolsFuzz web form inputSignature and Behavioral MatchingModes of Scanning

Auto-crawlManual crawl

Static Code AnalyzerData flowControl flowSemantic

Dynamic Test Tracing ToolBytecode instrumentationMonitor data coming in and out of the applicationRun in conjunction with other dynamic testing tools

Page 5: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Methodology

Page 6: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

How to reproduce experiments on your own (Dynamic Testing Tools)

Download source codeBuild & Deploy ApplicationFigure out how to cleanly undeploy the application

Clear database or stored filesRun scanner in mode auto-crawl mode

Make sure the application doesn’t break during your scansIf the app breaks, figure out why the scanner breaks the app. Configure scanner to ignore the parameter(s) causing app to break

Note the parameter(s) won’t be tested for vulnerabilities and the existence of a DoS vulnerability

Undeploy and Redeploy the applicationRepeat

Save the results from your last clean runRepeat for scanner in mode manual-crawl mode

Verify the resultsVerify results through manually testingRecord false positive rateNormalize results

Record source file and line number information where vulnerabilities occur

Page 7: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

How to reproduce experiments on your own (Static Testing Tool)

Not much to itPoint the scanner at code and tell it where it can find needed libraries

Scan the same code you use in other testsVerify results are true positives and weed out false positives

Verify results through manually testing on running applicationRecord false positive rateNormalize the results

Page 8: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

How to reproduce experiments on your own (Dynamic Tracing Tool)

Instrument the compiled codeDeploy instrumented codeStart recordingPerform dynamic testingStop recordingVerify results are true positives and weed out false positives

Verify results through manually testing on running applicationRecord false positive rateNormalize the results

Page 9: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Setup and Result Quantification

Tool Configuration and Setup Dynamic Testing Tools

Modes of operation: Auto Crawl & Manual CrawlMinor tweaking for the application

Quantification of ResultsTools report vulnerabilities in different unitsStandardized on location in source code where vulnerability occurs

Normalized reported numbersUse the normalized vulnerability counts for comparison among tools

Page 10: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Results

Page 11: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Results: Overview

X-Unique to Tool

X-Multiple Tools

Page 12: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Results: Overview

XSStitlesaveBlogEntry.secureaction16blogEntry.jsp

CategoryParameterURLLine #File

XX

Tool #5aTool #4aTool #3aTool #2bTool #2aTool #1bTool #1a

Page 13: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Results: Overview

X-Unique to Tool

X-Multiple Tools

Page 14: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Results: Exploit Examples

Cross-Site ScriptingError.jsp:18

Code:Request URI : ${pageContext.request.requestURI}

Attack:http://host/pebble/</textarea><script>alert(123)</script>/createDirectory.secureaction?type=blogFile

viewResponses.jsp:31Code:

<input type="hidden" name="type" value="${param.type}" />Attack:

http://host/pebble/viewResponses.secureaction?type="><script>alert(1)</script>

Page 15: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Results: Exploit Examples

Path ManipulationDefaultSecurityRealm.java:213

Code:return new File(getFileForRealm(), username + ".properties");

Attack: http://host/pebble/saveUser.secureaction?username=../../../../../../../../etc/passwd%00&n

ewUser=true&name=joe&[email protected]&website=blah.com

Arbitrary URL RedirectionRedirectView.java:85

Code:response.sendRedirect(getUri());

Attack:http://host/pebble/logout.action?redirectUrl=http://www.attacker.com

Page 16: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Results: Manual Audit

Vulnerabilities not detected by any tool (from just one file)

Page 17: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Cross-Site Scripting Detection By Tool

Tool 1b

Tool 1b and Tool 2b

Tool 2b

Not detected by any tool

Tool 5a

Detected by all tools

*1a, 2a, 3a and 4a not shown because findings were not significant

Page 18: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Conclusions

A single tool doesn’t cut itUsing multiple tools significantly increases vulnerabilities found

Little overlap between toolsTools alone aren’t enoughRun these tests on your own apps to see how they perform in your environmentFuzzing tools break shit

Takes a long time to scan and troubleshoot the applicationDon’t expect these tests to be quick

Page 19: Comparing Application Security Tools - DEF CON · Comparing Application Security Tools Defcon 15 - 8/3/2007 Eddie Lee Fortify Software

Q&A

Thanks!