Top Banner
© 2017 Denim Group All Rights Reserved Clear AppSec Visibility with AppSpider and ThreadFix March 9 th , 2017 Dan Cornell CTO, Denim Group Dan Kuykendall Senior Director, Application Security Products
56

Clear AppSec Visibility with AppSpider and ThreadFix

Mar 20, 2017

Download

Technology

Denim Group
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: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Clear AppSec Visibility with

AppSpider and ThreadFix

March 9th, 2017

Dan CornellCTO, Denim Group

Dan KuykendallSenior Director, Application Security Products

Page 2: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Agenda

• State of Application Security

• Rapid7 AppSpider Overview

• ThreadFix Overview

• ThreadFix / AppSpider Integration

Page 3: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

State of Application Security

• Rapidly evolving

• Changing web application architectures

and approaches

• Various techniques used to find

vulnerabilities

• Need to fix what gets found

Page 4: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

AppSpider Overview

Page 5: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

“You cannot attack

what you cannot see”

Page 6: Clear AppSec Visibility with AppSpider and ThreadFix

Possible layers of an App

Classic HTML & JavaScript Client - Standard

AJAX, SPA’s & Mobile apps

Client – Discovery challenges,

Complex client code plus API

challenges

Web Services / REST API’s Services – Various data formats

OAuth & other API AuthServices – Challenging authentication

schemes

Page 7: Clear AppSec Visibility with AppSpider and ThreadFix

Our Introduction to Web Apps

Page 8: Clear AppSec Visibility with AppSpider and ThreadFix

HTTP Standard Format

INPUTS IN SIMPLE ‘NAME=VALUE’ PAIRS

Same for POST requests

GET /search.php?item=Shirt&color=Blue HTTP/1.1

Accept: text/html, application/xhtml+xml, */*

Referer: http://www.webscantest.com/crosstraining/

Accept-Language: en-US

User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1)

Host: www.webscantest.com

Cookie: SESSIONIS=aslkjhalasdhh2979jhfac78h

POST /search.php HTTP/1.1

Accept: text/html, application/xhtml+xml, */*

Referer: http://www.webscantest.com/crosstraining/

Accept-Language: en-US

User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1)

Host: www.webscantest.com

Cookie: SESSIONIS=aslkjhalasdhh2979jhfac78h

item=Shirt&color=Blue

Page 9: Clear AppSec Visibility with AppSpider and ThreadFix

