SlideShare a Scribd company logo
Web Application Security (PHP)
Zakieh Alizadeh
zakiehalizadeh@gmail.com
APA Laboratory – Ferdowsi University of Mashhad
Session 2
Application Threat Modeling
Application Threat Modeling
 Scenario : “Producing Thread Model For The College Library Website”
 Table of Content
 Introduction
 Decompose The Application
o External Dependencies
o Entry Points
o Assets
o Trust Levels
 Determine And Rank Threats
o o Threat Categorization
o o Introducing STRIDE And ASF
 Security Controls
 Countermeasure Identification
 Mitigation Strategies
Application Threat Modeling
Decompose The Application
Determine And Rank Threats
Security Controls
 Countermeasure Identification
 Mitigation Strategies
Application Threat Modeling
Introduction
 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
 Threat modeling is not an approach to reviewing code, but it does
complement the security code review process.
 The inclusion of threat modeling in the SDLC can help to ensure that
applications are being developed with security built-in from the very
beginning.
Application Threat Modeling
Why Use Threat Modeling?
 Shape your application design to meet your security objectives.
 Help make trade-offs during key engineering decisions.(in different
conditions)
 Reduce risk of security issues arising during development and operations.
Application Threat Modeling
Terminology
 Threat.
o A threat is an undesired event. A potential occurrence, often best
described as an effect that might damage or compromise an asset or
objective. It may or may not be malicious in nature.
 Vulnerability
o A vulnerability is a weakness in some aspect or feature of a system
that makes an exploit possible. Vulnerabilities can exist at the network,
host, or application levels
Application Threat Modeling
Terminology
 Attack (or exploit).
o An attack is an action taken that utilizes one or more vulnerabilities to
realize a threat.
 Countermeasure.
o Countermeasures address vulnerabilities to reduce the probability of
attacks or the impacts of threats. They do not directly address threats;
instead, they address the factors that define the threats.
Application Threat Modeling
Terminology
 Authentication
 Authorization
 Confidentiality
 Integrity
 Availability
Application Threat Modeling
Approaches to threat modeling
 Attacker-centric
 Software-centric
 Asset-centric
Application Threat Modeling
Approaches to threat modeling
 Attacker-centric
o Attacker-centric threat modeling starts with an attacker, and evaluates
their goals, and how they might achieve them. Attacker's motivations
are often considered, for example:
Attacker-centric:
"The attacker wants login illegal”
Simple Thread modelling:
Identify thered  guest password
Countermeasure Identification.
Mitigation Strategies  allow 4 time
enter incorrect password, then block
user
Application Threat Modeling
 Approaches to threat modeling
 Software-centric
o threat modeling (also called 'system-centric,' 'design-centric,' or 'architecture-centric')
starts from the design of the system, and attempts to step through a model of the
system, looking for types of attacks against each element of the model.
Attacker-centric:
"The attacker wants login illegal”
Simple Thread modelling:
Identify thered  guest password
Countermeasure Identification.
Mitigation Strategies  allow 4 time
enter incorrect password, then block
user
Application Threat Modeling
Approaches to threat modeling
 Asset-centric
o threat modeling involves starting from assets entrusted to a system,
such as a collection of sensitive personal information.
Asset:
“User Personall data”
Simple Thread modelling:
Identify thered  Acceess data via SQL Injection
Countermeasure Identification.
Mitigation Strategies
1. Secure DataBase
2. Data Validation Strategies
Application Threat Modeling
Threat Modeling Perspective
 Threat modeling has changed in recent times (around 2004) to take on a
more defensive perspective rather than an adversarial perspective. The
problem with an adversarial perspective is that it is reactive.
o defensive perspective
o adversarial perspective
Application Threat Modeling
adversarial perspectiev
 examine software applications, trying to find holes in it they might be
exploited. Techniques :
o penetration testing (white box and black box)
o and code review.
 Disadvantages:
o use them once the software has been written.
o defensive mechanisms patched in later
o security bugs vs functionality bugs. Since code around security usually
touches every portion of the application, the 'ripple effect' makes the
cost exponentially more expensive than functionality bugs.
Application Threat Modeling
defensive perspective
 This means that threats are examined and countermeasures, or security
