SlideShare a Scribd company logo
Threat Modeling-as-Code with
ThreatPlaybook
Abhay Bhargav - we45
abhaybhargav
Yours Truly
• Founder @ we45
• Chief Architect - Orchestron
• Avid Pythonista and AppSec Automation
Junkie
• Speaker at OWASP and InfoSec Conferences
worldwide
• Lead Trainer - we45 Training and Workshops
• Co-author of Secure Java For Web
Application Development
• Author of PCI Compliance: A Definitive Guide
Today's Session
• Some Issues we see with Threat Modeling as it’s done today
• The “as-code” movement and Threat Modeling’s role in it
• ThreatPlaybook and philosophy behind it
• Completing the Automation Cycle with ThreatPlaybook
Inspirations and Thanks
• Adam Shostack and Brook Schoenfield for their inputs
• Fraser Scott for his suggestions
• Myriad twitter convos with Threat Modeling geeks (read:
Robert Hurlbut)
• Jonathan Marcil for Threat Modeling Toolkit
• Chris Gates for metta (carnal0wnage) => MITRE ATT&CK
Framework
Threat-Modeling-as-Code: ThreatPlaybook AppSecUSA 2018 Presentation
And a few demos….
Demo Gods! Please let this work
Current Problems with Threat
Modeling
Some Problems
Some Problems
Some Problems
Some Problems
Some Problems
What’s worse…
• Threat Modeling is usually undertaken at the beginning a project and then
forgotten - Updated annually/not at all (usual case)
What’s worse…
• Threat Modeling is usually undertaken at the beginning a project and then
forgotten - Updated annually/not at all (usual case)
• Not integrated with the Agile SDLC
What’s worse…
• Threat Modeling is usually undertaken at the beginning a project and then
forgotten - Updated annually/not at all (usual case)
• Not integrated with the Agile SDLC
• No link with user stories/functionality
What’s worse…
• Threat Modeling is usually undertaken at the beginning a project and then
forgotten - Updated annually/not at all (usual case)
• Not integrated with the Agile SDLC
• No link with user stories/functionality
• Security teams often just do it themselves
What’s worse…
• Threat Modeling is usually undertaken at the beginning a project and then
forgotten - Updated annually/not at all (usual case)
• Not integrated with the Agile SDLC
• No link with user stories/functionality
• Security teams often just do it themselves
• (Unpopular Opinion alert): Threat Modeling (for many) has become largely
about generating Diagrams and not actually modeling Threats
What’s worse…
And Yet…
But….
The Result
Benefits of Threat Modeling
Security in DevOps
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
Threat
modeling
SAST
Security - Composition
DAST
IAST
Security in
IaC
Security monitoring
& attack detection
Security in DevOps
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
Threat
modeling
SAST
Security - Composition
DAST
IAST
Security in
IaC
Security monitoring
& attack detection
Threat Modeling Inputs - Go here!
On the other hand….
“Spec” based Systems
• Frameworks that allow users to
define deployments/delivery
without having to write complex
code
• Abstract the complexity away from
the user
• Increase Cross-Functional workflows
• Make everything “As-Code”
Application Delivery by Spec
Our Philosophy for Threat Modeling
• We see Threat Models as “Playbooks” for Security
• More power to collaborative Threat Modeling
• Iterative Threat Modeling
• Manageable Threat Modeling
The Idea
YAML Spec Based
Orchestration Tools
AppSec Automation
Threat Modeling
Which is why…ThreatPlaybook!
The ThreatPlaybook way…
Threat-Modeling-as-Code: ThreatPlaybook AppSecUSA 2018 Presentation
Build Threat Model
Build Threat Model
Functionality/User Stories
Build Threat Model
Functionality/User Stories
Abuser Stories
Build Threat Model
Functionality/User Stories
Abuser Stories
Threat Scenarios
Build Threat Model
Functionality/User Stories
Abuser Stories
Threat Scenarios
Build Threat Model
Functionality/User Stories
Abuser Stories
Threat Scenarios Security Test Cases
Build Threat Model
Functionality/User Stories
Abuser Stories
Threat Scenarios Security Test Cases
Build Threat Model
Functionality/User Stories
Abuser Stories
Threat Scenarios Security Test Cases Invoke Strategic Automation
Build Threat Model
Functionality/User Stories
Abuser Stories
Threat Scenarios Security Test Cases Invoke Strategic Automation
ThreatPlaybook (YAMLs)
(define Threat Models)
ThreatPlaybook Robot Library
OWASP ZAP Robot Library
Other SAST/DAST/SCA Robot
Library
Invoked in Robot Script
(Automation)
Target App
Process - ThreatPlaybook
• Write Threat Models in YAML files:
• Iterative and modular
• Link (or not) to Security Test Cases
• Run Automation
• Generate Report with Vulnerabilities
linked with Threat Models
Who can use ThreatPlaybook?
• Engineering Teams:
• Develop and scale Iterative Threat Models
• Run a Security Pipeline with Threat Modeling included
• Pentesting Teams:
• Attack-driven Threat Modeling with Pentest Automation
Demo Time
Demo Gods! Please let this work
Hard Problems & Questions?
Hard Problems & Questions?
Hard Problems & Questions?
Hard Problems & Questions?
LOOK AT THE THREAT MODEL
+ Linked Vulnerability Assessment Results!
Hard Problems & Questions?
Hard Problems & Questions?
Hard Problems & Questions?
Hard Problems & Questions?
Look at our Iterative Threat Model with this Feature in
ThreatPlaybook!
Hard Problems & Questions?
Hard Problems & Questions?
Hard Problems & Questions?
Hard Problems & Questions?
Our Threat Models have Security Test Cases
+ Automation of those Test Cases in CI/CD!
Hard Problems & Questions?
Robot Framework? Why?
Robot Framework? Why?
• Flexible Natural Language Syntax - FTW!
Robot Framework? Why?
• Flexible Natural Language Syntax - FTW!
• Easy to develop API for Tools
Robot Framework? Why?
• Flexible Natural Language Syntax - FTW!
• Easy to develop API for Tools
• Modular
Robot Framework? Why?
• Flexible Natural Language Syntax - FTW!
• Easy to develop API for Tools
• Modular
• Comes with Reporting out of the Box
Robot Framework? Why?
• Flexible Natural Language Syntax - FTW!
• Easy to develop API for Tools
• Modular
• Comes with Reporting out of the Box
• Python and Java Support 😁
Plus++
• Library Support for Selenium,
Appium and Multiple test
frameworks
• Support for REST API Testing
Frameworks
• Support for OS libs, etc
Security Tools - API that we have developed
• DAST
• OWASP ZAP
• BurpSuite Pro
• Arachni
• SAST
• NodeJSScan
• Brakeman
• Bandit
• Recon/Mapping
• Nmap
• Wfuzz (Directory Bruteforce
only)
• SubList3r
• SCA
• OWASP Dependency Check
• NPM Audit
• PyUp Safety
• Snyk (In Development)
• Cloud
• Bucketeer
• weirdAAL
(Selected for Dev)
• Mobile:
• MobSF
The future
• Objective: To make this the Kubernetes of Application Security
• Add a CLI for user interaction => Happening in final release 1.2
• Add capabilities for Trust Boundaries
• Look at a more comprehensive Diagramming API
• Contributors Welcome :)
github.com/we45/ThreatPlaybook
Thank you!
Twitter: @abhaybhargav
Twitter: @we45
LinkedIn: abhaybhargav
Github: github.com/we45

