cwe, capec integration in risk based threat modeling am2-sw assurance fall... · cwe, capec...

43
CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Upload: others

Post on 23-Sep-2019

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

CWE, CAPEC Integration in Risk Based Threat Modeling

Tony UcedaVelez

CEO, VerSprite

August 31, 2015

Page 2: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Introduction

 Tony UcedaVélez (“Tony UV”)  CEO, VerSprite – Global Security Consulting Firm  Chapter Leader – OWASP Atlanta (past 7 years)  Author, “Risk Centric Threat Modeling – Process for Attack Simulation & Threat Analysis”, Wiley June 2015

2

Page 3: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

What Threat Are You Protecting Against?

  Do you know who may attack you?

  Do you know why they may attack you?

  Do you know what evidence support your threat claims?

  Use MITRE’s CAPEC & CWE to organize your attack and weakness libraries

Page 4: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

PASTA – Risk Centric Threat Modeling What is PASTA? A True Methodology (7 Stages)

•  Process for Attack Simulation & Threat Analysis –  Risk centric threat modeling

methodology –  Collaborative; great for

business integration –  7 stages building up to

impact of threat to application & business.

•  Aimed at addressing most viable threats & building security in

Page 5: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Threat Modeling

Threat Dissection Targeted Analysis   Focused on

understanding targeted threats   Focus on attacks that are

supported via viable threat patterns (considering multiple vectors)   Threat motives may be

data (e.g. - PII, IP) focused, disruption based (hacktivism), IP

Page 6: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Threat

Threat. A threat is an undesired event. A potential occurrence, often best described as causal factors that may manifest into attacks that compromise an asset or objective. Relative to each site, industry, company; more difficult to uniformly define.

Page 7: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Risk Centric Threat Modeling

Risk Management   Needs to substantiate risks

  No one believes your risk scores

  Substantiate vulnerable findings w/ threat modeling stages   3 (app decomposition)   4 (threat analysis)   5 (vuln detection) 6

(exploitation)   Vulnerabilities begin to ‘mean’

something to those who have to remediate them

Attack Tree

Page 8: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

LEVERAGING CAPEC & CWE

Page 9: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

What is CWE?

Page 10: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

What is CAPEC?

Page 11: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

CAPEC Review

Page 12: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015
Page 13: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Use Case

Use Case. Functional, as designed function of an application.

Page 14: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Abuse Case

Abuse Case. Deliberate abuse of functional use cases in order to yield unintended results

Page 15: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Attack Surface

Attack Surface. Logical area (browser stack, infrastructure components, etc) or physical area (hotel kiosk). Where do you define this in risk assessments or compliance audits?

Page 16: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Attack Vector

Attack Vector. Point & channel for which attacks travel over (card reader, form fields, network proxy, client browser, etc)

Page 17: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Attack Trees

Attack Tree. Helpful diagram of relationship amongst asset-actor-use case-abuse case-vuln-exploit-countermeasure

Page 18: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

CAPEC + CWE Use in Attack Trees

Page 19: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Analysis Of Attacks Using Attack Trees

19

Fraudster

Drive-by Download/Malicious Ads

Man In The Browser

Phishing Email, FaceBook Social

Engineering

Upload Malware on Vulnerable Site

Attack Victim’s Vulnerable Browser

Steals Keystrokes with

Key-logger

Modifies UI Rendered By The

Browser

Phish User To Click Link With Malware

Upload Banking Malware on

Customer’s Pc

Harvest Confidential Data/Credentials From

Victim

Steal Digital Certificates For Authentication

Sends Stolen Data to Fraudster’s

Collection Server

Money Transferred From Mule to

Fraudster

Use Stolen Banking Credentials/

Challenge C/Q

Remote Access To Compromised PC

Through Proxy

Logs into Victim’s Online Bank

Account

Fraudster

Perform Un-authorized Money Transfer to Mule

Redirect Users To Malicious Sites

Delete Cookies Forcing to Login To

Steal Logins

Page 20: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Attack Model

Page 21: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Layered Attacks to Thwart Countermeasures

21

UserFraudster

Login With UserID password over SSL

Includes

Includes

Enter Challenge Question (C/Q) to authenticate

transaction

IncludesThreatens

Enter One Time Password (OTP) to authenticate

transaction

Includes

Capture C/Qs in transit and authenticate on behalf of userThreatens

Key logger/From grabber captures keystrokes

incl. credentials

Includes

Drops Banking Malware on victims/PC

Includes

Threatens

Includes

Communicate with fraudster C&C

Includes

Capture OTP on web channel

and authenticate on behalf of the user

Trust connection by IP and machine tagging/browser

attributes

ThreatensIncludes

Includes

Man In The Browser Injected HTML to capture C/Q

Threatens

Set IP with Proxy/MiTM to same IP gelocation

of the victim

Hijacks SessionIDs, Cookies, Machine Tagging

Includes

Threatens

Page 22: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

OWASP Tie-In

  OWASP WASC Web Hacking Incidents Database Project   project dedicated to maintaining a list of web applications related security incidents.

  https://www.owasp.org/index.php/OWASP_WASC_Web_Hacking_Incidents_Database_Project

  OWASP Security Knowledge Framework   a tool that is used as a guide for building and verifying secure software. It can also be used to train developers about application security.   https://www.owasp.org/index.php/