services, are identified at the design state of the application before any
code is written. This way the defensive mechanisms are built into the
code as it is written rather than patched in later.
 Disadvantages:
o all threats can not be identified unless the code is trivially simple and
often threat modeling on a defender's perspective will cause the
development team to falsely believe that the code is secure.
Application Threat Modeling
defensive perspective
 Thread Modeling can be perform erly:
Application Threat Modeling
defensive perspective
 Thread Modeling can also be perform later:
Application Threat Modeling
Steps
 Decompose The Application
o External Dependencies
o Entry Points
o Assets
o Trust Levels
 Determine And Rank Threats
o Security Controls
 Countermeasure Identification
 Mitigation Strategies
Application Threat Modeling
Decompose The Application
 External Dependencies
o External dependencies are items external to the code of the application
that may pose a threat to the application. These items are typically still
within the control of the organization, but possibly not within the control
of the development team. Such as Server, database server,…
 Entry Points
o Entry points define the interfaces through which potential attackers can
interact with the application or supply it with data. such as forms,Ports
Application Threat Modeling
Decompose The Application
 Assets
o The system must have something that the attacker is interested in;
these items/areas of interest are defined as assets. Such as user
personal data, company's reputation
 Trust Levels
o Trust levels represent the access rights that the application will grant to
external entities.
Application Threat Modeling
Decompose The “College Library Website”
 Model Information: documented as
Application Threat Modeling
 Decompose The “College Library Website”
 External Dependencies: documented as
o ID
o description
Application Threat Modeling
Decompose The “College Library Website”
 Entry Points: documented as
o ID
o Name
o Description
o Trust Levels
Application Threat Modeling
Decompose The “College Library Website”
Application Threat Modeling
Decompose The “College Library Website”
 Assets : documented as
o ID
o Name
o Description
o Trust Levels
Application Threat Modeling
Decompose The “College Library Website”
 Assets
Application Threat Modeling
 Decompose The “College Library Website”
 Assets
Application Threat Modeling
 Decompose The “College Library Website”
 Assets
Application Threat Modeling
 Decompose The “College Library Website”
 Trust Levels
Application Threat Modeling
Determine and Rank
 Threat Categorization
 The first step in the determination of threats is adopting a threat
categorization. A threat categorization provides a set of threat categories
with corresponding examples :
o STRIDE :adversarial perspectiev
o Application Security Frame (ASF ): defensive perspective
Application Threat Modeling
 Determine and Rank Threats of
STRIDE ::adversarial perspectiev
Spoofing Tampering Repudition Information
disclosure
Elevation of
privilage
Denial
of service
ASF :: defensive perspective
Data
Protection in
Storage and
Transit
Exception
Management
Data
Validation
Configuration
Management
Authorization Authenticatio
n
Auditing &
Logging
Application Threat Modeling
 Determine and Rank Threats
Application Threat Modeling
Security Controls
 the review team should try to identify the set of controls that could
prevent these threat agents from causing those impacts. primary focus of
the code review :
o be to ensure that these security controls are in place,
o that these security controls work properly
o that these security controls are correctly invoked in all the necessary
places.
This is main goal of this
class
Application Threat Modeling
Security Controls
 Authentication
 Authorization
 Cookie Management
 Data/Input Validation
 Error Handling/Information leakage:
 Logging/Auditing:
 Secure Code Environment:
 Session Management:
Application Threat Modeling
Threat Analysis
 Threat analysis as such is the identification of the threats to the application,
and involves the analysis of each aspect of the application functionality .
Application Threat Modeling
 Countermeasure Identification
 The purpose of the countermeasure identification is to determine if there
is some kind of protective measure (e.g. security control, policy
measures) in place that can prevent each threat previosly identified via
threat analysis from being realized.
 Vulnerabilities are then those threats that have no countermeasures.
Since each of these threats has been categorized either with STRIDE or
ASF, it is possible to find appropriate countermeasures in the application
within the given category.
Application Threat Modeling
 Countermeasure Identification
 Some STRIDE Mitigation Techniques