More Related Content

PDF
Using jira to manage risks v1.0 - owasp app sec eu - june 2016
PDF
Security in a Continuous Delivery World
PPTX
Making Security Agile
PDF
An Attacker's View of Serverless and GraphQL Apps - Abhay Bhargav - AppSec Ca...
PPTX
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
PDF
SecDevOps Risk Workflow - v0.6
PDF
App sec and quality london - may 2016 - v0.5
PPTX
Open Source Libraries - Managing Risk in Cloud
Using jira to manage risks v1.0 - owasp app sec eu - june 2016
Security in a Continuous Delivery World
Making Security Agile
An Attacker's View of Serverless and GraphQL Apps - Abhay Bhargav - AppSec Ca...
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
SecDevOps Risk Workflow - v0.6
App sec and quality london - may 2016 - v0.5
Open Source Libraries - Managing Risk in Cloud

What's hot (20)

PDF
Security champions v1.0
PPTX
Implementing an Application Security Pipeline in Jenkins
PPTX
Unit testing : what are you missing for security
PDF
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
PPTX
OWASP Top 10 practice workshop by Stanislav Breslavskyi
PDF
we45 - Infrastructure Penetration Testing with LeanBeast Case Study
PPTX
Hack through Injections
PDF
DevSecOps: Minimizing Risk, Improving Security
PPTX
AppSec California 2016 - Making Security Agile
PPTX
Agile and Secure Development
PPTX
Security as a new metric for Business, Product and Development Lifecycle
PDF
NodeJS security - still unsafe at most speeds - v1.0
PDF
Get Ready for JIRA 5 - AtlasCamp 2011
PDF
Bringing Security Testing to Development: How to Enable Developers to Act as ...
PPTX
we45 SecDevOps Presentation - ISACA Chennai
PDF
The Joy of Proactive Security
PDF
AppSec Survey 2.0 Fine-Tuning an AppSec Training Program Based on Data
PDF
SecDevOps - The Operationalisation of Security
PDF
Blending Automated and Manual Testing
PDF
A Successful SAST Tool Implementation
Security champions v1.0
Implementing an Application Security Pipeline in Jenkins
Unit testing : what are you missing for security
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
OWASP Top 10 practice workshop by Stanislav Breslavskyi
we45 - Infrastructure Penetration Testing with LeanBeast Case Study
Hack through Injections
DevSecOps: Minimizing Risk, Improving Security
AppSec California 2016 - Making Security Agile
Agile and Secure Development
Security as a new metric for Business, Product and Development Lifecycle
NodeJS security - still unsafe at most speeds - v1.0
Get Ready for JIRA 5 - AtlasCamp 2011
Bringing Security Testing to Development: How to Enable Developers to Act as ...
we45 SecDevOps Presentation - ISACA Chennai
The Joy of Proactive Security
AppSec Survey 2.0 Fine-Tuning an AppSec Training Program Based on Data
SecDevOps - The Operationalisation of Security
Blending Automated and Manual Testing
A Successful SAST Tool Implementation
Ad

