Threat Modelling (Web)Apps Myths and Best Practices OWASP 7.11.2012. The OWASP Foundation http://www.owasp.org. Matthias Rohr



Similar documents
PASTA Abstract. Process for Attack S imulation & Threat Assessment Abstract. VerSprite, LLC Copyright 2013

Threat Modeling: The Art of Identifying, Assessing, and Mitigating security threats

Threat Modeling. 1. Some Common Definition (RFC 2828)

Threat Modeling. Frank Piessens ) KATHOLIEKE UNIVERSITEIT LEUVEN

How to start a software security initiative within your organization: a maturity based and metrics driven approach OWASP

Security Testing. How security testing is different Types of security attacks Threat modelling

Development Processes (Lecture outline)

Threat Modeling. Categorizing the nature and severity of system vulnerabilities. John B. Dickson, CISSP

Mobile Application Threat Analysis

Threat Modeling Architecting & Designing with Security in Mind OWASP. The OWASP Foundation Venkatesh Jagannathan

Software Security Touchpoint: Architectural Risk Analysis

Entire contents 2011 Praetorian. All rights reserved. Information Security Provider and Research Center

Microsoft STRIDE (six) threat categories

Rapid Threat Modeling Techniques

Secure Programming Lecture 9: Secure Development

In Building Security In, Gary McGraw proposes three pillars to use throughout the lifecycle: I: Applied Risk Management

Threat modeling. Tuomas Aura T Information security technology. Aalto University, autumn 2011

Secure Development LifeCycles (SDLC)

Enterprise Application Security Program

APPLICATION THREAT MODELING

Understanding and evaluating risk to information assets in your software projects

Threat Modeling/ Security Testing. Tarun Banga, Adobe 1. Agenda

Penetration Test Report

Web Application Remediation. OWASP San Antonio. March 28 th, 2007

Threat Modeling. A workshop on how to create threat models by creating a hands-on example

ISSECO Syllabus Public Version v1.0

Agile and Secure: OWASP AppSec Seattle Oct The OWASP Foundation

The Web AppSec How-to: The Defenders Toolbox

Secure Product Development

Integrating Security into the Application Development Process. Jerod Brennen, CISSP CTO & Principal Security Consultant, Jacadis

An Approach to Threat Modeling in Web Application Security Analysis

Introduction to Microsoft Security Development Lifecycle (SDL) Threat Modeling

Vulnerability Management in an Application Security World. AppSec DC November 12 th, The OWASP Foundation

HP Fortify Application Security Lucas v. Stockhausen PreSales Manager HP Fortify EMEA Enterprise Security

A Practical Approach to Threat Modeling

tj.jmffliim.upij II, 14 1" H'H'.i.U.' Threat Modeling Designing for Security Adam Shostack WILEY

Secure By Design: Security in the Software Development Lifecycle

Introduction to Information Security

Software Development: The Next Security Frontier

Vulnerability Management in an Application Security World. January 29 th, 2009

Security within a development lifecycle. Enhancing product security through development process improvement

IoT IT Security and Secure Development Life Cycle

How to Build a Trusted Application. John Dickson, CISSP

Building Security into the Software Life Cycle

BEST PRACTICES FOR SECURITY TESTING TOP 10 RECOMMENDED PRACTICES

Web application testing

Architectural Design Patterns. Design and Use Cases for OWASP. Wei Zhang & Marco Morana OWASP Cincinnati, U.S.A.

Promoting Application Security within Federal Government. AppSec DC November 13, The OWASP Foundation

Threat Modeling for Secure Embedded Software

Agile and Secure Can We Be Both? Chicago OWASP. June 20 th, 2007

Information Systems Security

Secure Coding in Node.js

The introduction covers the recent changes is security threats and the effect those changes have on how we protect systems.

Attack Vector Detail Report Atlassian

Security and Privacy in Cloud Computing

Juniper Networks Secure

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

How Security Testing can ensure Your Mobile Application Security. Yohannes, CEHv8, ECSAv8, ISE, OSCP(PWK) Information Security Consultant

Successful Strategies for QA- Based Security Testing

Threat Modeling Smart Metering Gateways

Essential IT Security Testing

A Methodology for Capturing Software Systems Security Requirements

Points of View. CxO s point of view. Developer s point of view. Attacker s point of view

Effective Software Security Management

Web Application security testing: who tests the test?

Introduction to Web Application Security. Microsoft CSO Roundtable Houston, TX. September 13 th, 2006

Out of the Fire - Adding Layers of Protection When Deploying Oracle EBS to the Internet

This presentation isn t intended to be comprehensive, but hopefully we ll expose you to some new options or new ways of thinking about Threat

Security Threats in Demo Steinkjer

Information Security for Modern Enterprises