Application Threat Modeling
Mitigation Strategies
 Do nothing: for example, hoping for the best
 Inform about the risk: for example, warning user population about the risk
 Mitigate the risk: for example, by putting countermeasures in place
 Accept the risk: for example, after evaluating the impact of the exploitation
 Transfer the risk: for example, through contractual agreements and insurance
 Terminate the risk: for example, shutdown, turn-off, unplug or decommission
the asset
Application Threat Modeling

More Related Content

What's hot

Critical Capabilities for MDR Services - What to Know Before You Buy
Critical Capabilities for MDR Services - What to Know Before You BuyCritical Capabilities for MDR Services - What to Know Before You Buy
Critical Capabilities for MDR Services - What to Know Before You Buy
Fidelis Cybersecurity
 
Threat Modeling Everything
Threat Modeling EverythingThreat Modeling Everything
Threat Modeling Everything
Anne Oikarinen
 
Cyber Threat Intelligence.pptx
Cyber Threat Intelligence.pptxCyber Threat Intelligence.pptx
Cyber Threat Intelligence.pptx
AbimbolaFisher1
 
Threat Modeling to Reduce Software Security Risk
Threat Modeling to Reduce Software Security RiskThreat Modeling to Reduce Software Security Risk
Threat Modeling to Reduce Software Security Risk
Security Innovation
 
Secure Coding and Threat Modeling
Secure Coding and Threat ModelingSecure Coding and Threat Modeling
Secure Coding and Threat Modeling
Miriam Celi, CISSP, GISP, MSCS, MBA
 
Risks threats and vulnerabilities
Risks threats and vulnerabilitiesRisks threats and vulnerabilities
Risks threats and vulnerabilities
Manish Chaurasia
 
Risk Analysis Of Banking Malware Attacks
Risk Analysis Of Banking Malware AttacksRisk Analysis Of Banking Malware Attacks
Risk Analysis Of Banking Malware Attacks
Marco Morana
 
Threat Modeling In 2021
Threat Modeling In 2021Threat Modeling In 2021
Threat Modeling In 2021
Adam Shostack
 
Introduction to Cybersecurity
Introduction to CybersecurityIntroduction to Cybersecurity
Introduction to Cybersecurity
Krutarth Vasavada
 
Microsoft threat modeling tool 2016
Microsoft threat modeling tool 2016Microsoft threat modeling tool 2016
Microsoft threat modeling tool 2016
Rihab Chebbah
 
Scalable threat modelling with risk patterns
Scalable threat modelling with risk patternsScalable threat modelling with risk patterns
Scalable threat modelling with risk patterns
Stephen de Vries
 
Application Security | Application Security Tutorial | Cyber Security Certifi...
Application Security | Application Security Tutorial | Cyber Security Certifi...Application Security | Application Security Tutorial | Cyber Security Certifi...
Application Security | Application Security Tutorial | Cyber Security Certifi...
Edureka!
 
Vulnerability and Patch Management
Vulnerability and Patch ManagementVulnerability and Patch Management
Vulnerability and Patch Management
n|u - The Open Security Community
 
Cybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationCybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your Organization
TriCorps Technologies
 
Threat Modeling Using STRIDE
Threat Modeling Using STRIDEThreat Modeling Using STRIDE
Threat Modeling Using STRIDE
Girindro Pringgo Digdo
 
Cybersecurity
CybersecurityCybersecurity
Cybersecurity
ANGIEPAEZ304
 
Cyber Security Governance
Cyber Security GovernanceCyber Security Governance
Cyber Security Governance
Priyanka Aash
 
Introduction to MITRE ATT&CK
Introduction to MITRE ATT&CKIntroduction to MITRE ATT&CK
Introduction to MITRE ATT&CK
Arpan Raval
 
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
 
Threat Intelligence 101 - Steve Lodin - Submitted
Threat Intelligence 101 - Steve Lodin - SubmittedThreat Intelligence 101 - Steve Lodin - Submitted
Threat Intelligence 101 - Steve Lodin - SubmittedSteve Lodin
 

What's hot (20)

Critical Capabilities for MDR Services - What to Know Before You Buy
Critical Capabilities for MDR Services - What to Know Before You BuyCritical Capabilities for MDR Services - What to Know Before You Buy
Critical Capabilities for MDR Services - What to Know Before You Buy
 
