SlideShare a Scribd company logo
Let’s get evil – threat
modelling at scale
Jakub Kaluzny
OWASP Poland, 16th Oct 2019
Projects do fail
EffortMoney
Security Scaling
SDLCAutomation
This is about
WHOAMI
JAKUB KALUZNY
• 10 years in IT & Security
• Threat modeling,
DevSecOps, penetration
tests
• Poland, Spain, Australia
• banking, fintech, law, airline,
entertainment, e-commerce
• Speaker at BlackHat,
HackInTheBox, ZeroNights
#whoami
Design Coding Testing Release Maintenance
SDLC process
Weak encryption in web app
Weak encryption in mobile app
Weak encryption in printers
Cost to fix
Cost of a production security bug:
• Incident response = $
• Risk assessment = $
• Fix, test = $
• Ransom, GDPR = $
• Reputation = $
• Stolen data = ?
Cost to fix is not everything
Equifax hack in 2017
Design Coding Testing Release Maintenance
Security testing
• Number of security issues in time
No security testing
• Number of security issues in time
1 round of security testing
PT
• Number of security issues in time
Multiple rounds of security testing
PT PT PT
• Number of security issues in time
Our target - SSDLC
PT PT PT
BUT HOW?
• Number of security issues in time
Isolated round
PT
quality of design
qualityoftesting
Design Coding Testing Release Maintenance
There are tools and services
training
SAST
DAST
SCA VApentesting
IDE plugins
code
review
repo mgrs
checklists
SOE
standards
virtual
patching
WAF
threat
modelling
Design Coding Testing Release Maintenance
What to start with?
training pentesting
threat
modelling
• Quality of coding
• Training
Solution
Training
• Quality of coding
• Secure coding training + onboarding on standards
• Security requirements
• Quality of testing
• Adequate scope / test cases
• Quality of design
• Threat modelling
Waterfall vs Agile – security perspective
Secure
design
Fixing time
Secure
release
Security
testing
Secure
Implementation
Design Coding Testing Release Maintenance
Agile and security
Design Coding Testing Release Maintenance
When does your security team show up?
1 month of a 100-developers company
10
teams
20 sprints
600 user stories
1000+ code changes
3000+ JIRA tickets
Decomposition of user stories
User downloads a list of transactions and their details
Decomposition of user stories
User downloads (a list of transactions) and (their details)
getTransactionsByUser getTransactionDetails
Decomposition of user stories
User downloads (a list of transactions) and (their details)
getTransactionsByUser getTransactionDetails
getTransactionByUser(CONTEXT):
123, 125, 127
getTransactionDetails(123)
getTransactionDetails(124)
Design Coding Testing Release Maintenance
Agile and security
Threat modelling for the rescue
• Factory camera reading license plates
• Setting up physical access control (RFID badges)
• How to detect crawlers?
• Authentication in APIs
Case studies
Threat modeling – evil brainstorming
Threat
actor
Threat
Attack
vector
Who? What? How?
Attack
vector
Security
requirement
Test case
• Generally yes, „secure by design”
Does it work?
Dev/DevOps
Sec
Arch
Functional requirements, design, DFDs
Security requirements
Security testing scope
Risk assessment
Go-live decision
• It ain’t easy
How to make it more Agile
Dev
Sec
Dev
Dev
Dev
Sec DevSecOps
Sec
Which threats to model?
List of user
stories
• Decision
to model
Stories
affecting
security
• Threat
model
Verification
• follow-
up
• Cosmetic changes to report template (colours)
• Add GDPR pop-up
• Update jQuery lib
• Change randomness in reset password link from
rand(1, 1000000) to GUIDv4
• New authentication provider
• Add new report type – list of transactions per user
Examples – decide to model or not
Different wording of user stories
User displays a list of THEIR OWN transactions and details for each of
THEIR OWN transactions.
User downloads a list of transactions and their details
Different wording of recommendation
Update jQuery library to the newest available version with no open
vulnerabilities
Update jQuery library
Threat modeling at scale - Agile
User downloads a list of transactions and their details
Abuser story Security requirement Test cases
Threat modeling at scale - Agile
User downloads a list of transactions and their details
Abuser story Security requirement Test cases
One user downloads
transaction of other
users
Transaction should
belong to the user
from the current
context
Check cross-user data
access control
Threat modeling at scale - Agile
User downloads a list of transactions and their details
Abuser story Security requirement Test cases
One user downloads
transaction of other
users
Transaction should
belong to the user
from the current
context
Check cross-user data
access control
Inject SQL/XML into
ID ???
Execute without auth
???
Threat modeling at scale – base threat models
Abuser story Security requirement Test cases
SOAP API (parent):
User downloads a list of transactions and their details
Threat modeling at scale – base threat models
Abuser story Security requirement Test cases
Execute without auth
Inject XML string
Inject SQL string
Force a cross-site
request
SOAP API (parent):
User downloads a list of transactions and their details
Threat modeling at scale – base threat models
Abuser story Security requirement Test cases
Execute without auth All functions require
auth
Inject XML string External Entities off
Inject SQL string Type casting,
prepared statements
Force a cross-site
request
SameSite cookie flag,
custom request
headers
SOAP API (parent):
User downloads a list of transactions and their details
Threat modeling at scale – base threat models
Abuser story Security requirement Test cases
New RCE CVE Java up-to-date
… Config options: …, …
JAVA APPLICATION (parent):
SOAP API (parent):
User downloads a list of transactions and their details
Adding S to SDLC
Initial
discussions
• Base
threat
models
Stories
affecting
security
• Abuser
stories
Testing
• Security
metric
Responsibilities
Base threat
models
• Security
team
Abuser
stories
• Security
champions
Testing
• Security
team
Threat modeling at scale - examples
User should be able to reset a password.
Abuser story Security requirement Test cases
1. Your e-mail: […]
2. https://example/reset?e-mail=x@y&rnd=12345
3. New pwd: [..], confirm new […]
Threat modeling at scale - examples
Abuser story Security requirement Test cases
Lock other accounts (1) Dictionary attack
Get a copy of e-mail (1) Injection into e-mail
Analyse and guess
contents of reset link
(2)
Use reset link against
another account
(2)
Bypass steps 1, 2 (3)
Change other user’s
password
(3) Injection into pwd
User should be able to reset a password.
Threat modeling at scale - examples
Ad industry. Money withdrawal.
Abuser story Security requirement Test cases
How much do you want to withdraw: […]?
To which of your accounts […] (drop-down list)?
Threat modeling at scale - examples
Ad industry. Money withdrawal.
Abuser story Security requirement Test cases
Withdraw more than
your balance.
Withdraw negative
amount
Select an account
outside the list
Make somebody
withdraw money
CSRF / clickjacking
Threat modeling at scale - examples
VIP airport lounge. Boarding pass QR code reader allowing through
only business class.
Abuser story Security requirement Test cases
Client: (showing boarding pass)
Threat modeling at scale - examples
VIP airport lounge. Boarding pass QR code reader allowing through
only business class.
Abuser story Security requirement Test cases
Use an old business
boarding pass
Use one boarding
pass twice
Use a scan of
boarding pass from
another airport
Modify class in the
QR code
Client: (scans boarding pass)
• Copying invisible code from stackoverflow
• Allowing only trusted dependencies
• We’ve got SAST!
• Regular VA scans
• Presentation clickers
Do abuser stories solve all problems?
• Shift left = testing, coding, design
• Know your enemy
• Automate, centralise
• The earlier you introduce changes, the better
Summary
Thank you!
Jakub.Kaluzny@securing.pl
@j_kaluzny
SecuRing
http://www.securing.pl/en