Similar to Threat-Modeling-as-Code: ThreatPlaybook AppSecUSA 2018 Presentation (20)

PDF
we45 DEFCON Workshop - Building AppSec Automation with Python
PPTX
"Threat Model Every Story": Practical Continuous Threat Modeling Work for You...
PPTX
Jason Kent - AppSec Without Additional Tools
PPTX
Security for developers
PDF
Modern Web 2019 從零開始加入自動化資安測試
PDF
AI Security : Machine Learning, Deep Learning and Computer Vision Security
PPT
The Anatomy of Java Vulnerabilities (Devoxx UK 2017)
PPTX
Canada DevOps Summit 2020 Presentation Nov_03_2020
PDF
Cert01 70-483 - programming in c#
PDF
Filling your AppSec Toolbox - Which Tools, When to Use Them, and Why
PDF
Software Security Assurance for DevOps
ODP
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
PDF
Software Analytics: Data Analytics for Software Engineering and Security
PDF
The DevSecOps Builder’s Guide to the CI/CD Pipeline
PDF
DevSecOps and the CI/CD Pipeline
PDF
The Emergent Cloud Security Toolchain for CI/CD
PPTX
Making security champions in organization
PDF
Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...
PPTX
2017 03 25 Microsoft Hacks, How to code efficiently
PPTX
O'Reilly SACon 2019 - (Continuous) Threat Modeling - What works?
we45 DEFCON Workshop - Building AppSec Automation with Python
"Threat Model Every Story": Practical Continuous Threat Modeling Work for You...
Jason Kent - AppSec Without Additional Tools
Security for developers
Modern Web 2019 從零開始加入自動化資安測試
AI Security : Machine Learning, Deep Learning and Computer Vision Security
The Anatomy of Java Vulnerabilities (Devoxx UK 2017)
Canada DevOps Summit 2020 Presentation Nov_03_2020
Cert01 70-483 - programming in c#
Filling your AppSec Toolbox - Which Tools, When to Use Them, and Why
Software Security Assurance for DevOps
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Software Analytics: Data Analytics for Software Engineering and Security
The DevSecOps Builder’s Guide to the CI/CD Pipeline
DevSecOps and the CI/CD Pipeline
The Emergent Cloud Security Toolchain for CI/CD
Making security champions in organization
Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...
2017 03 25 Microsoft Hacks, How to code efficiently
O'Reilly SACon 2019 - (Continuous) Threat Modeling - What works?
Ad

Recently uploaded (20)

PDF
Categorization of Factors Affecting Classification Algorithms Selection
PDF
Soil Improvement Techniques Note - Rabbi
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPT
Occupational Health and Safety Management System
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PDF
Visual Aids for Exploratory Data Analysis.pdf
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPTX
Artificial Intelligence
PDF
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
PPT
Total quality management ppt for engineering students
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
Categorization of Factors Affecting Classification Algorithms Selection
Soil Improvement Techniques Note - Rabbi
distributed database system" (DDBS) is often used to refer to both the distri...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Occupational Health and Safety Management System
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Exploratory_Data_Analysis_Fundamentals.pdf
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Visual Aids for Exploratory Data Analysis.pdf
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Fundamentals of safety and accident prevention -final (1).pptx
Artificial Intelligence
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
Total quality management ppt for engineering students
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...

Threat-Modeling-as-Code: ThreatPlaybook AppSecUSA 2018 Presentation