Threat Modeling Everything
Threat Modeling EverythingThreat Modeling Everything
Threat Modeling Everything
 
Cyber Threat Intelligence.pptx
Cyber Threat Intelligence.pptxCyber Threat Intelligence.pptx
Cyber Threat Intelligence.pptx
 
Threat Modeling to Reduce Software Security Risk
Threat Modeling to Reduce Software Security RiskThreat Modeling to Reduce Software Security Risk
Threat Modeling to Reduce Software Security Risk
 
Secure Coding and Threat Modeling
Secure Coding and Threat ModelingSecure Coding and Threat Modeling
Secure Coding and Threat Modeling
 
Risks threats and vulnerabilities
Risks threats and vulnerabilitiesRisks threats and vulnerabilities
Risks threats and vulnerabilities
 
Risk Analysis Of Banking Malware Attacks
Risk Analysis Of Banking Malware AttacksRisk Analysis Of Banking Malware Attacks
Risk Analysis Of Banking Malware Attacks
 
Threat Modeling In 2021
Threat Modeling In 2021Threat Modeling In 2021
Threat Modeling In 2021
 
Introduction to Cybersecurity
Introduction to CybersecurityIntroduction to Cybersecurity
Introduction to Cybersecurity
 
Microsoft threat modeling tool 2016
Microsoft threat modeling tool 2016Microsoft threat modeling tool 2016
Microsoft threat modeling tool 2016
 
Scalable threat modelling with risk patterns
Scalable threat modelling with risk patternsScalable threat modelling with risk patterns
Scalable threat modelling with risk patterns
 
Application Security | Application Security Tutorial | Cyber Security Certifi...
Application Security | Application Security Tutorial | Cyber Security Certifi...Application Security | Application Security Tutorial | Cyber Security Certifi...
Application Security | Application Security Tutorial | Cyber Security Certifi...
 
Vulnerability and Patch Management
Vulnerability and Patch ManagementVulnerability and Patch Management
Vulnerability and Patch Management
 
Cybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationCybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your Organization
 
Threat Modeling Using STRIDE
Threat Modeling Using STRIDEThreat Modeling Using STRIDE
Threat Modeling Using STRIDE
 
Cybersecurity
CybersecurityCybersecurity
Cybersecurity
 
Cyber Security Governance
Cyber Security GovernanceCyber Security Governance
Cyber Security Governance
 
Introduction to MITRE ATT&CK
Introduction to MITRE ATT&CKIntroduction to MITRE ATT&CK
Introduction to MITRE ATT&CK
 
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
 
Threat Intelligence 101 - Steve Lodin - Submitted
Threat Intelligence 101 - Steve Lodin - SubmittedThreat Intelligence 101 - Steve Lodin - Submitted
Threat Intelligence 101 - Steve Lodin - Submitted
 

Similar to Session2-Application Threat Modeling

Threat modelling
Threat modellingThreat modelling
Threat modelling
Rajeev Venkata
 
Application Threat Modeling
Application Threat ModelingApplication Threat Modeling
Application Threat ModelingMarco Morana
 
Software Security Engineering
Software Security EngineeringSoftware Security Engineering
Software Security EngineeringMarco Morana
 
20160831_app_storesecurity_Seminar
20160831_app_storesecurity_Seminar20160831_app_storesecurity_Seminar
20160831_app_storesecurity_Seminar
Jisoo Park
 
Fendley how secure is your e learning
Fendley how secure is your e learningFendley how secure is your e learning
Fendley how secure is your e learningBryan Fendley
 
Assessing and Measuring Security in Custom SAP Applications
Assessing and Measuring Security in Custom SAP ApplicationsAssessing and Measuring Security in Custom SAP Applications
Assessing and Measuring Security in Custom SAP Applications
sebastianschinzel
 
What is Threat Modeling .pptx
What is Threat Modeling .pptxWhat is Threat Modeling .pptx
What is Threat Modeling .pptx
Infosectrain3
 
Web Application Security Testing
Web Application Security TestingWeb Application Security Testing
Web Application Security TestingMarco Morana
 
Application Security Testing
Application Security TestingApplication Security Testing
Application Security Testing
Anju21552
 