More Related Content

PDF
[OPD 2019] .NET Core Security
OWASP
 
PDF
[OPD 2019] Web Apps vs Blockchain dApps
OWASP
 
PPTX
[OPD 2019] Inter-application vulnerabilities
OWASP
 
PDF
[OPD 2019] Trusted types and the end of DOM XSS
OWASP
 
PDF
[OPD 2019] Top 10 Security Facts of 2020
OWASP
 
PDF
[OPD 2019] Life after pentest
OWASP
 
PDF
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
OWASP
 
PPTX
[OPD 2019] AST Platform and the importance of multi-layered application secu...
OWASP
 
[OPD 2019] .NET Core Security
OWASP
 
[OPD 2019] Web Apps vs Blockchain dApps
OWASP
 
[OPD 2019] Inter-application vulnerabilities
OWASP
 
[OPD 2019] Trusted types and the end of DOM XSS
OWASP
 
[OPD 2019] Top 10 Security Facts of 2020
OWASP
 
[OPD 2019] Life after pentest
OWASP
 
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
OWASP
 
[OPD 2019] AST Platform and the importance of multi-layered application secu...
OWASP
 

What's hot (20)

PDF
[OPD 2019] Automated Defense with Serverless computing
OWASP
 
PDF
Neoito — Secure coding practices
Neoito
 
