Secure in 2010? Broken in 2011! Matias Madou, PhD Principal - - PowerPoint PPT Presentation

secure in 2010 broken in 2011
SMART_READER_LITE
LIVE PREVIEW

Secure in 2010? Broken in 2011! Matias Madou, PhD Principal - - PowerPoint PPT Presentation

Secure in 2010? Broken in 2011! Matias Madou, PhD Principal Security Researcher Matias Madou Principal Security Researcher, Fortify an HP Company Static Analysis Rules Insider Threat Research Runtime products: RTA and


slide-1
SLIDE 1

Secure in 2010? Broken in 2011!

Matias Madou, PhD Principal Security Researcher

slide-2
SLIDE 2

Matias Madou

  • Principal Security Researcher,

Fortify an HP Company

– Static Analysis Rules – Insider Threat Research – Runtime products: RTA and SecurityScope – Hybrid 2.0: Correlation – Gray-box analysis

  • Contributor to Building Security

in Maturity Model (BSIMM) Europe

  • History in code obfuscation (and binary rewriting)
slide-3
SLIDE 3
  • Introduction
  • The Test Application: Secure in 2010
  • What’s new in 2011?

– New vulnerabilities – New analysis techniques

  • Continues Testing

Overview

slide-4
SLIDE 4

History of the experiment: Gather empirical results while developing gray-box analysis. Test Application, criteria:

  • Extensively used
  • Undergone security improvements

Introduction

slide-5
SLIDE 5
  • Selection criteria for the project working on:

– Open source, java or .NET – Widely used

  • Apache 10.04

The Test Application

slide-6
SLIDE 6
  • Products and Projects based on Apache OFBiz:

– OpenTaps

The Test Application

slide-7
SLIDE 7
  • End Users:

– 1-800-Flowers – Olympus.de – United.com – BT.com – …

The Test Application

slide-8
SLIDE 8
  • Security?

– Multiple vulnerabilities found in CVE – Other (Exploit Search) – … and an interesting video on how to become an admin by exploiting a XSS

The Test Application

slide-9
SLIDE 9

The Test Application

slide-10
SLIDE 10

The Test Application

slide-11
SLIDE 11

The Test Application

slide-12
SLIDE 12
  • Bug Tracking: Security Issues grouped together

The Test Application

slide-13
SLIDE 13
  • In the end: All known issues are fixed in

Apache OFBiz 10.04

The Test Application

Secure in 2010!

slide-14
SLIDE 14

1) New vulnerabilities: Denial-of-service: Parse Double 2) Analysis techniques: Gray box analysis

So… what’s new in 2011?

slide-15
SLIDE 15
  • Problem description:

Denial-of-Service: Parse Double

slide-16
SLIDE 16

More concrete:

  • Value:
  • API:

Infinite loop!

Denial-of-Service: Parse Double

http://blog.fortify.com/blog/2011/02/08/Double-Trouble 2.2250738585072012e-308 Double.parseDouble(value)

slide-17
SLIDE 17
  • Feb 01, 2011? No, no. March 04, 2001!
  • Why is this fixed within 1 month after the

rediscover?

Denial-of-Service: Parse Double

slide-18
SLIDE 18

Examples:

  • Application:
  • Usage:

Infinite loop!

Denial-of-Service: Parse Double

http://blog.fortify.com/blog/2011/02/08/Double-Trouble Apache Tomcat Tomcat uses parseDouble() on the value of the Accept-Language HTTP header when an application calls request.getLocale()

slide-19
SLIDE 19

What is the problem?

  • Root case is a Java problem, not an application

problem!

  • Everybody uses the fixed java version, right?

(Version Java 6 Update 24 or later)

  • Everybody runs a patched or latest Tomcat

version, right? (Tomcat 7.0.8, 6.0.32, 5.5.33 or later)

Denial-of-Service: Parse Double

slide-20
SLIDE 20

Tomcat fix

Denial-of-Service: Parse Double

slide-21
SLIDE 21

Java fix

Denial-of-Service: Parse Double

slide-22
SLIDE 22
  • Seen in the field: adding the pattern to WAF
  • Problems:
  • 1. Does not protect against persistent
  • 2. Are you sure your patterns cover everything?

Pattern often used: 2.2250738585072012e-308 How about: 0.22250738585072012e-307

Denial-of-Service: Parse Double

slide-23
SLIDE 23
  • Seen in the field: adding the pattern to WAF
  • Problems:
  • 2. Are you sure your patterns cover everything?

Denial-of-Service: Parse Double

slide-24
SLIDE 24

How many issues in Apache OFBiz? Used analysis techniques:

  • Static Analysis (White Box)
  • Penetration Testing (Black Box)

Denial-of-Service: Parse Double

slide-25
SLIDE 25

Static Analysis (White Box)

Denial-of-Service: Parse Double

slide-26
SLIDE 26

Penetration Testing (Black Box):

Denial-of-Service: Parse Double

