SlideShare a Scribd company logo
1 of 27
Download to read offline
Secure Design: Threat Modeling
Narudom Roongsiriwong, CISSP
OWASP Meeting, September 30, 2021
WhoAmI
● Lazy Blogger
– Japan, Security, FOSS, Politics, Christian
– http://narudomr.blogspot.com
● Information Security since 1995
● Web Application Development since 1998
● SVP, Cloud and Security Architect, Digital Innovation and Data Group,
Bank of Ayudhya (Krungsri) PCL
● Security and Risk Committee at National Digital ID Co.,Ltd.
● APAC Research Advisory Council Member at Cloud Security Alliance Asia Pacific
● Co-Chair, Hybrid Cloud Security Working Group at Cloud Security Alliance
● Consultant, OWASP Thailand Chapter
● Chief Information Security Officer (CISO) of the Year 2017, NetworkWorld Asia
● Contact: narudom@owasp.org
Application Security Risks
Weakness
Attack
Threat
Agents
Impact
Weakness
Attack
Attack
Vectors
Security
Weaknesses
Technical
Impacts
Business
Impacts
Attack
Impact
Impact
Asset
Function
Asset
Weakness
Control
Control
Control
Weakness
Security
Controls
Source: OWASP: OWASP Top 10 2017
When We Do Threat Modeling
Security as an Afterthought
Relative cost of security fixes, based on time of detection
Source: The National Institute of Standards and Technology (NIST)
Attack Surface Evaluation
Attack Surface Evaluation
Attack Surface
System’s Surface
(e.g., API)
Attacks
Intuition
Reduce the ways attackers can penetrate surface
Increase system’s security
A software or application’s attack surface is the measure of its
exposure of being exploited by a threat agent, i.e., weaknesses
in its entry and exit points that a malicious attacker can exploit
to his or her advantage.
Attacks on the Internet
Source: IBM Software Group, Rational Software
Relative Attack Surface
● Simple way of measuring potential for attack
● Goal of a product should be to reduce attack surface
– Lower privilege
– Turn features off
– Defense in depth
● Does not address code quality
● Hard to compare dissimilar products
Attack Surface Analysis
Attack Surface Analysis helps you to:
● Identify what functions and what parts of the system you
need to review/test for security vulnerabilities
● Identify high risk areas of code that require defense-in-depth
protection - what parts of the system that you need to
defend
● Identify when you have changed the attack surface and need
to do some kind of threat assessment
Defining the Attack Surface of an Application
● The sum of all paths for data/commands into and out of the
application
● The code that protects these paths
– including resource connection and authentication,
authorization, activity logging, data validation and encoding
● All valuable data used in the application
– Including secrets and keys, intellectual property, critical
business data, personal data and PII, and
● The code that protects these data
– Including encryption and checksums, access auditing, and
data integrity and operational security controls.
Identifying and Mapping the Attack Surface
Points of entry/exit: Types based on function, design and
technology:
● User interface (UI) forms and fields
● HTTP headers and cookies
● APIs
● Files
● Databases
● Other local storage
● Email or other kinds of messages
● Run-time arguments
● ...Your points of entry/exit
● Login/authentication entry points
● Admin interfaces
● Inquiries and search functions
● Data entry (CRUD) forms
● Business workflows
● Transactional interfaces/APIs
● Operational command and monitoring
interfaces/APIs
● Interfaces with other
applications/systems
● ...Your types
Measuring and Assessing the Attack Surface
Focus on remote entry points – interfaces with outside systems and to the
Internet – and especially where the system allows anonymous, public access.
● Network-facing, especially internet-facing code
● Web forms
● Files from outside of the network
● Backwards compatible interfaces with other systems – old protocols,
sometimes old code and libraries, hard to maintain and test multiple
versions
● Custom APIs – protocols etc – likely to have mistakes in design and
implementation
● Security code: anything to do with cryptography, authentication,
authorization (access control) and session management
Threat Modeling
Threat Modeling
What Is Threat Modeling?
Threat modeling is an approach for analyzing the security
of an application. It is a structured approach that enables
you to identify, quantify, and address the security risks
associated with an application.
Why Threat Modeling?
● It is better to find security flaws when there is time to fix
them.
● It can save time, revenue and the reputation of your
company.
● To build a secure application.
● To bridge the gap between developers and security.
● It provides a document of all the identified threats and rated
threats.
● It offers knowledge and awareness of the latest risks and
vulnerabilities.
How to Do Threat Modeling
Define
Model
Measure
Step 1 Identify security objectives and assets
Step 2 Profile the application
Step 3 Decompose the application
Step 4 Identify threats and vulnerabilities
Step 5 Document the threats
Step 6 Prioritize and mitigate the threats
Identify Security Objectives and Assets
● Examples
– Prevention of data theft
– Protection of IP
– Provide system high availability
● Inputs to identify security objectives
– Internal organizational policies and standards
– Regulations, compliance, and privacy requirements
– Business and functional requirements
Identify the physical topology
Identify the logical topology
Determine components, services, protocols, and ports
Identify data elements
Generate a data access control matrix
Profile the Application
Decompose the Application
Identify trust
boundaries
Identify entry
points
Identify exit
points
Identify data
flows
Identify
privileged code
Document the
security profile
Identify threats and vulnerabilities
● Think like an attacker (brainstorming and using attack trees)
● Use a categorized threat list
– NSA IAM
– OCTAVE
– STRIDE
Attack Tree Example
Attack Tree with Indicator Value Example
X, Y, Z
X – cost
Y – probability
Z – technical ability
STRIDE Category of Threats
Goal Core Description
Spoofing Authentication Can an attacker impersonate another user or identity?
Tampering Integrity Can the data be tampered with while it is in transit or in
storage or archives?
Repudiation Accountability Can the attacker (user or process) deny the attack?
Information
Disclosure
Confidentiality Can information be disclosed to unauthorized users?
Denial of
service
Availability Is denial of service a possibility?
Elevation of
privilege
Authorization Can the attacker bypass least privilege implementation
and execute the software at elevated or administrative
privileges?
Document the Threat: Example
Threat Identifier T#0001
Threat description Injection of SQL commands
Threat targets Data access component.
Backend database
Attack techniques Attacker appends SQL commands to user name, which
is used to form an SQL query.
Security impact Information disclosure.
Alteration.
Destruction (drop table/procédures, delete data, etc.).
Authentication bypass.
Risk High.
Risk Calculation Tool: CVSS V3.0 Calculator
https://www.first.org/cvss/calculator/3.0
Q&A