PDF
Let's get evil - threat modeling at scale
SecuRing
 
PPTX
Owasp for testing_mobile_apps_opd
Pawel Rzepa
 
PPTX
Ten security product categories you've (probably) never heard of
Adrian Sanabria
 
PPTX
OWASP Top 10 2017 rc1 - The Ten Most Critical Web Application Security Risks
Andre Van Klaveren
 
PDF
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
SecuRing
 
PDF
Enterprise Security mit Spring Security
Mike Wiesner
 
PDF
Mobile Defense-in-Dev (Depth)
Prathan Phongthiproek
 
PDF
Secure Coding for Java - An Introduction
Sebastien Gioria
 
PDF
Building layers of defense for your application
VMware Tanzu
 
PPTX
Secure Software Engineering
Rohitha Liyanagama
 
PPTX
Beyond the OWASP Top 10
iphonepentest
 
PDF
OWASP Thailand-Beyond the Penetration Testing
Prathan Phongthiproek
 
PDF
Dev secops on the offense automating amazon web services account takeover
Priyanka Aash
 
PDF
Owasp masvs spain 17
Luis A. Solís
 
PDF
Red Team vs. Blue Team on AWS
Priyanka Aash
 
PDF
A Stratagem on Strategy: Rolling Security Testing into Product Testing
Kevin Fealey
 
PPTX
Mobile Security at OWASP - MASVS and MSTG
Romuald SZKUDLAREK
 
PPTX
Student Spring 2021
Denis Zakharov
 
[OPD 2019] Automated Defense with Serverless computing
OWASP
 
Neoito — Secure coding practices
Neoito
 
Let's get evil - threat modeling at scale
SecuRing
 
Owasp for testing_mobile_apps_opd
Pawel Rzepa
 
Ten security product categories you've (probably) never heard of
Adrian Sanabria
 
OWASP Top 10 2017 rc1 - The Ten Most Critical Web Application Security Risks
Andre Van Klaveren
 
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
SecuRing
 
Enterprise Security mit Spring Security
Mike Wiesner
 
Mobile Defense-in-Dev (Depth)
Prathan Phongthiproek
 
Secure Coding for Java - An Introduction
Sebastien Gioria
 
Building layers of defense for your application
VMware Tanzu
 
Secure Software Engineering
Rohitha Liyanagama
 
Beyond the OWASP Top 10
iphonepentest
 
OWASP Thailand-Beyond the Penetration Testing
Prathan Phongthiproek
 
Dev secops on the offense automating amazon web services account takeover
Priyanka Aash
 
Owasp masvs spain 17
Luis A. Solís
 