Software Security Initiatives
Software Security InitiativesSoftware Security Initiatives
Software Security Initiatives
Marco Morana
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martindrewz lin
 
The security mindset securing social media integrations and social learning...
The security mindset   securing social media integrations and social learning...The security mindset   securing social media integrations and social learning...
The security mindset securing social media integrations and social learning...franco_bb
 
Application Threat Modeling In Risk Management
Application Threat Modeling In Risk ManagementApplication Threat Modeling In Risk Management
Application Threat Modeling In Risk Management
Mel Drews
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
AHM Pervej Kabir
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
AHM Pervej Kabir
 
Threat modeling demystified
Threat modeling demystifiedThreat modeling demystified
Threat modeling demystified
Priyanka Aash
 
Ownux global March 2023.pdf
Ownux global March 2023.pdfOwnux global March 2023.pdf
Ownux global March 2023.pdf
Bella Nirvana Center
 
Threat modelling(system + enterprise)
Threat modelling(system + enterprise)Threat modelling(system + enterprise)
Threat modelling(system + enterprise)
abhimanyubhogwan
 
Factors Affecting The Threat Agent Involved
Factors Affecting The Threat Agent InvolvedFactors Affecting The Threat Agent Involved
Factors Affecting The Threat Agent Involved
Jennifer Campbell
 
Arved sandstrom - the rotwithin - atlseccon2011
Arved sandstrom - the rotwithin - atlseccon2011Arved sandstrom - the rotwithin - atlseccon2011
Arved sandstrom - the rotwithin - atlseccon2011
Atlantic Security Conference
 

Similar to Session2-Application Threat Modeling (20)

Threat modelling
Threat modellingThreat modelling
Threat modelling
 
Application Threat Modeling
Application Threat ModelingApplication Threat Modeling
Application Threat Modeling
 
Software Security Engineering
Software Security EngineeringSoftware Security Engineering
Software Security Engineering
 
20160831_app_storesecurity_Seminar
20160831_app_storesecurity_Seminar20160831_app_storesecurity_Seminar
20160831_app_storesecurity_Seminar
 
Fendley how secure is your e learning
Fendley how secure is your e learningFendley how secure is your e learning
Fendley how secure is your e learning
 
Assessing and Measuring Security in Custom SAP Applications
Assessing and Measuring Security in Custom SAP ApplicationsAssessing and Measuring Security in Custom SAP Applications
Assessing and Measuring Security in Custom SAP Applications
 
What is Threat Modeling .pptx
What is Threat Modeling .pptxWhat is Threat Modeling .pptx
What is Threat Modeling .pptx
 
Web Application Security Testing
Web Application Security TestingWeb Application Security Testing
Web Application Security Testing
 
Application Security Testing
Application Security TestingApplication Security Testing
Application Security Testing
 
Software Security Initiatives
Software Security InitiativesSoftware Security Initiatives
Software Security Initiatives
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martin
 
The security mindset securing social media integrations and social learning...
The security mindset   securing social media integrations and social learning...The security mindset   securing social media integrations and social learning...
The security mindset securing social media integrations and social learning...
 
Application Threat Modeling In Risk Management
Application Threat Modeling In Risk ManagementApplication Threat Modeling In Risk Management
Application Threat Modeling In Risk Management
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
 
Threat modeling demystified
Threat modeling demystifiedThreat modeling demystified
Threat modeling demystified
 
Ownux global March 2023.pdf
Ownux global March 2023.pdfOwnux global March 2023.pdf
Ownux global March 2023.pdf
 
Threat modelling(system + enterprise)
Threat modelling(system + enterprise)Threat modelling(system + enterprise)
Threat modelling(system + enterprise)
 
Factors Affecting The Threat Agent Involved
Factors Affecting The Threat Agent InvolvedFactors Affecting The Threat Agent Involved
Factors Affecting The Threat Agent Involved
 
Arved sandstrom - the rotwithin - atlseccon2011
Arved sandstrom - the rotwithin - atlseccon2011Arved sandstrom - the rotwithin - atlseccon2011
Arved sandstrom - the rotwithin - atlseccon2011
 

More from zakieh alizadeh