http://yourofbiz.com/ecommerce/control/modifycart (update_0, update_1, …) http://yourofbiz.com/ecommerce/control/additem/showcart (quantity, add_product_id) http://yourofbiz.com/ecommerce/control/additem/quickadd (quantity) http://yourofbiz.com/ecommerce/control/additem/keywordsearch (quantity) http://yourofbiz.com/ecommerce/control/additem/advancedsearch (quantity) http://yourofbiz.com/ecommerce/control/additem/showPromotionDetails (quantity) http://yourofbiz.com/ecommerce/control/additem/product (quantity,add_amount) http://yourofbiz.com/ecommerce/control/additem/lastViewedProduct (update_0) http://yourofbiz.com/ecommerce/control/additem/showForum (quantity) http://yourofbiz.com/ecommerce/control/additem/category (quantity) http://yourofbiz.com/ecommerce/control/additem/main (quantity) http://yourofbiz.com/ecommerce/control/additem (quantity) http://yourofbiz.com/ecommerce/control/additem/setDesiredAlternateGwpProductID (…) …

slide-27
SLIDE 27

Gray Box Analysis

slide-28
SLIDE 28
  • System-level tests
  • No assumptions about implementation
  • Example: fuzzing
  • Good: concrete results
  • Bad: a losing game

Black-Box Testing

slide-29
SLIDE 29
  • Examine implementation
  • Test components in isolation
  • Example: static analysis
  • Good: thorough
  • Bad: too thorough
  • Bad: no “show me” exploits

White-Box Testing

slide-30
SLIDE 30
  • System-level tests (like black-box)
  • Examine implementation (like white-box)

Gray-Box Testing

slide-31
SLIDE 31
  • NO!

Hybrid == Gray Box Analysis… Right?

slide-32
SLIDE 32

Hybrid Analysis

Dynamic Analysis Static Analysis

Correlated Vulnerability List

Correlation Engine Application Monitor

slide-33
SLIDE 33

Internals: Lining Up an Attack with the Code

Dynamic Static Monitor

ID: 234 File: MyCode.cs Line: 27 ID: 234 File: MyCode.cs Line: 27

http://www. sales.xyz.com?n=…

Source trace: <com.my.xxx>

slide-34
SLIDE 34

Gray-box analysis: Integrated Analysis

Dynamic Analysis

Application

Real-Time Analysis Real-time link

  • Find More
  • Fix Faster
slide-35
SLIDE 35
  • Detect new types of vulnerabilities

– Privacy violation, Log Forging

  • Find more of all kinds of vulnerabilities

– Automatic attack surface identification – Understand effects of attacks

Find More

slide-36
SLIDE 36

Attack surface identification

/login.jsp /pages/account.jsp /pages/balance.jsp /backdoor.jsp

  • File system
  • Configuration-driven
  • Programmatic
slide-37
SLIDE 37

Point to a particular start page and scan:

  • Crawl will find some directories

Attack surface identification

slide-38
SLIDE 38

Point to a particular start page and scan

  • Crawl is no longer necessary!

The Runtime Component just tells the pen tester the attack surface.

Attack surface identification

slide-39
SLIDE 39

Understand effects of attacks

/backdoor.jsp

Command Injection sysadmin$./sh

slide-40
SLIDE 40
  • Provide Actionable Details

– Stack trace – Line of code

  • Group Symptoms with a Common Cause

Fix Faster

slide-41
SLIDE 41

Actionable Details

/login.jsp

slide-42
SLIDE 42

Group Symptoms with a common cause

  • Counting issues seems to be hard!

/login.jsp /pages/account.jsp /pages/balance.jsp

1 Cross-Site Scripting Symptom 2 Cross-Site Scripting Symptoms 3 Cross-Site Scripting Symptoms

1 Cross-Site Scripting Cause

slide-43
SLIDE 43

Fix Faster: Actionable details

slide-44
SLIDE 44

Fix Faster: Actionable details

slide-45
SLIDE 45

Fix Faster: Group symptoms

slide-46
SLIDE 46
  • Detailed information on where to fix the issue

Group symptoms: details

slide-47
SLIDE 47
  • The page
  • Page Source

For the record: the proof

slide-48
SLIDE 48

More to come: Automated anti-anti automation

slide-49
SLIDE 49

Which one are you talking about?

  • Solution to fix the code
  • Solution to keep it protected

Solution

slide-50
SLIDE 50
  • It’s still open source, so you can DIY

(found in the bug databse)

Solution to fix the code

slide-51
SLIDE 51

Right now and no time: (vulns in these slides)

  • Run the Java 6 Update 24 or later (no DoS:

Parse Double issues)

  • In Framework/webslinger/modules/defaults.zip:

www/Errors/Codes/404.vtl Remove ${webslinger.payload.pathInfo}

  • In:

Remove the mapKey

Solution to fix the code

slide-52
SLIDE 52
  • Continues testing

Solution to keep it protected

?

slide-53
SLIDE 53
  • How about the application in production?

Solution to keep it protected

Design Code

Test

Integration /Staging

Operate

Development IT / Operations Security Static Analysis Gray-box Analysis Penetration Testing WAF

slide-54
SLIDE 54
  • Code changes, keep scanning
  • New vulnerabilities are discovered. Update

with the latest security information No rocket science, right?

Solution to keep it protected

slide-55
SLIDE 55
  • Try out new assessment techniques
  • Work the scans. Tune them to work in your

environment

Solution to keep it protected

slide-56
SLIDE 56