Developer-centric Application Security Scans Ray Kelly, Practice - - PowerPoint PPT Presentation

developer centric application
SMART_READER_LITE
LIVE PREVIEW

Developer-centric Application Security Scans Ray Kelly, Practice - - PowerPoint PPT Presentation

Developer-centric Application Security Scans Ray Kelly, Practice Principal - Fortify Sherman Monroe, Senior Security Consultant Thomas Ryan, Fortify Solutions Architect #MicroFocusCyberSummit Session Agenda Mobile Apps The Bad, The Worse


slide-1
SLIDE 1

#MicroFocusCyberSummit

Developer-centric Application Security Scans

Ray Kelly, Practice Principal - Fortify Sherman Monroe, Senior Security Consultant Thomas Ryan, Fortify Solutions Architect

slide-2
SLIDE 2

Mobile Apps – The Bad, The Worse And The Ugly Attacking Web Services using Web Inspect Developer-centric Application Security Scans with Fortify

3

Session Agenda

slide-3
SLIDE 3

#MicroFocusCyberSummit

Mobile Apps – The Bad, The Worse And The Ugly

Ray Kelly Practice Principal - Fortify

slide-4
SLIDE 4

Overview of the mobile landscape The mobile threat surface Real world mobile app vulnerabilities Q&A

5

Agenda

slide-5
SLIDE 5

About Me

Ray Kelly

  • Developer for 20 years
  • Internet Security for 15 years
  • Lead Developer of WebInspect with SPI Dynamics
  • Mobile Pen Test Manager

6

slide-6
SLIDE 6

All vulnerabilities discussed in this presentation are either already publicly disclosed or have been anonymized/scrubbed These are developer mistakes that potentially leave users at risk Apps are made by developers with the best of intentions

7

Considerations

slide-7
SLIDE 7

8

The Mobile Landscape

Source: https://www.statista.com/statistics/274774/forecast-of-mobile-phone-users-worldwide/

slide-8
SLIDE 8

The Mobile Landscape

  • Mobile development is the hottest type of

development right now. But users may be at risk.

  • The pressure to release new features on

mobile devices may mean that security is not prioritized.

  • Mobile devices are more vulnerable to

threats, so building devices with adequate security and mobile device developers with security training are valuable.

9

slide-9
SLIDE 9

10

Mobile Threat Surface

Client Network Server

  • Credentials in memory
  • Credentials on file system
  • Data stored on file system
  • Poor certificate management
  • Clear text credentials
  • Clear text data
  • Backdoor data
  • Data leakage
  • Injection flaws
  • Authentication
  • Session management
  • Access control
  • Logic flaws
slide-10
SLIDE 10

Mobile Threat Surface

Two key differences:

(Compared to traditional apps)

Magnified network vulnerability

  • Your network traffic is more likely to

be visible to others with a mobile device than local traffic at work or home

Magnified physical vulnerability

  • As with most other types of

hardware, once the attacker has physical access, it’s over

11

slide-11
SLIDE 11

12

Mobile Threat Surface

89 11

Mobile applications which have at least one critical or high vulnerability

Source: Micro Focus 2018 Application Security Research Update Report

slide-12
SLIDE 12

Vulnerabilities

Server Side

13

  • Vulnerable to all traditional web app vulnerabilities
  • SQLi, WebDav, XSS etc.
  • Developers assume APIs are invisible
slide-13
SLIDE 13

Vulnerabilities

Server Side

14

Account enumeration

slide-14
SLIDE 14

Vulnerabilities

Network/Privacy

15

  • Privacy/data leakage, clear text data
  • 3rd party data leakage
slide-15
SLIDE 15

16

Vulnerabilities

Network/Privacy

slide-16
SLIDE 16

17

Vulnerabilities

Network/Privacy

slide-17
SLIDE 17

Vulnerabilities

Client Side/Logging

18

Starbucks Mobile App

/Library/Caches/com.crashlytics.data/com.starbucks.mystarbucks/session.clslog <input class="field text medium" id="Account_UserName" maxlength="200" name="Account.UserName" tabindex="0" type="text" value="CLEARTEXT" /> <label for="Account_PassWord" class="">Password <span class='req'>*</span></label> <input class="field text medium" id="Account_PassWord" maxlength="200" name="Account.PassWord" tabindex="0" type="password" value="CLEARTEXT" />

“When reached Wednesday, Crashlytics, a Boston-based firm that specializes in crash reporting solutions, couldn’t comment on specific customers but did reiterate that the firm doesn’t recommend developers log sensitive information.”

Source: https://threatpost.com/starbucks-app-stores-user-information-passwords-in-clear-text/103649/2/

slide-18
SLIDE 18

19

Vulnerabilities

Client Side/Logging

slide-19
SLIDE 19

20

Vulnerabilities

Client Side/Storage

slide-20
SLIDE 20

21

Vulnerabilities

Client Side/Debug Screens

slide-21
SLIDE 21

22

Vulnerabilities

Client Side

slide-22
SLIDE 22

23

Fortify on Demand

Provides Application Security as a Service

Discover

Understanding your application portfolio is the first step to securing it Comprehensive static, dynamic/interactive web and mobile testing delivered at the speed of development Continuously monitors and protects software running in production Integrated workflows to fix vulnerabilities faster and accelerate a mature AppSec program

Assess Monitor & Protect Integrate

Leading-edge developer training for secure coding best practices and prevent vulnerabilities before check-in Securing DevOps through broad Fortify Ecosystem integrations and automation tools Thick-client Web Mobile

Remediate

Educate

slide-23
SLIDE 23

24

Fortify On Demand

Client Network Services