Session11-NoSQL InjectionPHP Injection
Session11-NoSQL InjectionPHP Injection Session11-NoSQL InjectionPHP Injection
Session11-NoSQL InjectionPHP Injection
zakieh alizadeh
 
Session10-PHP Misconfiguration
Session10-PHP MisconfigurationSession10-PHP Misconfiguration
Session10-PHP Misconfiguration
zakieh alizadeh
 
Session9-File Upload Security
Session9-File Upload SecuritySession9-File Upload Security
Session9-File Upload Security
zakieh alizadeh
 
S8-Session Managment
S8-Session ManagmentS8-Session Managment
S8-Session Managment
zakieh alizadeh
 
Session7-XSS & CSRF
Session7-XSS & CSRFSession7-XSS & CSRF
Session7-XSS & CSRF
zakieh alizadeh
 
Session6-Protecct Sensetive Data
Session6-Protecct Sensetive DataSession6-Protecct Sensetive Data
Session6-Protecct Sensetive Data
zakieh alizadeh
 
S5-Authorization
S5-AuthorizationS5-Authorization
S5-Authorization
zakieh alizadeh
 
Session4-Authentication
Session4-AuthenticationSession4-Authentication
Session4-Authentication
zakieh alizadeh
 
Session3 data-validation-sql injection
Session3 data-validation-sql injectionSession3 data-validation-sql injection
Session3 data-validation-sql injection
zakieh alizadeh
 
Session1-Introduce Http-HTTP Security headers
Session1-Introduce Http-HTTP Security headers Session1-Introduce Http-HTTP Security headers
Session1-Introduce Http-HTTP Security headers
zakieh alizadeh
 
Validating and Sanitizing User Data
Validating and Sanitizing  User DataValidating and Sanitizing  User Data
Validating and Sanitizing User Data
zakieh alizadeh
 
Session3 data-validation
Session3 data-validationSession3 data-validation
Session3 data-validationzakieh alizadeh
 
Introduce Yii
Introduce YiiIntroduce Yii
Introduce Yii
zakieh alizadeh
 

More from zakieh alizadeh (15)

Session11-NoSQL InjectionPHP Injection
Session11-NoSQL InjectionPHP Injection Session11-NoSQL InjectionPHP Injection
Session11-NoSQL InjectionPHP Injection
 
Session10-PHP Misconfiguration
Session10-PHP MisconfigurationSession10-PHP Misconfiguration
Session10-PHP Misconfiguration
 
Session9-File Upload Security
Session9-File Upload SecuritySession9-File Upload Security
Session9-File Upload Security
 
S8-Session Managment
S8-Session ManagmentS8-Session Managment
S8-Session Managment
 
Session7-XSS & CSRF
Session7-XSS & CSRFSession7-XSS & CSRF
Session7-XSS & CSRF
 
Session6-Protecct Sensetive Data
Session6-Protecct Sensetive DataSession6-Protecct Sensetive Data
Session6-Protecct Sensetive Data
 
S5-Authorization
S5-AuthorizationS5-Authorization
S5-Authorization
 
Session4-Authentication
Session4-AuthenticationSession4-Authentication
Session4-Authentication
 
Session3 data-validation-sql injection
Session3 data-validation-sql injectionSession3 data-validation-sql injection
Session3 data-validation-sql injection
 
Session1-Introduce Http-HTTP Security headers
Session1-Introduce Http-HTTP Security headers Session1-Introduce Http-HTTP Security headers
Session1-Introduce Http-HTTP Security headers
 
yii framework
yii frameworkyii framework
yii framework
 
Web security Contents
Web security ContentsWeb security Contents
Web security Contents
 
Validating and Sanitizing User Data
Validating and Sanitizing  User DataValidating and Sanitizing  User Data
Validating and Sanitizing User Data
 
Session3 data-validation
Session3 data-validationSession3 data-validation
Session3 data-validation
 
Introduce Yii
Introduce YiiIntroduce Yii
Introduce Yii
 

Recently uploaded

一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
nhiyenphan2005
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
JeyaPerumal1
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 

Recently uploaded (20)

一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 