Our Introduction to App Sec---[ Phrack Magazine Volume 8, Issue 54 Dec 25th, 1998, article 08 of 12

-------------------------[ NT Web Technology Vulnerabilities

--------[ rain.forest.puppy / [WT] <[email protected]>

----[ ODBC and MS SQL server 6.5

Ok, topic change again. Since we've hit on web service and database stuff,

let's roll with it. Onto ODBC and MS SQL server 6.5.

I worked with a fellow WT'er on this problem. He did the good thing and told

Microsoft, and their answer was, well, hilarious. According to them,

what you're about to read is not a problem, so don't worry about doing

anything to stop it.

- WHAT'S THE PROBLEM? MS SQL server allows batch commands.

- WHAT'S THAT MEAN? I can do something like:

SELECT * FROM table WHERE x=1 SELECT * FROM table

WHERE y=5

Exactly like that, and it'll work. It will return two record sets, with each

set containing the results of the individual SELECT.

- WHAT'S THAT REALLY MEAN? People can possibly piggyback SQL

commands into your statements. Let's say you have:

SELECT * FROM table WHERE x=%%criteria from webpage

user%%

Page 10: Clear AppSec Visibility with AppSpider and ThreadFix

Fun with SQL Injection

Invalid User

Error 1064: You have an error in your SQL syntax near ‘” at line 1 of

SELECT * FROM tAccounts WHERE username=admin’ AND password=“abc123”

http://myspace.com/login.php?username=admin’&password=abd123

Page 11: Clear AppSec Visibility with AppSpider and ThreadFix

Fun with SQL Injection

http://myspace.com/login.php?username=admin’&password=abc123

Welcome Admin

Create User | View Users | View Logs

http://myspace.com/login.php?username=admin’#&password=abd123

SELECT * from tAccounts WHERE username=‘admin’ #

Page 12: Clear AppSec Visibility with AppSpider and ThreadFix

Layer 1: Discovery

Page 13: Clear AppSec Visibility with AppSpider and ThreadFix

No longer just HTML

Page 14: Clear AppSec Visibility with AppSpider and ThreadFix
Page 15: Clear AppSec Visibility with AppSpider and ThreadFix

Request

Response

Request

Response

JavaScript becomes Asynchronous

Page 16: Clear AppSec Visibility with AppSpider and ThreadFix

HTMLRich client (HTML, Javascript, AJAX)

& Web services (JSON, SOAP, etc.)

Applications getting more difficultThen Now

Page 17: Clear AppSec Visibility with AppSpider and ThreadFix

Crawling AJAX Apps

Page 18: Clear AppSec Visibility with AppSpider and ThreadFix

SPA Frameworks

Page 19: Clear AppSec Visibility with AppSpider and ThreadFix

A rose by any other name

• Web Services

• RESTful API’s

• Web API’s

• or simply API’s

Page 20: Clear AppSec Visibility with AppSpider and ThreadFix

HTTP Standard Format

GET /search.php?item=Shirt&color=Blue HTTP/1.1

Accept: text/html, application/xhtml+xml, */*

Referer: http://www.webscantest.com/crosstraining/

Accept-Language: en-US

User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1)

Host: www.webscantest.com

Cookie: SESSIONIS=aslkjhalasdhh2979jhfac78h

POST /search.php HTTP/1.1

Accept: text/html, application/xhtml+xml, */*

Referer: http://www.webscantest.com/crosstraining/

Accept-Language: en-US

User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1)

Host: www.webscantest.com

Cookie: SESSIONIS=aslkjhalasdhh2979jhfac78h

item=Shirt&color=Blue

Page 21: Clear AppSec Visibility with AppSpider and ThreadFix

Custom URL handlers

XML format

JSON: JavaScript Object

Notation

GWT: Google Web Toolkit

AMF: Old school Adobe/Flash

Actionscript Messaging Format

Many others: SOAP, XML-RPC

& many custom formats

GET /rest/search/item/Shirt/color/Blue

POST /rest/

<search><item>Shirt</item><color>Blue</color></

search>

POST /json/

{“search”: {“item”: Shirt ; “color”: Blue} }

POST /amf/amf.php

□□□□□□□□null□□□□/3□□□<

□□□□□□□Oflex.messaging.messages.RemotingMessage

source□operation□search□item□color

□□□□Shirt□ Blue□□□

DSId□IBA98D1B7-SE1C-6007-6D98-

2CEF173C5AF□SEndpoint□my-amf□□IOB63`

POST /GWT/

Search|Shirt|Blue|

AJAX & REST API Formats

Page 22: Clear AppSec Visibility with AppSpider and ThreadFix

{"products":[{"shirt":{"text":“NTO","colors":["blue","red",

"yellow","green"],"sizes":["small","medium","large","xlarge

"],"price":"19.99"}},{"hat":{"text":“NTO","colors":["black"

,"red"],"sizes":["kids","adult"],"price":"24.99"}}]}

{ "products" : [

{ "shirt" : {

"colors" : [

"blue",

"red",

"yellow",

"green"

],

"price" : "19.99",

"sizes" : [

"small",

"medium",

"large",

"xlarge"

],

"text" : “NTO"

} },

{ "hat" : {

"colors" : [

"black",

"red"

],

"price" : "24.99",

"sizes" : [

"kids",

"adult"

],

"text" : “NTO"

}

}

]

}

JSON supports

nested data

just like XML

As one line

Nicely formatted

Page 23: Clear AppSec Visibility with AppSpider and ThreadFix

Swing and a Miss

Page 24: Clear AppSec Visibility with AppSpider and ThreadFix

Landing the blow

Page 25: Clear AppSec Visibility with AppSpider and ThreadFix

Discovery - RESTful API’s

Page 26: Clear AppSec Visibility with AppSpider and ThreadFix

Don’t forget Mobile!

REST WEB SERVICE

Page 27: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Web Service

Authentication

Page 28: Clear AppSec Visibility with AppSpider and ThreadFix

Web Service Authentication Methods

• Classic solutions

• HTTP Auth (Basic/NTLM/Digest)

• Custom HTTP Header

• Session Cookie

• Popular standardized solutions

• OAuth support

• Supports most installations with simple configuration settings

• Custom signing code

• User driven/macro solutions

Page 29: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Attacks Continue to

Evolve

Page 30: Clear AppSec Visibility with AppSpider and ThreadFix

Attack Types and Importance Evolve

Page 31: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Changing

Development ModelsThe Software Development Lifecycle

(SDLC)

Page 32: Clear AppSec Visibility with AppSpider and ThreadFix

SDLC Types

• Waterfall – Classic development

• Agile – Release early & often

Page 33: Clear AppSec Visibility with AppSpider and ThreadFix

Waterfall

Page 34: Clear AppSec Visibility with AppSpider and ThreadFix

Agile

Page 35: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Continuous

Integration

Page 36: Clear AppSec Visibility with AppSpider and ThreadFix

Continuous Integration

Page 37: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

“A bug is a bug is a

bug”

Page 38: Clear AppSec Visibility with AppSpider and ThreadFix

Issue/Bug Tracking

Page 39: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

DevOps

Page 40: Clear AppSec Visibility with AppSpider and ThreadFix

DevOps

Page 41: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

ThreadFix Overview

• Create a consolidated view of your

applications and vulnerabilities

• Prioritize application risk decisions

based on data

• Translate vulnerabilities to developers

in the tools they are already using

Page 42: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

ThreadFix Overview

Page 43: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Create a consolidated view of

your applications and

vulnerabilities

Page 44: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Application Portfolio Tracking

Page 45: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Vulnerability Import

Page 46: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Vulnerability Consolidation

Page 47: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Prioritize application risk

decisions based on data

Page 48: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Vulnerability Prioritization

Page 49: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Prioritization with Hotspot

Page 50: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Reporting and Metrics

Page 51: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Translate vulnerabilities to

developers in the tools they

are already using

Page 52: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Defect Tracker Integration

Page 53: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

ThreadFix and AppSpider

Page 54: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

Hybrid Analysis Mapping

• Correlate DAST and SAST scan results

• Funding provided by US Department of Homeland Security Science and Technology Directorate

Page 55: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

ThreadFix ScanAgent

• Schedule and run Rapid7 AppSpider

scans

• Coordinate with other testing activities

Page 56: Clear AppSec Visibility with AppSpider and ThreadFix

© 2017 Denim Group – All Rights Reserved

ThreadFix

www.threadfix.it

Rapid7 AppSpider

www.rapid7.com/products/appspider

Questions and Contact