Michael Howard   Microsoft employee for 17 years  Always in security  Worked on the SDL since inception.

Slides:



Advertisements
Similar presentations
Sachin Rawat Crypsis SDL Threat Modeling.
Advertisements

IEs Protected Mode in Windows Vista TM January 20, 2006 Marc Silbey Program Manager.
OWASP CLASP Overview.
Presenter Name Date Introduction to Microsoft ® Security Development Lifecycle (SDL) Threat Modeling Secure software made easier.
Elevation of Privilege The easy way to threat model
Application Security Best Practices At Microsoft Ensuring the lowest possible exposure and vulnerability to attacks Published: January 2003.
Threat Modeling Michael Howard Principal Security Program Manager
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Don’t get Stung (An introduction to the OWASP Top Ten Project) Barry Dorrans Microsoft Information Security Tools NEW AND IMPROVED!
Ragib Hasan University of Alabama at Birmingham CS 491/691/791 Fall 2012 Lecture 2 08/21/2012 Security and Privacy in Cloud Computing.
Engineering Secure Software. Uses of Risk Thus Far  Start with the functionality Use cases  abuse/misuse cases p(exploit), p(vulnerability)  Start.
Day O’ Security An Introduction to the Microsoft Security Development Lifecycle Day 1: Threat Modelling - CIA and STRIDE.
Copyright © Microsoft Corp 2006 Introduction to Threat Modeling Michael Howard, CISSP Senior Security Program Manager Security Engineering and Communication.
DESIGNING A PUBLIC KEY INFRASTRUCTURE
Writing Secure Code – Best Practices
Threat Modeling for Hostile Client Systems Avni Rambhia.
 Key exchange o Kerberos o Digital certificates  Certificate authority structure o PGP, hierarchical model  Recovery from exposed keys o Revocation.
Chapter 7 HARDENING SERVERS.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
1 Steve Chenoweth Tuesday, 10/18/11 Week 7, Day 2 Right – One view of the layers of ingredients to an enterprise security program. From
Using Internet Information Server And Microsoft ® Internet Explorer To Implement Security On The Intranet HTTP.
Security Engineering II. Problem Sources 1.Requirements definitions, omissions, and mistakes 2.System design flaws 3.Hardware implementation flaws, such.
Introduction To Windows NT ® Server And Internet Information Server.
Jonas Thomsen, Ph.d. student Computer Science University of Aarhus Best Practices and Techniques for Building Secure Microsoft.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
SYSTEM ADMINISTRATION Chapter 13 Security Protocols.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 9: Securing Network Traffic Using IPSec.
Introduction to SQL Server 2000 Security Dave Watts CTO, Fig Leaf Software
1 Threat Modeling at Symantec OWASP WWW, Irvine, CA, January 28, 2011 Threat Modeling at Symantec Edward Bonver Principal Software Engineer, Symantec Product.
Author: Bill Buchanan. Work Schedule Author: Bill Buchanan.
امیرحسین علی اکبریان.  Introduction  Goals of Threat Modeling  The approach Overview.
Lecture 23 Internet Authentication Applications modified from slides of Lawrie Brown.
1 12 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 12 Designing Systems Interfaces, Controls, and Security.
Module 7: Fundamentals of Administering Windows Server 2008.
Windows Security. Security Windows 2000/XP Professional security oriented Authentication Authorization Internet Connection Firewall.
SEC835 Practical aspects of security implementation Part 1.
Module 5 Configuring Authentication. Module Overview Lesson 1: Understanding Classic SharePoint Authentication Providers Lesson 2: Understanding Federated.
Lecture 16 Page 1 Advanced Network Security Perimeter Defense in Networks: Virtual Private Networks Advanced Network Security Peter Reiher August, 2014.
1 Vulnerability Assessment of Grid Software James A. Kupsch Computer Sciences Department University of Wisconsin Condor Week 2007 May 2, 2007.
Documenting threats and vulnerabilities in a web services infrastructure Lieven Desmet DistriNet Research Group, Katholieke Universiteit Leuven, Belgium.
Module 8: Designing Security for Authentication. Overview Creating a Security Plan for Authentication Creating a Design for Security of Authentication.
APPLICATION PENETRATION TESTING Author: Herbert H. Thompson Presentation by: Nancy Cohen.
PwC New Technologies New Risks. PricewaterhouseCoopers Technology and Security Evolution Mainframe Technology –Single host –Limited Trusted users Security.
Lesson 19-E-Commerce Security Needs. Overview Understand e-commerce services. Understand the importance of availability. Implement client-side security.
Need for Security Control access to servicesControl access to services Ensure confidentialityEnsure confidentiality Guard against attacksGuard against.
Module 2: Designing Network Security
CHAPTER 2 Laws of Security. Introduction Laws of security enable user make the judgment about the security of a system. Some of the “laws” are not really.
CSSE 492 Software Dependability Seattle University Computer Science & Software Engineering Winter 2007 Prof. Roshanak Roshandel.
4.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 12: Implementing Security.
By Ramesh Mannava.  Overview  Introduction  10 secure software engineering topics  Agile development with security development activities  Conclusion.
Ken De Souza KWSQA, April 2016 V. 1.0
Security Development Lifecycle. Microsoft SDL 概觀 The SDL is composed of proven security practices It works in development organizations regardless of.
ASHRAY PATEL Protection Mechanisms. Roadmap Access Control Four access control processes Managing access control Firewalls Scanning and Analysis tools.
Writing Secure Code – Best Practices Name Job Title Company.
Lecture 19 Page 1 CS 236 Online 6. Application Software Security Why it’s important: –Security flaws in applications are increasingly the attacker’s entry.
Matthias Rohr Practical Threat Modeling with Microsofts Threat Modeling Tool 2016.
Threat Modeling for Cloud Computing
Threat Modeling - An Overview All Your Data is Mine
Critical Security Controls
Evaluating Existing Systems
Threat modeling Aalto University, autumn 2013.
Evaluating Existing Systems
Introduction to SQL Server 2000 Security
Lesson 16-Windows NT Security Issues
Engineering Secure Software
White Box testing & Inspections
Engineering Secure Software
6. Application Software Security
Presentation transcript:

Michael Howard

  Microsoft employee for 17 years  Always in security  Worked on the SDL since inception Who Is This Guy?

 Introduction  Goals of Threat Modeling  The approach  Exercise  Learning resources Overview

 Who?  What?  When?  Why?  How? Threat Modeling Basics

 Building a threat model  Dev owns DFD (diagram)  Test owns ID threats (analyze)  PM owns overall process  Customers for threat models  Your team  Other feature, product teams  Customers, via user education  ‘External’ QA resources like pen testers  Security Advisors Who

 Reason about, document and discuss security in a structured way  Threat model & document  The product as a whole  The security-relevant features  The attack surfaces  Assurance that threat modeling has been done well What

 Produce software that’s secure by design  Improve designs the same way we’ve improved code  Because attackers think differently  Creator blindness/new perspective Why Threat Model

Diagram Identify Threats MitigateValidate Vision The Approach In a Nutshell

Diagram Identify Threats MitigateValidate STRIDE/Element: Vision Vision

 Scenarios  Where do you expect the product to be used?  XBOX is different from Windows 7  xbox.com is different from XBOX  Use cases/Use Stories  Add security to scenarios, use cases  Assurances/Guarantees  Structured way to think about “what are you telling customers about the product’s security?” Vision

STRIDE/Element: Diagramming Diagram Identify Threats MitigateValidate Vision

 Go to the whiteboard  Start with an overview which has:  A few external interactors (some use ‘actors’)  One or two processes  One or two data stores (maybe)  Data flows to connect them  Check your work  Can you tell a story without edits?  Does it match reality? How to Create Diagrams

 Use DFDs (Data Flow Diagrams)  Include processes, data stores, data flows  Include trust boundaries  Diagrams per scenario may be helpful  Update diagrams as product changes  Enumerate assumptions, dependencies  Number everything (if manual) Diagramming

Diagram Elements - Examples People Other systems Microsoft.com etc… Function call Network traffic Etc… DLLs EXEs Components Services Web Services Assemblies etc… Database File Registry Shared Memory Queue/Stack etc… External entity Process Data Flow Data Store Trust Boundary Process boundary File system

 Add trust boundaries that intersect data flows  Points/surfaces where an attacker can interject  Machine boundaries, privilege boundaries, integrity boundaries are examples of trust boundaries  Threads in a native process are often inside a trust boundary, because they share the same privs, rights, identifiers and access  Processes talking across a network always have a trust boundary Diagrams: Trust Boundaries

 Iterate over processes, data stores, and see where they need to be broken down  How to know it “needs to be broken down?”  More detail is needed to explain security impact of the design  Object crosses a trust boundary  Words like “sometimes” and “also” indicate you have a combination of things that can be broken out  “Sometimes this datastore is used for X”…probably add a second datastore to the diagram Diagram Iteration

 Context Diagram  Very high-level; entire component / product / system  Level 1 Diagram  High level; single feature / scenario  Level 2 Diagram  Low level; detailed sub-components of features  Level 3 Diagram  More detailed  Rare to need more layers, except in huge projects or when you’re drawing more trust boundaries Diagram layers

A Real Context Diagram (Castle)

A Real Level-0 DFD (Castle)

STRIDE/Element: Identifying Threats Diagram Identify Threats MitigateValidate Vision

Understanding the threats ThreatPropertyDefinitionExample S poofing Authentication Impersonating something or someone else. Pretending to be any of billg, xbox.com or a system update T ampering Integrity Modifying data or code Modifying a game config file on disk, or a packet as it traverses the network R epudiation Non-repudiation Claiming to have not performed an action “I didn’t cheat!” I nformation Disclosure Confidentiality Exposing information to someone not authorized to see it Reading key material from an app D enial of Service Availability Deny or degrade service to users Crashing the web site, sending a packet and absorbing seconds of CPU time, or routing packets into a black hole E levation of Privilege AuthorizationGain capabilities without proper authorization Allowing a remote internet user to run commands is the classic example, but running kernel code from lower trust levels is also EoP