More Related Content

What's hot

SIEM presentation final
SIEM presentation finalSIEM presentation final
SIEM presentation final
Rizwan S
 
Cybersecurity trends - What to expect in 2023
Cybersecurity trends - What to expect in 2023Cybersecurity trends - What to expect in 2023
Cybersecurity trends - What to expect in 2023
PECB
 
Security operations center-SOC Presentation-مرکز عملیات امنیت
Security operations center-SOC Presentation-مرکز عملیات امنیتSecurity operations center-SOC Presentation-مرکز عملیات امنیت
Security operations center-SOC Presentation-مرکز عملیات امنیت
ReZa AdineH
 

What's hot (20)

Cyber attacks and IT security management in 2025
Cyber attacks and IT security management in 2025Cyber attacks and IT security management in 2025
Cyber attacks and IT security management in 2025
 
Upgrade Your SOC with Cortex XSOAR & Elastic SIEM
Upgrade Your SOC with Cortex XSOAR & Elastic SIEMUpgrade Your SOC with Cortex XSOAR & Elastic SIEM
Upgrade Your SOC with Cortex XSOAR & Elastic SIEM
 
SIEM presentation final
SIEM presentation finalSIEM presentation final
SIEM presentation final
 
What is cyber resilience?
What is cyber resilience?What is cyber resilience?
What is cyber resilience?
 
Security architecture
Security architectureSecurity architecture
Security architecture
 
Secure SDLC Framework
Secure SDLC FrameworkSecure SDLC Framework
Secure SDLC Framework
 
Security Information and Event Management (SIEM)
Security Information and Event Management (SIEM)Security Information and Event Management (SIEM)
Security Information and Event Management (SIEM)
 
Cyber Resilience
Cyber ResilienceCyber Resilience
Cyber Resilience
 
Secure Software Development Life Cycle
Secure Software Development Life CycleSecure Software Development Life Cycle
Secure Software Development Life Cycle
 
Cybersecurity trends - What to expect in 2023
Cybersecurity trends - What to expect in 2023Cybersecurity trends - What to expect in 2023
Cybersecurity trends - What to expect in 2023
 
Global Cyber Threat Intelligence
Global Cyber Threat IntelligenceGlobal Cyber Threat Intelligence
Global Cyber Threat Intelligence
 
Security operations center-SOC Presentation-مرکز عملیات امنیت
Security operations center-SOC Presentation-مرکز عملیات امنیتSecurity operations center-SOC Presentation-مرکز عملیات امنیت
Security operations center-SOC Presentation-مرکز عملیات امنیت
 