Expert Services Group (Security Testing) Nilesh Dasharathi Sadaf Kazi Aztecsoft Limited

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

locuz.com Professional Services Security Audit Services

Vulnerability Analysis of Energy Delivery Control Systems

Preventive Approach for Web Applications Security Testing OWASP 10/30/2009. The OWASP Foundation

The Risks that Pen Tests don t Find. OWASP 13 April The OWASP Foundation

OWASP AND APPLICATION SECURITY

Chapter 6: Fundamental Cloud Security

Seven Practical Steps to Delivering More Secure Software. January 2011

Application Security Testing

Development. Resilient Software. Secure and. Mark S. Merkow Lakshmikanth Raghavan. CRC Press. Taylor& Francis Croup. Taylor St Francis Group,

KASPERSKY SECURITY INTELLIGENCE SERVICES. EXPERT SERVICES.

Software Supply Chains: Another Bug Bites the Dust.

Vulnerability Management in an Application Security World. March 16 th, 2009

white SECURITY TESTING WHITE PAPER

Challenges of Software Security in Agile Software Development

Protect Your Organization With the Certification That Maps to a Master s-level Education in Software Assurance

SECURITY AND RISK MANAGEMENT

The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.

Risk Management in the Development Process A Progress Report

SETLabs Briefings ENTERPRISE ARCHITECTURE & BUSINESS COMPETITIVENESS VOL 2 NO 4. Oct Dec Threat Modeling in Enterprise Architecture Integration

3 Web Services Threats, Vulnerabilities, and Countermeasures

Redhawk Network Security, LLC Layton Ave., Suite One, Bend, OR

Promoting Application Security within Federal Government. AppSec DC November 13, The OWASP Foundation

IoT & SCADA Cyber Security Services

Security Goals Services

Panel: SwA Practices - Getting to Effectiveness in Implementation

Cyber Education triangle clarifying the fog of cyber security through targeted training

Revision History Revision Date Changes Initial version published to

Threat Modeling Using Fuzzy Logic Paradigm

Transcription:

Threat Modelling (Web)Apps Myths and Best Practices Matthias Rohr 7.11.2012 www.matthiasrohr.de mail@matthiasrohr.de Copyright The Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the License. The Foundation http://www.owasp.org

About me Matthias Rohr Dipl. Medieninf. (FH), CISSP, CSSLP, CCSK Focus: Application Security Management Contractor in London from 2013 on back in Hamburg Active in since 2007: ASVS/Java/Skavenger Project Review of BSI Baustein Webanwendungen WAF Best Practice Paper Summits

Motivation I: Pushing Appsec Left in the SDLC Costs to fix a bug Level of Security (derived also from the costs) Planability: Sec tests may lead to surprises Visibility within SDLC: 60% of all weaknesses are visible in the application design (Principles of Software Engineering Management, T. Gilb)

Motivation II: The Transformation Problem e.g. what is the risk of this vulnerability? Security Management Risk & Compliance World e.g. what are the risks of this feature??? Pentester Vulnerability and Exploit World Dev Feature and Bug World Application Other stakeholders: - Project Managers -QA - Operation? e.g. what feature does this vulnerability relates to?

Threat Modelling - Goals Primary Early identification, assessment and correction of potential security problems in an IT system (such as a Web application) Link technical implementation to IT Risk Mgmt & ISMS Secondary Improvement of planability & quality of later security tests (pentests, code reviews, etc.) Documentation and discussion of the application security architecture

What is a Threat? Asset Asset (Information, Func., Func., Sys) Sys) Protection Req. Req. (CIA+A) Vuln. Vuln. Activity (Access, Store, Store, Trans) Trans) Spoofing Tampering Repudiation Information Disclosure Denial of Service Escalation of Privilege Threat Threat (Attack, Weakness, BI) BI) Threat Threat Agent Agent (Motivation + Capab.) malicious / non-malicious Risk Risk Likelihood / Impact

Existing Methodologies Microsoft I (2003, DREAD ) Microsoft II (2009, Bug Bars ) I + II PASTA T-MAPS PTA SANS Trike Difficult to to compare due to to different concepts.

Tools Word, Excel, Visio or any Wiki, etc. Microsoft Threat Modelling Toolkit (TAM): free MS Visio Plugin, but limited (DfD* analysis only) DfD = Data flow Diagram

Myths (or just misunderstandings )

Myth 1: Threat Modelling is too Complicated Threat modelling is a best effort approach Identifying only some threats is better than nothing at all Objective is not 100% threat coverage Learning and integration process: Start simple & informal Every stakeholder can conduct some sort of threat assessment* in principle (e.g. developers, project managers, ) * A threat assessment is not necessarily a threat modelling!

