Black Box Scanning Tool + White Box Testing Tool Toshis Black Box - - PowerPoint PPT Presentation

black box scanning tool white box testing tool toshi s
SMART_READER_LITE
LIVE PREVIEW

Black Box Scanning Tool + White Box Testing Tool Toshis Black Box - - PowerPoint PPT Presentation

Toshis Approach to Runtime Analysis Black Box Scanning Tool + White Box Testing Tool Toshis Black Box Scanning Tool Same approach as: Cenzic SPI Dynamics Watchfire Toshis tool is unique because: Built on Microsoft Visual Studio


slide-1
SLIDE 1

Toshi’s Approach to Runtime Analysis

Black Box Scanning Tool + White Box Testing Tool

slide-2
SLIDE 2

Toshi’s Black Box Scanning Tool Same approach as:

Cenzic SPI Dynamics Watchfire

Toshi’s tool is unique because:

Built on Microsoft Visual Studio 2005 platform Reuses Web application testing capabilities Builds on existing test scripts (not useful today; we didn’t give him any scripts)

slide-3
SLIDE 3

Black Box Scanning

1) Traversing the application

  • Manual
  • Automated

2) Testing the application

  • Signature analysis
  • Behavioral analysis
slide-4
SLIDE 4

Traversing: Manual Crawl Manually map the application’s interface Advantages

Can often achieve higher coverage

Disadvantages

Time consuming

slide-5
SLIDE 5

Traversing: Automated Crawl Enter starting URL and map the interface automatically Advantages

Easy to use Sometimes comprehensive

Disadvantages

Cannot crawl complex web applications Make take a long time, looping redundant pages

slide-6
SLIDE 6

Black Box Scanning

1) Traversing the application

  • Manual
  • Automated

2) Testing the application

  • Signature analysis
  • Behavioral analysis
slide-7
SLIDE 7

Testing: Signature Analysis Search for specific strings in the HTTP response Example: SQL injection

“SQLException” “OLE DB Provider”

slide-8
SLIDE 8

Testing: Behavioral Analysis I dentify behavior indicative of a vulnerability Example: Blind SQL I njection

  • 1. I nject original clause: id= 3
  • 2. I nject true clause: id= 3 AND 1= 1
  • 3. I nject false clause: id= 3 AND 1= 0
  • 4. I f

(original= = true && true != false) then report SQL injection

slide-9
SLIDE 9

Advantages Black Box Scanning Advantages

I f you have a running application, you can test it Bugs are easy to verify (reproduce)

slide-10
SLIDE 10

Disadvantages: Low Coverage

You can’t test what you can’t reach

Application Tested Vulnerabilities Not Found Untested Vulnerabilities Found

slide-11
SLIDE 11

Disadvantage: Missing Oracles

Some vulnerabilities not visible from Web

Application Log File Client

I hope they’re not logging my CC# into plaintext log file

Credit card # CC #

“Your order will be processed in 2 days”

HTTP Response

slide-12
SLIDE 12

Toshi’s Special Sauce: White Box Testing Tool I nsert monitors around security-relevant API s

Sources of input Web: ServletRequest.getParameter(String) Sinks Database: SQLStatement.executeQuery(String) Process: Runtime.exec(String) File: Log.log(String)

Look for potential problems

slide-13
SLIDE 13

Combats Black Box Limitations Coverage

Percentage of security-relevant API s exercised

Code-level details

File name, line number and API details for bugs

I mproved oracles

Vulnerabilities not evidenced on Web

slide-14
SLIDE 14

Black Box Scan + White Box Testing Tool

Web Scanner Web Application Application Server HTTP Database File System Other Apps

and Proposal

Verify Results Verify Results Verify Results Verify Results Watch Result

slide-15
SLIDE 15

How To I nject Monitors Monitor code written as aspects Use aspect-oriented technology

AspectJ (Java) AspectDNG ( .NET)

Works on bytecode

Java class files & .NET MSI L (no source code required)

slide-16
SLIDE 16

Bytecode I njection: Process

Original .class AspectJ New .class New Code and Location

slide-17
SLIDE 17

Bytecode I njection: Result

List getStuff(String id) { List list = new ArrayList(); try { String sql = “select stuff from mytable where id= ‘” + id + “’”; JDBCstmt.executeQuery(sql); } catch (Exception ex) { log.log(ex); } return list; } List getStuff(String id) { List list = new ArrayList(); try { String sql = “select stuff from mytable where id= ‘” + id + “’”; MyLibrary.doCheck(sql); JDBCstmt.executeQuery(sql); } catch (Exception ex) { log.log(ex); } return list; }

Before “executeQuery()” Call “MyLibrary.doCheck()”

slide-18
SLIDE 18

Summary Black box scanner

Smart fuzzer (uses specific attack strings) Oracles with signatures and behavioral analysis

White box testing tool

I nject monitors Provide coverage, code details, enhanced oracle