Security risk management
Security risk managementSecurity risk management
Security risk management
 
Zero trust in a hybrid architecture
Zero trust in a hybrid architectureZero trust in a hybrid architecture
Zero trust in a hybrid architecture
 
Security Operation Center - Design & Build
Security Operation Center - Design & BuildSecurity Operation Center - Design & Build
Security Operation Center - Design & Build
 
Building a Security Operations Center (SOC).pdf
Building a Security Operations Center (SOC).pdfBuilding a Security Operations Center (SOC).pdf
Building a Security Operations Center (SOC).pdf
 
Security Awareness Training
Security Awareness TrainingSecurity Awareness Training
Security Awareness Training
 
Introduction to Cybersecurity
Introduction to CybersecurityIntroduction to Cybersecurity
Introduction to Cybersecurity
 
Vulnerability Management
Vulnerability ManagementVulnerability Management
Vulnerability Management
 
Attack modeling vs threat modelling
Attack modeling vs threat modellingAttack modeling vs threat modelling
Attack modeling vs threat modelling
 

Similar to Secure Design: Threat Modeling

Software Security Engineering
Software Security EngineeringSoftware Security Engineering
Software Security Engineering
Marco Morana
 

Similar to Secure Design: Threat Modeling (20)

Security Incident machnism Security Incident machnismSecurity Incident machni...
Security Incident machnism Security Incident machnismSecurity Incident machni...Security Incident machnism Security Incident machnismSecurity Incident machni...
Security Incident machnism Security Incident machnismSecurity Incident machni...
 
Security Shift Leftmost - Secure Architecture.pdf
Security Shift Leftmost - Secure Architecture.pdfSecurity Shift Leftmost - Secure Architecture.pdf
Security Shift Leftmost - Secure Architecture.pdf
 
Security Fundamentals and Threat Modelling
Security Fundamentals and Threat ModellingSecurity Fundamentals and Threat Modelling
Security Fundamentals and Threat Modelling
 
Application Security - Your Success Depends on it
Application Security - Your Success Depends on itApplication Security - Your Success Depends on it
Application Security - Your Success Depends on it
 
For Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecFor Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSec
 
Threat modelling(system + enterprise)
Threat modelling(system + enterprise)Threat modelling(system + enterprise)
Threat modelling(system + enterprise)
 
Security architecture principles isys 0575general att
Security architecture principles isys 0575general attSecurity architecture principles isys 0575general att
Security architecture principles isys 0575general att
 
Threat Modeling Web Applications
Threat Modeling Web ApplicationsThreat Modeling Web Applications
Threat Modeling Web Applications
 
Software Security Engineering
Software Security EngineeringSoftware Security Engineering
Software Security Engineering
 
How to develop an AppSec culture in your project
How to develop an AppSec culture in your project How to develop an AppSec culture in your project
How to develop an AppSec culture in your project
 
Building an AppSec Culture
Building an AppSec Culture Building an AppSec Culture
Building an AppSec Culture
 
002.itsecurity bcp v1
002.itsecurity bcp v1002.itsecurity bcp v1
002.itsecurity bcp v1
 
Information Security and the SDLC
Information Security and the SDLCInformation Security and the SDLC
Information Security and the SDLC
 
Careers in Cyber Security
Careers in Cyber SecurityCareers in Cyber Security
Careers in Cyber Security
 
Building an Analytics - Enabled SOC Breakout Session
Building an Analytics - Enabled SOC Breakout Session Building an Analytics - Enabled SOC Breakout Session
Building an Analytics - Enabled SOC Breakout Session
 
Protecting microservices using secure design patterns 1.0
Protecting microservices using secure design patterns 1.0Protecting microservices using secure design patterns 1.0
Protecting microservices using secure design patterns 1.0
 
Unlock Security Insight from Machine Data
Unlock Security Insight from Machine DataUnlock Security Insight from Machine Data
Unlock Security Insight from Machine Data
 
Arved sandstrom - the rotwithin - atlseccon2011
Arved sandstrom - the rotwithin - atlseccon2011Arved sandstrom - the rotwithin - atlseccon2011
Arved sandstrom - the rotwithin - atlseccon2011
 
Virtual Gov Day - Security Breakout - Deloitte
Virtual Gov Day - Security Breakout - DeloitteVirtual Gov Day - Security Breakout - Deloitte
Virtual Gov Day - Security Breakout - Deloitte
 
CIA-Triad-Presentation.pdf
CIA-Triad-Presentation.pdfCIA-Triad-Presentation.pdf
CIA-Triad-Presentation.pdf
 