Red Team vs. Blue Team on AWS
Priyanka Aash
 
A Stratagem on Strategy: Rolling Security Testing into Product Testing
Kevin Fealey
 
Mobile Security at OWASP - MASVS and MSTG
Romuald SZKUDLAREK
 
Student Spring 2021
Denis Zakharov
 
Ad

Similar to [OPD 2019] Threat modeling at scale (20)

PDF
Let's get evil - threat modelling at scale - Jakub Kałużny
PROIDEA
 
PDF
What Every Developer And Tester Should Know About Software Security
Anne Oikarinen
 
PDF
N. Oskina, G. Asproni - Be your own Threatbuster! - Codemotion Milan 2018
Codemotion
 
PPT
Software Security Engineering
Marco Morana
 
PPTX
Started In Security Now I'm Here
Christopher Grayson
 
PPTX
Architecting for Security Resilience
Joel Aleburu
 
PDF
Threat Modeling workshop by Robert Hurlbut
DevSecCon
 
PPTX
Value-driven threat modeling: Security by design - Avi Douglen - DevOpsDays T...
DevOpsDays Tel Aviv
 
DOCX
Residency ResearchISOL 536 Security Architecture and Design.docx
brittneyj3
 
PPTX
Threat modeling (Hacker Stories) workshop
Ty Sbano
 
PPTX
Injecting Threat Modeling into the SDLC by Susan Bradley
QA or the Highway
 
PPTX
Security in an Interconnected and Complex World of Software
Michael Coates
 
PDF
SAFECode_Agile_Dev_Security0712
Vishal Asthana, CISSP
 
PPSX
Introduction to threat_modeling
Prabath Siriwardena
 
PDF
Threat Modeling: Best Practices
Source Conference
 
PPTX
Threat modelling(system + enterprise)
abhimanyubhogwan
 
PDF
Secure Coding principles by example: Build Security In from the start - Carlo...
Codemotion
 
PPTX
Threat Modeling - Locking the Door to Vulnerabilities
Security Innovation
 
PDF
The 5 Layers of Security Testing by Alan Koch
QA or the Highway
 
PDF
The 5 Layers of Security Testing by Alan Koch
QA or the Highway
 
Let's get evil - threat modelling at scale - Jakub Kałużny
PROIDEA
 
What Every Developer And Tester Should Know About Software Security
Anne Oikarinen
 
N. Oskina, G. Asproni - Be your own Threatbuster! - Codemotion Milan 2018
Codemotion
 
Software Security Engineering
Marco Morana
 
Started In Security Now I'm Here
Christopher Grayson
 
Architecting for Security Resilience
Joel Aleburu
 
Threat Modeling workshop by Robert Hurlbut
DevSecCon
 
Value-driven threat modeling: Security by design - Avi Douglen - DevOpsDays T...
DevOpsDays Tel Aviv
 
Residency ResearchISOL 536 Security Architecture and Design.docx
brittneyj3
 
Threat modeling (Hacker Stories) workshop
Ty Sbano
 
Injecting Threat Modeling into the SDLC by Susan Bradley
QA or the Highway
 
Security in an Interconnected and Complex World of Software
Michael Coates
 
SAFECode_Agile_Dev_Security0712
Vishal Asthana, CISSP
 
Introduction to threat_modeling
Prabath Siriwardena
 
Threat Modeling: Best Practices
Source Conference
 
Threat modelling(system + enterprise)
abhimanyubhogwan
 
Secure Coding principles by example: Build Security In from the start - Carlo...
Codemotion
 
Threat Modeling - Locking the Door to Vulnerabilities
Security Innovation
 
The 5 Layers of Security Testing by Alan Koch
QA or the Highway
 
The 5 Layers of Security Testing by Alan Koch
QA or the Highway
 
Ad

More from OWASP (20)

PDF
[OPD 2019] Governance as a missing part of IT security architecture
OWASP
 
PPTX
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
OWASP
 