Session2-Application Threat Modeling

  • 1. Web Application Security (PHP) Zakieh Alizadeh zakiehalizadeh@gmail.com APA Laboratory – Ferdowsi University of Mashhad
  • 3. Application Threat Modeling  Scenario : “Producing Thread Model For The College Library Website”  Table of Content  Introduction  Decompose The Application o External Dependencies o Entry Points o Assets o Trust Levels  Determine And Rank Threats o o Threat Categorization o o Introducing STRIDE And ASF  Security Controls  Countermeasure Identification  Mitigation Strategies
  • 4. Application Threat Modeling Decompose The Application Determine And Rank Threats Security Controls  Countermeasure Identification  Mitigation Strategies
  • 5. Application Threat Modeling Introduction  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  Threat modeling is not an approach to reviewing code, but it does complement the security code review process.  The inclusion of threat modeling in the SDLC can help to ensure that applications are being developed with security built-in from the very beginning.
  • 6. Application Threat Modeling Why Use Threat Modeling?  Shape your application design to meet your security objectives.  Help make trade-offs during key engineering decisions.(in different conditions)  Reduce risk of security issues arising during development and operations.
  • 7. Application Threat Modeling Terminology  Threat. o A threat is an undesired event. A potential occurrence, often best described as an effect that might damage or compromise an asset or objective. It may or may not be malicious in nature.  Vulnerability o A vulnerability is a weakness in some aspect or feature of a system that makes an exploit possible. Vulnerabilities can exist at the network, host, or application levels
  • 8. Application Threat Modeling Terminology  Attack (or exploit). o An attack is an action taken that utilizes one or more vulnerabilities to realize a threat.  Countermeasure. o Countermeasures address vulnerabilities to reduce the probability of attacks or the impacts of threats. They do not directly address threats; instead, they address the factors that define the threats.
  • 9. Application Threat Modeling Terminology  Authentication  Authorization  Confidentiality  Integrity  Availability
  • 10. Application Threat Modeling Approaches to threat modeling  Attacker-centric  Software-centric  Asset-centric
  • 11. Application Threat Modeling Approaches to threat modeling  Attacker-centric o Attacker-centric threat modeling starts with an attacker, and evaluates their goals, and how they might achieve them. Attacker's motivations are often considered, for example: Attacker-centric: "The attacker wants login illegal” Simple Thread modelling: Identify thered  guest password Countermeasure Identification. Mitigation Strategies  allow 4 time enter incorrect password, then block user
  • 12. Application Threat Modeling  Approaches to threat modeling  Software-centric o threat modeling (also called 'system-centric,' 'design-centric,' or 'architecture-centric') starts from the design of the system, and attempts to step through a model of the system, looking for types of attacks against each element of the model. Attacker-centric: "The attacker wants login illegal” Simple Thread modelling: Identify thered  guest password Countermeasure Identification. Mitigation Strategies  allow 4 time enter incorrect password, then block user
  • 13. Application Threat Modeling Approaches to threat modeling  Asset-centric o threat modeling involves starting from assets entrusted to a system, such as a collection of sensitive personal information. Asset: “User Personall data” Simple Thread modelling: Identify thered  Acceess data via SQL Injection Countermeasure Identification. Mitigation Strategies 1. Secure DataBase 2. Data Validation Strategies
  • 14. Application Threat Modeling Threat Modeling Perspective  Threat modeling has changed in recent times (around 2004) to take on a more defensive perspective rather than an adversarial perspective. The problem with an adversarial perspective is that it is reactive. o defensive perspective o adversarial perspective
  • 15. Application Threat Modeling adversarial perspectiev  examine software applications, trying to find holes in it they might be exploited. Techniques : o penetration testing (white box and black box) o and code review.  Disadvantages: o use them once the software has been written. o defensive mechanisms patched in later o security bugs vs functionality bugs. Since code around security usually touches every portion of the application, the 'ripple effect' makes the cost exponentially more expensive than functionality bugs.
  • 16. Application Threat Modeling defensive perspective  This means that threats are examined and countermeasures, or security services, are identified at the design state of the application before any code is written. This way the defensive mechanisms are built into the code as it is written rather than patched in later.  Disadvantages: o all threats can not be identified unless the code is trivially simple and often threat modeling on a defender's perspective will cause the development team to falsely believe that the code is secure.
  • 17. Application Threat Modeling defensive perspective  Thread Modeling can be perform erly:
  • 18. Application Threat Modeling defensive perspective  Thread Modeling can also be perform later:
  • 19. Application Threat Modeling Steps  Decompose The Application o External Dependencies o Entry Points o Assets o Trust Levels  Determine And Rank Threats o Security Controls  Countermeasure Identification  Mitigation Strategies
  • 20. Application Threat Modeling Decompose The Application  External Dependencies o External dependencies are items external to the code of the application that may pose a threat to the application. These items are typically still within the control of the organization, but possibly not within the control of the development team. Such as Server, database server,…  Entry Points o Entry points define the interfaces through which potential attackers can interact with the application or supply it with data. such as forms,Ports
  • 21. Application Threat Modeling Decompose The Application  Assets o The system must have something that the attacker is interested in; these items/areas of interest are defined as assets. Such as user personal data, company's reputation  Trust Levels o Trust levels represent the access rights that the application will grant to external entities.
  • 22. Application Threat Modeling Decompose The “College Library Website”  Model Information: documented as
  • 23. Application Threat Modeling  Decompose The “College Library Website”  External Dependencies: documented as o ID o description
  • 24. Application Threat Modeling Decompose The “College Library Website”  Entry Points: documented as o ID o Name o Description o Trust Levels
  • 25. Application Threat Modeling Decompose The “College Library Website”
  • 26. Application Threat Modeling Decompose The “College Library Website”  Assets : documented as o ID o Name o Description o Trust Levels
  • 27. Application Threat Modeling Decompose The “College Library Website”  Assets
  • 28. Application Threat Modeling  Decompose The “College Library Website”  Assets
  • 29. Application Threat Modeling  Decompose The “College Library Website”  Assets
  • 30. Application Threat Modeling  Decompose The “College Library Website”  Trust Levels
  • 31. Application Threat Modeling Determine and Rank  Threat Categorization  The first step in the determination of threats is adopting a threat categorization. A threat categorization provides a set of threat categories with corresponding examples : o STRIDE :adversarial perspectiev o Application Security Frame (ASF ): defensive perspective
  • 32. Application Threat Modeling  Determine and Rank Threats of STRIDE ::adversarial perspectiev Spoofing Tampering Repudition Information disclosure Elevation of privilage Denial of service ASF :: defensive perspective Data Protection in Storage and Transit Exception Management Data Validation Configuration Management Authorization Authenticatio n Auditing & Logging
  • 33. Application Threat Modeling  Determine and Rank Threats
  • 34. Application Threat Modeling Security Controls  the review team should try to identify the set of controls that could prevent these threat agents from causing those impacts. primary focus of the code review : o be to ensure that these security controls are in place, o that these security controls work properly o that these security controls are correctly invoked in all the necessary places. This is main goal of this class
  • 35. Application Threat Modeling Security Controls  Authentication  Authorization  Cookie Management  Data/Input Validation  Error Handling/Information leakage:  Logging/Auditing:  Secure Code Environment:  Session Management:
  • 36. Application Threat Modeling Threat Analysis  Threat analysis as such is the identification of the threats to the application, and involves the analysis of each aspect of the application functionality .
  • 37. Application Threat Modeling  Countermeasure Identification  The purpose of the countermeasure identification is to determine if there is some kind of protective measure (e.g. security control, policy measures) in place that can prevent each threat previosly identified via threat analysis from being realized.  Vulnerabilities are then those threats that have no countermeasures. Since each of these threats has been categorized either with STRIDE or ASF, it is possible to find appropriate countermeasures in the application within the given category.
  • 38. Application Threat Modeling  Countermeasure Identification  Some STRIDE Mitigation Techniques
  • 39. Application Threat Modeling Mitigation Strategies  Do nothing: for example, hoping for the best  Inform about the risk: for example, warning user population about the risk  Mitigate the risk: for example, by putting countermeasures in place  Accept the risk: for example, after evaluating the impact of the exploitation  Transfer the risk: for example, through contractual agreements and insurance  Terminate the risk: for example, shutdown, turn-off, unplug or decommission the asset