More from Narudom Roongsiriwong, CISSP

More from Narudom Roongsiriwong, CISSP (20)

Biometric Authentication.pdf
Biometric Authentication.pdfBiometric Authentication.pdf
Biometric Authentication.pdf
 
Security Patterns for Software Development
Security Patterns for Software DevelopmentSecurity Patterns for Software Development
Security Patterns for Software Development
 
How Good Security Architecture Saves Corporate Workers from COVID-19
How Good Security Architecture Saves Corporate Workers from COVID-19How Good Security Architecture Saves Corporate Workers from COVID-19
How Good Security Architecture Saves Corporate Workers from COVID-19
 
Secure Software Design for Data Privacy
Secure Software Design for Data PrivacySecure Software Design for Data Privacy
Secure Software Design for Data Privacy
 
Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
 
DevSecOps 101
DevSecOps 101DevSecOps 101
DevSecOps 101
 
National Digital ID Platform Technical Forum
National Digital ID Platform Technical ForumNational Digital ID Platform Technical Forum
National Digital ID Platform Technical Forum
 
IoT Security
IoT SecurityIoT Security
IoT Security
 
Embedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment IndustryEmbedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment Industry
 
Secure Your Encryption with HSM
Secure Your Encryption with HSMSecure Your Encryption with HSM
Secure Your Encryption with HSM
 
Application Security Verification Standard Project
Application Security Verification Standard ProjectApplication Security Verification Standard Project
Application Security Verification Standard Project
 
Coding Security: Code Mania 101
Coding Security: Code Mania 101Coding Security: Code Mania 101
Coding Security: Code Mania 101
 
Top 10 Bad Coding Practices Lead to Security Problems
Top 10 Bad Coding Practices Lead to Security ProblemsTop 10 Bad Coding Practices Lead to Security Problems
Top 10 Bad Coding Practices Lead to Security Problems
 
OWASP Top 10 Proactive Control 2016 (C5-C10)
OWASP Top 10 Proactive Control 2016 (C5-C10)OWASP Top 10 Proactive Control 2016 (C5-C10)
OWASP Top 10 Proactive Control 2016 (C5-C10)
 
Securing the Internet from Cyber Criminals
Securing the Internet from Cyber CriminalsSecuring the Internet from Cyber Criminals
Securing the Internet from Cyber Criminals
 
Secure Code Review 101
Secure Code Review 101Secure Code Review 101
Secure Code Review 101
 
Secure Software Development Adoption Strategy
Secure Software Development Adoption StrategySecure Software Development Adoption Strategy
Secure Software Development Adoption Strategy
 
Secure PHP Coding
Secure PHP CodingSecure PHP Coding
Secure PHP Coding
 
Application Security: Last Line of Defense
Application Security: Last Line of DefenseApplication Security: Last Line of Defense
Application Security: Last Line of Defense
 