Different threats affect each type of element Process Data Store STRIDESTRIDE        Element ? Dataflow External Entity

Apply STRIDE Threats To Each Element For each thing on the diagram: Apply relevant parts of STRIDE External Entity: SR Process: STRIDE Data Store, Data Flow: TID Data stores which are logs: TID+R Data flow inside a process: Don’t worry about T,I or D Number things so you don’t miss them

A Real Level-0 DFD (Castle) TID STRIDE Etc…

Use the trust boundaries Trusted/high code reading from untrusted/low Validate everything for specific uses High code writing to low Make sure your errors don’t give away too much

STRIDE/Element: Mitigating Diagram Identify Threats MitigateValidate Vision

 Mitigation:  To address or alleviate a problem  Protect customers  Design secure software  Why bother if you:  Create a great model  Identify lots of threats  Stop  So find problems and fix them  File bugs to track them Mitigation is the point of threat modeling

 Address each threat  Four ways to address threats:  Redesign to eliminate  Apply standard mitigations  Invent new mitigations  Riskier  Accept vulnerability in design  Address each threat! Mitigate

SpoofingAuthentication To authenticate principals:  Basic & Digest authentication  LiveID authentication  Cookie authentication  Windows authentication (NTLM)  Kerberos authentication  PKI systems such as SSL/TLS and certificates  IPSec  Digitally signed packets To authenticate code or data:  Digital signatures  Message authentication codes  Hashes TamperingIntegrity  Windows Mandatory Integrity Controls  ACLs  Digital signatures  Message Authentication Codes RepudiationNon Repudiation  Strong Authentication  Secure logging and auditing  Digital Signatures  Secure time stamps  Trusted third parties Information DisclosureConfidentiality  Encryption  ACLS Denial of ServiceAvailability  ACLs  Filtering  Quotas  Authorization  High availability designs Elevation of PrivilegeAuthorization  ACLs  Group or role membership  Privilege ownership  Permissions  Input validation Standard Mitigations

 Mitigations are an area of expertise like networking, databases, or cryptography  Amateurs make mistakes, so do pros  Mitigation failures will appear to work  Until an expert looks at them  We hope that expert will work for us  When you need to invent mitigations, get expert help  We will try to talk you off the ledge  We will try to talk you off the ledge Inventing Mitigations is Hard

STRIDE/Element: Validating Model Identify Threats MitigateValidate Vision

 Validate the whole TM  Does diagram match final code?  Are threats enumerated?  Minimum: STRIDE per element that touches a trust boundary  Has Test reviewed the model?  Created appropriate test plans  Tester approach often finds issues with TM, or details  Is each threat mitigated?  Are mitigations done right  Did you check these before FSR?  Shipping will be more predictable Validating Threat Models

 Threats  Describe the attack  Describe the context  Describe the impact  Mitigations:  Associate with a threat  Describe the mitigation(s)  File a bug  Fuzzing is a test tactic, not a mitigation Validate Quality of Threats & Mitigations

 Dependencies  What other code are you using?  What security functions are in that other code?  Are you sure?  Assumptions  Things you note as you build the threat model  “HTTP.sys will protect us against SQL Injection”  “LPC will protect us from malformed messages”  CryptGenRandom will give us crypto-strong randomness Validate Information Captured

 Start with a DFD walkthrough  Identify most interesting elements  Assets (if you identify any)  Entry points/trust boundaries  Walk through STRIDE against those  Threats that cross elements/recur  Consider library, redesigns Effective Threat Modeling Meetings

P AUSE FOR QUESTIONS BEFORE EXERCISE

 Handout  Work in teams to:  Identify all diagram elements  Identify threat types to each element  Identify at least 3 threats  Identify first order mitigations  Extra credit: improve the diagram Exercise

Identify all Elements: 16 Elements… …and 2 trust boundaries, which don’t have threats against them

Identify threat types to each element Administrator Admin console (2), Host SW (3) ThreatsElements Config data (4), Integrity data (5), Filesystem data (6), registry (7) 8. raw reg data 9.raw filesystem data 10. commands 11. resource integrity data 12. read settings 13. read

 Specific  Understand threat and impact  Identify 1st order mitigations Identify Threats!

END EXERCISE

 Threat model your work!  Start early  Track changes  Work with your Security Advisors!  Talk to your “dependencies” about security assumptions  Learn more  Call to Action

 MSDN Magazine  Uncover Security Design Flaws Using the STRIDE Approach default.aspx default.aspx default.aspx   Getting Started with the SDL TM Too  us/magazine/ securitybriefs.aspx us/magazine/ securitybriefs.aspx us/magazine/ securitybriefs.aspx  Lots more SDL: Training and Resources   Books: lots of info which drove evolution of better processes Learning Resources