Why Fortify on Demand MAST?

  • iOS applications
  • Android applications
  • 50+ unique vulnerability categories
  • Designed for mobile app developers
  • Manual testing performed on-device

Mobile Assessments include:

Vulnerability analysis of mobile binary Endpoint reputation analysis Security expert review of prioritized results

Mobile + Assessments include:

Manual testing of binary, network and services WebInspect analysis of backend services

slide-24
SLIDE 24

Thank You.

Visit Fortify On Demand at http://microfocus.com/fod Follow us on Twitter @MicroFocusSec

#MicroFocusCyberSummit

Ray Kelly Follow me on Twitter: @vbisbest

slide-25
SLIDE 25

#MicroFocusCyberSummit

Attacking Web Services using Web Inspect

Sherman Monroe

slide-26
SLIDE 26

Overview of Web Service Scanning SOAP scan setup Manual RESTful Scan setup Automated RESTful Scan setup

27

Overview

slide-27
SLIDE 27

28

How does Automated Scanning work?

Crawl

Determining attack surface Historically only link-based Today employ JavaScript emulation to get dynamic requests

Audit

Sending known attack vectors Fuzzing parameters Session-based

slide-28
SLIDE 28

Understanding request generation (i.e. links) Understanding parameters Understanding session management

29

What to look for in a scanner?

slide-29
SLIDE 29
  • Endpoints not always explicit in dynamic code
  • Complex payloads not exposed
  • URL parameters (e.g. empl/38482/profile)

Discoverability

slide-30
SLIDE 30

Demo – Proxies & Web Macros

slide-31
SLIDE 31

Non-standard parameter specs

  • As part of URL (e.g. path parameters)
  • Headers
  • Request body
  • Upload file content (Content-Type:

multipart/form-data)

Patterns in URL segments

  • Highly random path nodes
  • Numerical values, dates, etc.

Component Values

  • Look for structure in parameter values
  • Look for delimiters

Identifying Parameters

slide-32
SLIDE 32

Identifying Parameters: Component Values

POST /acme/geo/get_feature?uid=68e4cf6a8077912a02b250b230b8abe73265753b HTTP/1.1 Host: acme.com Connection: keep-alive X-CUST-SESSIONID: h57768d18hfr883xc36b53100jeew99sb2b320eb User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36 Content-Type: application/x-www-form-urlencoded Accept: */* Accept-Encoding: gzip, deflate, sdch Accept-Language: ja,en-US;q=0.8,en;q=0.6 {“location":"48.854325",“feature_area_id":”tag=3hks83n3j;name=sector_north”} HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Mon, 05 May 2017 03:03:56 GMT Content-Length: 138 Connection: keep-alive {“feature_id":"\u30a4\u30d9\u30f3\u30c8\u3000\u5341\u4e00",“sz":532,“wght":0.32,"last_photo":"",“resp_code":0} Desktop Manager Web Server Feature Service Image Service Spatial DBMS JPEG JPEG JSON Response REST Request SOAP Request GML

slide-33
SLIDE 33

POST /acme/geo/get_feature?uid=68e4cf6a8077912a02b250b230b8abe73265753b HTTP/1.1 Host: acme.com Connection: keep-alive X-CUST-SESSIONID: h57768d18hfr883xc36b53100jeew99sb2b320eb User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36 Content-Type: application/x-www-form-urlencoded Accept: */* Accept-Encoding: gzip, deflate, sdch Accept-Language: ja,en-US;q=0.8,en;q=0.6 {“location":"48.854325",“feature_area_id":”tag=3hks83n3j;name=sector_north”} HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Date: Mon, 05 May 2017 03:03:56 GMT Content-Length: 138 Connection: keep-alive {“feature_id":"\u30a4\u30d9\u30f3\u30c8\u3000\u5341\u4e00",“sz":532,“wght":0.32,"last_photo":"",“resp_code":0}

Identifying Parameters: Component Values

Desktop Manager Web Server Feature Service Image Service Spatial DBMS JPEG JPEG JSON Response REST Request SOAP Request GML

slide-34
SLIDE 34
  • Refer to documentation or use heuristics to determine the parameter

data types

  • Hex strings are typically used as tokens or userids
  • Tokens and other sensitive data in URL
  • /acme/profile/set_photo/2015/11/20?token=fa423b369272e7e19b2a5fa4eeba560e74c0d457
  • Look for high variance in URL paths of proxied traffic
  • Examine response codes of parent paths to find start of parameters

Identifying Parameters

slide-35
SLIDE 35

Demo – Custom Parameters

slide-36
SLIDE 36
  • Proxy –
  • undocumented APIs (e.g. RESTful)
  • Non web applications (e.g. mobile applications)
  • Dynamically generated requests (e.g. Web 2.0, AJAX)
  • Automated (WSDL, WADL, Swagger)
  • WISwag.exe

Automation: Importing Data

slide-37
SLIDE 37

38

Importing Data

slide-38
SLIDE 38

39

Importing Data

slide-39
SLIDE 39

Demo – Service Definition Import

slide-40
SLIDE 40

Thank You.

#MicroFocusCyberSummit

slide-41
SLIDE 41

Navigate the Eclipse IDE and Fortify plug-in & Security Assistant Examine & Remediate SQL injection Full scan from the Eclipse IDE Understand the Jenkins Continuous integration tool Configure static scan and result automation with the Jenkins build Enable predictive analysis with audit assistant through SSC View results in Fortify Software Security Center with audit assistant predictions

42

Agenda

slide-42
SLIDE 42

Q&A

slide-43
SLIDE 43

Thank You.

#MicroFocusCyberSummit

slide-44
SLIDE 44

#MicroFocusCyberSummit