AnyID and Privacy
AnyID and PrivacyAnyID and Privacy
AnyID and Privacy
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Secure Design: Threat Modeling

  • 1. Secure Design: Threat Modeling Narudom Roongsiriwong, CISSP OWASP Meeting, September 30, 2021
  • 2. WhoAmI ● Lazy Blogger – Japan, Security, FOSS, Politics, Christian – http://narudomr.blogspot.com ● Information Security since 1995 ● Web Application Development since 1998 ● SVP, Cloud and Security Architect, Digital Innovation and Data Group, Bank of Ayudhya (Krungsri) PCL ● Security and Risk Committee at National Digital ID Co.,Ltd. ● APAC Research Advisory Council Member at Cloud Security Alliance Asia Pacific ● Co-Chair, Hybrid Cloud Security Working Group at Cloud Security Alliance ● Consultant, OWASP Thailand Chapter ● Chief Information Security Officer (CISO) of the Year 2017, NetworkWorld Asia ● Contact: narudom@owasp.org
  • 4. When We Do Threat Modeling
  • 5. Security as an Afterthought Relative cost of security fixes, based on time of detection Source: The National Institute of Standards and Technology (NIST)
  • 6. Attack Surface Evaluation Attack Surface Evaluation
  • 7. Attack Surface System’s Surface (e.g., API) Attacks Intuition Reduce the ways attackers can penetrate surface Increase system’s security A software or application’s attack surface is the measure of its exposure of being exploited by a threat agent, i.e., weaknesses in its entry and exit points that a malicious attacker can exploit to his or her advantage.
  • 8. Attacks on the Internet Source: IBM Software Group, Rational Software
  • 9. Relative Attack Surface ● Simple way of measuring potential for attack ● Goal of a product should be to reduce attack surface – Lower privilege – Turn features off – Defense in depth ● Does not address code quality ● Hard to compare dissimilar products
  • 10. Attack Surface Analysis Attack Surface Analysis helps you to: ● Identify what functions and what parts of the system you need to review/test for security vulnerabilities ● Identify high risk areas of code that require defense-in-depth protection - what parts of the system that you need to defend ● Identify when you have changed the attack surface and need to do some kind of threat assessment
  • 11. Defining the Attack Surface of an Application ● The sum of all paths for data/commands into and out of the application ● The code that protects these paths – including resource connection and authentication, authorization, activity logging, data validation and encoding ● All valuable data used in the application – Including secrets and keys, intellectual property, critical business data, personal data and PII, and ● The code that protects these data – Including encryption and checksums, access auditing, and data integrity and operational security controls.
  • 12. Identifying and Mapping the Attack Surface Points of entry/exit: Types based on function, design and technology: ● User interface (UI) forms and fields ● HTTP headers and cookies ● APIs ● Files ● Databases ● Other local storage ● Email or other kinds of messages ● Run-time arguments ● ...Your points of entry/exit ● Login/authentication entry points ● Admin interfaces ● Inquiries and search functions ● Data entry (CRUD) forms ● Business workflows ● Transactional interfaces/APIs ● Operational command and monitoring interfaces/APIs ● Interfaces with other applications/systems ● ...Your types
  • 13. Measuring and Assessing the Attack Surface Focus on remote entry points – interfaces with outside systems and to the Internet – and especially where the system allows anonymous, public access. ● Network-facing, especially internet-facing code ● Web forms ● Files from outside of the network ● Backwards compatible interfaces with other systems – old protocols, sometimes old code and libraries, hard to maintain and test multiple versions ● Custom APIs – protocols etc – likely to have mistakes in design and implementation ● Security code: anything to do with cryptography, authentication, authorization (access control) and session management
  • 15. What Is Threat Modeling? Threat modeling is an approach for analyzing the security of an application. It is a structured approach that enables you to identify, quantify, and address the security risks associated with an application.
  • 16. Why Threat Modeling? ● It is better to find security flaws when there is time to fix them. ● It can save time, revenue and the reputation of your company. ● To build a secure application. ● To bridge the gap between developers and security. ● It provides a document of all the identified threats and rated threats. ● It offers knowledge and awareness of the latest risks and vulnerabilities.
  • 17. How to Do Threat Modeling Define Model Measure Step 1 Identify security objectives and assets Step 2 Profile the application Step 3 Decompose the application Step 4 Identify threats and vulnerabilities Step 5 Document the threats Step 6 Prioritize and mitigate the threats
  • 18. Identify Security Objectives and Assets ● Examples – Prevention of data theft – Protection of IP – Provide system high availability ● Inputs to identify security objectives – Internal organizational policies and standards – Regulations, compliance, and privacy requirements – Business and functional requirements
  • 19. Identify the physical topology Identify the logical topology Determine components, services, protocols, and ports Identify data elements Generate a data access control matrix Profile the Application
  • 20. Decompose the Application Identify trust boundaries Identify entry points Identify exit points Identify data flows Identify privileged code Document the security profile
  • 21. Identify threats and vulnerabilities ● Think like an attacker (brainstorming and using attack trees) ● Use a categorized threat list – NSA IAM – OCTAVE – STRIDE
  • 23. Attack Tree with Indicator Value Example X, Y, Z X – cost Y – probability Z – technical ability
  • 24. STRIDE Category of Threats Goal Core Description Spoofing Authentication Can an attacker impersonate another user or identity? Tampering Integrity Can the data be tampered with while it is in transit or in storage or archives? Repudiation Accountability Can the attacker (user or process) deny the attack? Information Disclosure Confidentiality Can information be disclosed to unauthorized users? Denial of service Availability Is denial of service a possibility? Elevation of privilege Authorization Can the attacker bypass least privilege implementation and execute the software at elevated or administrative privileges?
  • 25. Document the Threat: Example Threat Identifier T#0001 Threat description Injection of SQL commands Threat targets Data access component. Backend database Attack techniques Attacker appends SQL commands to user name, which is used to form an SQL query. Security impact Information disclosure. Alteration. Destruction (drop table/procédures, delete data, etc.). Authentication bypass. Risk High.
  • 26. Risk Calculation Tool: CVSS V3.0 Calculator https://www.first.org/cvss/calculator/3.0
  • 27. Q&A