OWASP_Security_Knowledge_Framework#tab=Main   Incorporates Applications Security Verification Standard

  https://www.owasp.org/index.php/Category:OWASP_Application_Security_Verification_Standard_Project

Page 23: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Security Convergence via PASTA

Source: Risk Centric Threat Modeling, UcedaVelez, Morana 2015, Chapter V, Threat Modeling & Risk Management ,Wiley

Page 24: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

PASTA METHODOLOGY

Page 25: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Stage 1 – Understand Biz Objectives behind Security, Compliance

Page 26: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Baking in GRC   Serve as inherent countermeasures in

the form of people, process, technology   Policies (for people)   Standards (for technology)

  Prior risk assessments help build app risk profile   Historical RAs provide prior risk profile of app

  Regulatory landscape taken into consideration, but not the driver   Key here is to not retrofit compliance; more

costly

  Web Related Example:   Tech: Using Nessus OWASP template to audit

for PHP & ColdFusion hardening guidelines

  OWASP Input Validation Cheat Sheets   CIS Web Technology Benchmarks

Page 27: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Threat Modeling Stage 1 Artifact

Page 28: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Stage 2 Walkthru – Define Tech Scope

Page 29: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

29

The Application Architecture Scope

Page 30: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Technical Scope Definition

Define the scope from design artifacts:

  Application components with respect to the application tiers (presentation, application, data)

  Network topology   Protocol/services being

used/exposed from/to the user to/from the back end (e.g. data flow diagrams)

  Use case scenarios (e.g. sequence diagrams)

Model the application in support of security architecture risk analysis

  The application assets (e.g. data/services at each tier)

  The security controls of the application (e.g. authentication, authorization, encryption, session management, input validation, auditing and logging)

  Data interactions between the user of the application and between servers for the main use case scenarios (e.g. login, registration, query etc)

Page 31: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Stage 3– App Decomposition

Page 32: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Data Flow Diagramming (DFD) On-line Banking Application Example

User/Browser

HTTPsRequest

HTTPsResponses

DM

Z (User/W

eb Server Boundary)

Message XML/JMS

Web Server

ApplicationServer

Application Calls (.do)

Messaging Bus

Authentication Credential

Store

Restricted N

etwork

(App &

DB

Server/Financial Server Boundary)

Application Responses

Auth Data

ServiceMessageResponse

SQL Query Call/JDBC

Internal (Web Server/ A

pp & D

B Server B

oundary)

Financial Transaction Processing MainFrame

Financial Transactions (ACH, wires

external transfer)

MFA RBA/Fraud

DetectionXML/HTTPS

XML/HTTPS

Page 33: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Use Case to Countermeasure Tracking

33

Page 34: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Stage 4 Threat Intelligence/ Analysis

Page 35: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Threat Intelligence is Golden

  Threat Enumeration Based upon Good Intel   Threats based upon known intel   Prior assessment info (where applicable & useful)   Other application assessments from 3rd parties   SIEM feeds/ Syslog data/ Application Logs/ WAF logs

  Denote attacks but will reveal overarching threats   Threat Intel/ Feeds   Security Operations/ Incident Reports

  Personnel/ Infrastructure   Threat examples:

  IP Theft   Data Theft   Sabotage   Infrastructure compromise   Ransom

Page 36: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

36

•  

   

    

• – – – – 

Page 37: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Stage 5 Walkthru – Vuln Analysis

Page 38: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

SecOps Convergence of Vulnerability Mgt.

Page 39: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Stage 6 Walkthru – Attack Enumeration

Page 40: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Stage 7– Residual Risk Analysis

Page 41: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

41

UsersRequest

Responses

DM

Z (User/W

eb Server Boundary)

Message Call

Account/ TransactionQuery Calls

Web Server

ApplicationServer

Application Calls

Encryption +Authentication

Encryption + Authentication

Financial Server

Authentication Data

Restricted N

etwork

(App &

DB

Server/Financial Server Boundary)

DatabaseServer

Application Responses

FinancialData

Auth Data

MessageResponse

SQL Query Call

CustomerFinancial

Data

Internal (Web Server/ A

pp & D

B Server B

oundary)

<SCRIPT>alert(“Cookie”+ document.cookie)</SCRIPT>

OR ‘1’=’1—‘,

"../../../../etc/passwd%00"

Cmd=%3B+mkdir+hackerDirectory

http://www.abc.com?RoleID

Page 42: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

 Focus on the application as business-asset target  Risk !=t * v * i  Risk! = t * v * i * p

 Attack simulation enhances (p) probability coefficients  Considers both inherent countermeasures & those to be developed  Focused on minimizing risks to applications and associated impacts to business

The PASTA™ Risk Recipe

 Rrisk =[(tp * vp)/c] * i

Page 43: CWE, CAPEC Integration in Risk Based Threat Modeling AM2-SW Assurance Fall... · CWE, CAPEC Integration in Risk Based Threat Modeling Tony UcedaVelez CEO, VerSprite August 31, 2015

Q&