Myth 2: Threat Modelling = Design Review Many threats are already visible in the specification! Hence: See TM as a conceptual security analysis! Create Update A threat model can be created in iterations (allows us to start very early and with a limited model) A threat model can be updated with details from implementation and operation phase.

Myth 3: TM Output = a List of Threats Lists are static, models can be dynamic Change of a system s property (e.g. a data flow) may effect its threats and therefore the threat model too. Lists as result of a generic threat analysis ok of course. derive Threats System Properties Threat Model See also: http://www.curphey.com/2012/03/is-threat-modelling-overrated

Myth 4: Decide for ONE Perspective Attack-centric: Focuses on attacks May suit a pentester Example: XSS attack to steal cookies Software-/system-centric: Focuses on weaknesses May suit a developer or SW architect Example: Insufficient output validation controls Asset-/Risk-centric: Focuses on business impact (BI) May suit an infosec manager Example: Attacker may access customer data via Multiple perspectives may lead to to a lot lot overlapping threats, but but will will also increase threat coverage!!!

Myth 5: One Methodology suits them all For example Microsoft s TM: Methodology is based on DfD analysis Software-centric = focused on SW developers Instead, the approach should be specific to The (development) organisation Both SDLC and SDL The qualification of the analyst The protection requirements of the app Existing resources Known as: Tailoring

Best Practices (based on my personal experiences)

Threat Intelligence (TI) Main idea: Mapping of expert know-how and other intelligence to a threat modelling exercise Examples: Gen. threats, metrics, countermeasures, etc. Essential for integrating threat modelling into SDLC, improving quality & reducing resources See also Attack Models practice in BSIMM study: http://bsimm.com/online/int elligence/am

Step 0: Preparation Plan threat modelling exercise early in project mgmt: Select suitable threat modelling methodology (internal or external) Input requested from whom and when? Output provided to whom and when? Early kick-off (after this: update planning) Estimate required SMEs* Consider exercise as a quality gate Use RACI to define responsibilities / estimate resources *SME = Subject Matter Expert

Step 1: Assessment Definition Describe the application Name, version, etc. Business objectives Sec requirements Stakeholder Define scope Target of Assessment (ToA) Exclude platform, IDM, container, etc. Define constrains: Trust assumptions, etc., Data from IDM or SAP FI system is trust worthy Irrelevant threat scenarios to be ignored

Step 2: Application Decomposition (AD) Assets Actors Systems Entry Points Data Flows Identify sub-systems, system boundaries and external dependencies. Describe assets, actors (including trust levels!), DfDs*, use cases*, entry points (channels) Derive (link) these information as shown left (e.g. using Word refs). This step may delivered as part of the development documentation. Use Cases Ext. Dependencies * focus on DfDs and use cases that affect identified assets!

Step 2: AD: Application Overview Create a layer 7 view of the security architecture (no backup, cluster or other network devices). Don t bother with UML standards. Instead: use hybrid diagrams. Focus: Visualisation! Dashed lines are trust boundaries (= architectural trust assumptions)

Step 3: Clustering (optional) Applications can consists technically heterogeneous components leading to different threat profiles. Common example: External Web interface for endusers Internal admin GUI Clustering is used to identify such components and divide the threat model respectively.

Step 4: Threat Identification Objective: Maximization of coverage (don t be afraid of duplicates/overlapping threats!). Where/How may protection requirements of an assets be affected*: Primary: Mainly confidentiality, integrity Secondary: Authentication, loss of repudiation, etc. Indirect: Design Principles (Least Priv., etc.) * = potential damage to it

Step 4: Threat Identification Building Blocks Questionnaires Attribute threat mapping Known vulnerability analysis Roles and permissions analysis Abuse & misuse case modelling Security control analysis Attack models / attack patterns Attack surface analysis Attack trees DFD analysis: STRIDE mapping, trust boundary analysis, Input of pentests, other threat models,

Step 4: Threat Identification - Tips Selection of activities depends on Protection requirements (of the app) Level of maturity (of the organisation) Qualification (of the analyst) Resources & time Tip: Do not focus on STRIDE*. Use own categories instead that helps you to derive threats from them: e.g. Threats regarding roles and permissions. (see example in appendix!) * STRIDE = Spoofing identity, Tampering with data, Repudiation, Information disclosure DoS & Elevation of privilege. http://msdn.microsoft.com/en-us/library/ee823878.aspx

Step 4: Misuse & Abuse Cases Misuse Case Modelling Based on use cases (of identified assets) Analyze cases step-by-step: What could happened / should not happen that could cause damage to an asset? Abuse Case Modelling Not based on use cases What can a specific threat agent (e.g. admin, specific user such as a trader, hacker) do that could result in damage to an asset?