PDF
[OPD 2019] Advanced Data Analysis in RegSOC
OWASP
 
PDF
[OPD 2019] Attacking JWT tokens
OWASP
 
PDF
[OPD 2019] Rumpkernels meet fuzzing
OWASP
 
PDF
[Wroclaw #9] The purge - dealing with secrets in Opera Software
OWASP
 
PDF
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
OWASP
 
PDF
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
OWASP
 
PDF
OWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining
OWASP
 
PDF
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
OWASP
 
PDF
OWASP Poland Day 2018 - Frans Rosen - Attacking modern web technologies
OWASP
 
PDF
OWASP Poland Day 2018 - Dani Ramirez - IPMI hacking
OWASP
 
PPTX
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP
 
PPTX
OWASP Poland Day 2018 - Omer Levi Hevroni - Secure the Pipeline
OWASP
 
PDF
OWASP Poland Day 2018 - Kuai Hinojosa - Key tips to build resilient software
OWASP
 
PPTX
OWASP Poland Day 2018 - Ralf Kempf - SAP Security - Detecting the hand still ...
OWASP
 
PDF
OWASP Poland Day 2018 - Johan Peeters - Designing access control with OAuth a...
OWASP
 
PDF
OWASP Poland Day 2018 - Anthony Fielding and William Jardine - Common App Vulns
OWASP
 
PDF
OWASP Poland Day 2018 - Luca Carettoni - Web security in desktop world
OWASP
 
PPTX
OWASP Poland Day 2018 - Jakub Botwicz - AFL that you do not know
OWASP
 
[OPD 2019] Governance as a missing part of IT security architecture
OWASP
 
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
OWASP
 
[OPD 2019] Advanced Data Analysis in RegSOC
OWASP
 
[OPD 2019] Attacking JWT tokens
OWASP
 
[OPD 2019] Rumpkernels meet fuzzing
OWASP
 
[Wroclaw #9] The purge - dealing with secrets in Opera Software
OWASP
 
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
OWASP
 
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
OWASP
 
OWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining
OWASP
 
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
OWASP
 
OWASP Poland Day 2018 - Frans Rosen - Attacking modern web technologies
OWASP
 
OWASP Poland Day 2018 - Dani Ramirez - IPMI hacking
OWASP
 
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP
 
OWASP Poland Day 2018 - Omer Levi Hevroni - Secure the Pipeline
OWASP
 
OWASP Poland Day 2018 - Kuai Hinojosa - Key tips to build resilient software
OWASP
 
OWASP Poland Day 2018 - Ralf Kempf - SAP Security - Detecting the hand still ...
OWASP
 
OWASP Poland Day 2018 - Johan Peeters - Designing access control with OAuth a...
OWASP
 
OWASP Poland Day 2018 - Anthony Fielding and William Jardine - Common App Vulns
OWASP
 
OWASP Poland Day 2018 - Luca Carettoni - Web security in desktop world
OWASP
 
OWASP Poland Day 2018 - Jakub Botwicz - AFL that you do not know
OWASP
 

Recently uploaded (20)

PDF
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
PPTX
Microsoft PowerPoint Student PPT slides.pptx
Garleys Putin
 
PPTX
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
PPTX
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
PPTX
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
APNIC
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PPTX
Different Generation Of Computers .pptx
divcoder9507
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
PDF
BGP Security Best Practices that Matter, presented at PHNOG 2025
APNIC
 
PPTX
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
PPT
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
PDF
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
PPTX
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
PPTX
Slides Powerpoint: Eco Economic Epochs.pptx
Steven McGee
 
PDF
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
PDF
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
PDF
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
Microsoft PowerPoint Student PPT slides.pptx
Garleys Putin
 
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
APNIC
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
Different Generation Of Computers .pptx
divcoder9507
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
BGP Security Best Practices that Matter, presented at PHNOG 2025
APNIC
 
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
Introduction to dns domain name syst.ppt
MUHAMMADKAVISHSHABAN
 
Latest Scam Shocking the USA in 2025.pdf
onlinescamreport4
 
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
Slides Powerpoint: Eco Economic Epochs.pptx
Steven McGee
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
LOGENVIDAD DANNYFGRETRRTTRRRTRRRRRRRRR.pdf
juan456ytpro
 

[OPD 2019] Threat modeling at scale

  • 1. Let’s get evil – threat modelling at scale Jakub Kaluzny OWASP Poland, 16th Oct 2019
  • 5. JAKUB KALUZNY • 10 years in IT & Security • Threat modeling, DevSecOps, penetration tests • Poland, Spain, Australia • banking, fintech, law, airline, entertainment, e-commerce • Speaker at BlackHat, HackInTheBox, ZeroNights #whoami
  • 6. Design Coding Testing Release Maintenance SDLC process
  • 7. Weak encryption in web app Weak encryption in mobile app Weak encryption in printers Cost to fix
  • 8. Cost of a production security bug: • Incident response = $ • Risk assessment = $ • Fix, test = $ • Ransom, GDPR = $ • Reputation = $ • Stolen data = ? Cost to fix is not everything Equifax hack in 2017
  • 9. Design Coding Testing Release Maintenance Security testing
  • 10. • Number of security issues in time No security testing
  • 11. • Number of security issues in time 1 round of security testing PT
  • 12. • Number of security issues in time Multiple rounds of security testing PT PT PT
  • 13. • Number of security issues in time Our target - SSDLC PT PT PT
  • 15. • Number of security issues in time Isolated round PT quality of design qualityoftesting
  • 16. Design Coding Testing Release Maintenance There are tools and services training SAST DAST SCA VApentesting IDE plugins code review repo mgrs checklists SOE standards virtual patching WAF threat modelling
  • 17. Design Coding Testing Release Maintenance What to start with? training pentesting threat modelling
  • 18. • Quality of coding • Training Solution
  • 20. • Quality of coding • Secure coding training + onboarding on standards • Security requirements • Quality of testing • Adequate scope / test cases • Quality of design • Threat modelling
  • 21. Waterfall vs Agile – security perspective Secure design Fixing time Secure release Security testing Secure Implementation
  • 22. Design Coding Testing Release Maintenance Agile and security
  • 23. Design Coding Testing Release Maintenance When does your security team show up?
  • 24. 1 month of a 100-developers company 10 teams 20 sprints 600 user stories 1000+ code changes 3000+ JIRA tickets
  • 25. Decomposition of user stories User downloads a list of transactions and their details
  • 26. Decomposition of user stories User downloads (a list of transactions) and (their details) getTransactionsByUser getTransactionDetails
  • 27. Decomposition of user stories User downloads (a list of transactions) and (their details) getTransactionsByUser getTransactionDetails getTransactionByUser(CONTEXT): 123, 125, 127 getTransactionDetails(123) getTransactionDetails(124)
  • 28. Design Coding Testing Release Maintenance Agile and security
  • 29. Threat modelling for the rescue
  • 30. • Factory camera reading license plates • Setting up physical access control (RFID badges) • How to detect crawlers? • Authentication in APIs Case studies
  • 31. Threat modeling – evil brainstorming Threat actor Threat Attack vector Who? What? How? Attack vector Security requirement Test case
  • 32. • Generally yes, „secure by design” Does it work? Dev/DevOps Sec Arch Functional requirements, design, DFDs Security requirements Security testing scope Risk assessment Go-live decision
  • 33. • It ain’t easy How to make it more Agile Dev Sec Dev Dev Dev Sec DevSecOps Sec
  • 34. Which threats to model? List of user stories • Decision to model Stories affecting security • Threat model Verification • follow- up
  • 35. • Cosmetic changes to report template (colours) • Add GDPR pop-up • Update jQuery lib • Change randomness in reset password link from rand(1, 1000000) to GUIDv4 • New authentication provider • Add new report type – list of transactions per user Examples – decide to model or not
  • 36. Different wording of user stories User displays a list of THEIR OWN transactions and details for each of THEIR OWN transactions. User downloads a list of transactions and their details
  • 37. Different wording of recommendation Update jQuery library to the newest available version with no open vulnerabilities Update jQuery library
  • 38. Threat modeling at scale - Agile User downloads a list of transactions and their details Abuser story Security requirement Test cases
  • 39. Threat modeling at scale - Agile User downloads a list of transactions and their details Abuser story Security requirement Test cases One user downloads transaction of other users Transaction should belong to the user from the current context Check cross-user data access control
  • 40. Threat modeling at scale - Agile User downloads a list of transactions and their details Abuser story Security requirement Test cases One user downloads transaction of other users Transaction should belong to the user from the current context Check cross-user data access control Inject SQL/XML into ID ??? Execute without auth ???
  • 41. Threat modeling at scale – base threat models Abuser story Security requirement Test cases SOAP API (parent): User downloads a list of transactions and their details
  • 42. Threat modeling at scale – base threat models Abuser story Security requirement Test cases Execute without auth Inject XML string Inject SQL string Force a cross-site request SOAP API (parent): User downloads a list of transactions and their details
  • 43. Threat modeling at scale – base threat models Abuser story Security requirement Test cases Execute without auth All functions require auth Inject XML string External Entities off Inject SQL string Type casting, prepared statements Force a cross-site request SameSite cookie flag, custom request headers SOAP API (parent): User downloads a list of transactions and their details
  • 44. Threat modeling at scale – base threat models Abuser story Security requirement Test cases New RCE CVE Java up-to-date … Config options: …, … JAVA APPLICATION (parent): SOAP API (parent): User downloads a list of transactions and their details
  • 45. Adding S to SDLC Initial discussions • Base threat models Stories affecting security • Abuser stories Testing • Security metric
  • 46. Responsibilities Base threat models • Security team Abuser stories • Security champions Testing • Security team
  • 47. Threat modeling at scale - examples User should be able to reset a password. Abuser story Security requirement Test cases 1. Your e-mail: […] 2. https://example/reset?e-mail=x@y&rnd=12345 3. New pwd: [..], confirm new […]
  • 48. Threat modeling at scale - examples Abuser story Security requirement Test cases Lock other accounts (1) Dictionary attack Get a copy of e-mail (1) Injection into e-mail Analyse and guess contents of reset link (2) Use reset link against another account (2) Bypass steps 1, 2 (3) Change other user’s password (3) Injection into pwd User should be able to reset a password.
  • 49. Threat modeling at scale - examples Ad industry. Money withdrawal. Abuser story Security requirement Test cases How much do you want to withdraw: […]? To which of your accounts […] (drop-down list)?
  • 50. Threat modeling at scale - examples Ad industry. Money withdrawal. Abuser story Security requirement Test cases Withdraw more than your balance. Withdraw negative amount Select an account outside the list Make somebody withdraw money CSRF / clickjacking
  • 51. Threat modeling at scale - examples VIP airport lounge. Boarding pass QR code reader allowing through only business class. Abuser story Security requirement Test cases Client: (showing boarding pass)
  • 52. Threat modeling at scale - examples VIP airport lounge. Boarding pass QR code reader allowing through only business class. Abuser story Security requirement Test cases Use an old business boarding pass Use one boarding pass twice Use a scan of boarding pass from another airport Modify class in the QR code Client: (scans boarding pass)
  • 53. • Copying invisible code from stackoverflow • Allowing only trusted dependencies • We’ve got SAST! • Regular VA scans • Presentation clickers Do abuser stories solve all problems?
  • 54. • Shift left = testing, coding, design • Know your enemy • Automate, centralise • The earlier you introduce changes, the better Summary