Step 4: Attribute Threat Mapping (ATM) Idea: Use threat intelligence to map application properties to generic (or known) threats (expert system). Technical ATM (simple approach): Attribute Func.Register Func.Auth.Custom Func.Auth.PWReset Threats (Weaknesses, Attacks, BI) An attacker may enumerate users names Missing anti-automation Insecure Session Identifier (CWE-330) Authentication Bypass (CAPEC-115) Insecure Password Storage (CWE-261) PW Eavesdropping (CAPEC-94) Weak Password Recovery (CWE-640) Better approach: Map certain attributes using a logic (and, or, not) to specific threats. Create threat profiles for certain app types (e.g. collaboration, HR app, etc.)

Step 5: Threat Revision Consolidation Combine similar threats Identify Mitigating Factors Incl. controls, existing and planned Threat Identification TA TA TA TA T1 T1 T2 T3 T1 T1 T2 Threats T1 T2 T3 Consolidated Threats T = Threat TA = Threat Ident. Activity

Step 5: Threat Revision Consolidation Combine similar threats Identify Mitigating Factors Incl. controls, existing and planned Pre-Assessment (optional) Check relevance / known issues

Step 6: Threat Rating Threat Criticality Rating Option 1: DREAD: Criteria's are mapped indirectly to a numerical value using a metric (MS TM I) => Often very subjective!! Option 2: CWSS: Similar to DREAD but more granularly and precise (= more work) Option 3: Bug Bars: Criteria's that are mapped directly to low, medium, high, etc. (MS TM II) Risk Assessment Threat Modelling Risk Assessment Bug Bars: http://msdn.microsoft.com/en-us/magazine/ee336031.aspx CWSS: http://cwe.mitre.org/cwss/

Step 7: Threat Treatment (Countermeasures) Implemental E.g. code changes Configurative E.g. system hardening Architectural E.g. installation of a PKI, IDM solution Other Guidelines Tests

Threat 8: Threat Validation (Test Cases) Derive test plan & test cases from countermeasures Can easily include generic test cases (TI) Result: Threat-based security testing Threat Threat Treatment Gen. Countermeasures Sec Test Cases Gen. Test Cases Validation e.g. via Pentest (Vulnerability Assessment)

Step 9+10: Threat Retrospective & Update Update threat intelligence: Known issues Security test cases Attribute threat mappings Abuse cases Metrics Continuous improvement of threat modelling exercises Update of the threat model after a specific time / changes

Threat Modelling & Risk Assessments Approach I: Assessing threats only Approach II: Assessing threats and risks separately Approach III: Assessing threats and risks in one activity Threat Threat Modelling Modelling Threat Threat Modelling Modelling Threat Threat Model Model Risk Risk Assessment Assessment Threat Threat & Risk Risk Assessment Assessment Threats Threats // Countermeasures Countermeasures Threats Threats // Risks Risks // Risk Risk Mitigations Mitigations Threats Threats // Risks Risks // Risk Risk Mitigations Mitigations Try to implement approach II or III

TM RM: Example This TM Approach Application Decomposition Clustering Threat Threat Identification Threat Threat Revision Threat Threat Rating Rating Threat Threat Treatment Threat Threat Validation NIST RA (SP 800-30) System Characterization Threat Threat Identification Control Analysis Vulnerability Identification Likelihood Determination Impact Impact Analysis Risk Risk Determination Control Recommendations Easy to combine both exercises. The WHERE is specific to an existing RM methodology!

So Where to Start? Begin simple, informal and learn! (e.g. as a pilot) Collect threat intelligence wherever possible Lessons learned after pentests, projects, etc. Integrate stakeholders: Dev team, TPMs, SME, pentester, etc. Build a roadmap: Prioritize critical apps and platforms Process maturity / SDLC integration Get help: E.g. let complicated threat models may be conducted by experienced consultants companies and learn from them!

Thank You! Any Questions???

APPENDIX

APPENDIX: Possible Threat Groups Insecure systems or missing hardening threats (HRD) Local threats (LOC) Threats by privileged users (PRV) Denial-of-Service threats (DOS) Threats to authentication & identities (ATN) Access control threats (ATZ) Threats regarding roles and permissions (RLP) Manipulation or disclosure of data in motion (DMM) Manipulation or disclosure of data at rest (DMR) Business-logic specific threats (BIL) Privacy threats (PRV) Accountability threats (ACC)

APPENDIX: Overview of Methodology

APPENDIX: RACI Example Step App Owner Role Dev Team Analyst Sec Mgmt Preparation C I C R/A Assessment Definition C C R C/A App Decomposition C R/A Threat Identification C R/A Threat Revision C C R I/A Threat Rating I I R C/A Define Action Plan C C R C/A R Responsible A Accountable C - Consulted (in the loop) I - Informed (in the picture)