Threat Modeling
Lessons from
StarWars
Adam Shostack
Presented
March 2021
About Adam Shostack
https://associates.shostack.org
Why Are We Here Today?
• Engineermore secure systems
• Structured, systematicand comprehensiveapproach
• Engineera consistent& predictable lack of surprise
• Works for you (as people, organization and ecosystem)
What Is Threat Modeling?
Agenda
–A simpleapproach to threat modeling
–Top 10 lessons
(Some history and)
A simple approach to
threatmodeling
4 Questions
Web App
Customer
DB
Our App
Content
creation
What Are We Working On?
What Can Go Wrong?
Remember STRIDE
Spoofing
ByLegoEnvy,http://www.eurobricks.com/forum/index.php?showtopic=64532
Tampering
tp://pinlac.com/LegoDSTractorBeam.html
Repudiation
Repudiation
BySebHflickr.com/photos/88048956@N04/8531040850/
Information Disclosure
Photoby SimonLiu flickr.com/photos/si-mocs/6999508124/
Denial of Service
Model byNathanSawaya
http://brickartist.com/gallery/han-solo-in-carbonite/
Elevation of Privilege
flickr.com/photos/prodiffusion/
STRIDE Mnemonic
• Spoofing
• Tampering
• Repudiation
• InformationDisclosure
• Denialof Service
• Elevation of Privileges
…Helps us be structured in how we thinkabout threats
4 Questions
What Are We Going To Do About
It?
Threat Property Mitigation approach
Spoofing Authentication ď‚· Passwords, multi-factor authN
ď‚· Digital signatures
Tampering Integrity ď‚· Permissions/ACLs
ď‚· Digital signatures
Repudiation Non-Repudiation
(Accountability)
ď‚· Secure logging and auditing
ď‚· Digital Signatures
Information Disclosure Confidentiality ď‚· Encryption
ď‚· Permissions/ACLS
Denial of Service Availability ď‚· Permissions/ACLs
ď‚· Filtering
ď‚· Quotas
Elevation of privilege Authorization ď‚· Permissions/ACLs
ď‚· Input validation
TOP TEN LESSONS
Trap #1: “Search your feelings!”
• “ThinkLikeAn Attacker”
• Serious work is helped by structure
Fix
Trap
Trap #2: “You’re Never Done Threat
Modeling”
Model
Identify
Threats
Mitigate
Validate
Model
Identify
Threats
Mitigate
Validate
Trap #3: “The Way To Threat Model
Is…”
• Too much focus on specifics of how
– Use this framework (STRIDE)
– With this diagram type
• Focus on helpingpeople find good threats
• Focus on differentskills, systems
– Developers
– Operations
Fix
Trap
Model
Identify
Threats
Mitigate
Validate
Trap Fix: Building blocks
Trap #3: Monolithic Processes
Security mavens Experts in other areas
Trap #3: “The Way To Threat Model
Is…”
Software
Systems
Trap #4: Threat Modeling as One Skill
• “I should learn tothreatmodel”
• Thinkof threatmodeling
– Likesoftwaredevelopment
– Techniques&repertoire
• Technique: DFDs,STRIDE,Attacktrees
• Repertoire:
– Tools:Firesheep,Hydra,Kali
– Books:Cuckoo'sEggtoCountdowntoZeroDay
• Allused toanalogize& reason about newsystems
Trap
Fix
Trap #5: “Threat Modeling is Easy”
• Thinkingyour first threatmodel will be easy
• “Driving is easy”
• Onceyou learn
• 40,000 US deaths peryear
• Planto work, build muscle
Trap
Fix
Trap #6: Threat Modeling is for
Specialists
• ThinkingTM is for specialists
• Make it likeversion control:
– Every developer, most sysadmins know some
– Some orgs have fulltime people managing trees
• This is a stretch goal for threatmodeling
Trap
Fix
Trap #7: The Wrong Focus
• Start from your assets
• Start by thinkingaboutyour attackers
• Threat modeling should focus on findingthreats
• Remember trap #3: “The way to threatmodel is”
• Startingfrom assets or attackers work for some people
Trap
Fix
Trap #8: Straining Against The Supply
Chain
• Trying to do it all
– Cost & feasibilityof fixeschanges
– Threats are “easy” to address at different parts
• SoC chipmakercan ship trusted boot
• Developers can addlogging, not seeonsite logs
• Thinkabout an alliance along your supply chain
– Security Operations Guide
– Non-requirements
Trap
Fix
Requirements
Threats Mitigations
Requirements drivethreats
Threats driverequirements
No mitigation?
Simplify requirements
Threats need mitigation
Mitigations can be bypassed
Trap #9: Laser-Like Focus on
Threats
Interplay of attacks, mitigations and requirements
Trap #10: Threat Model at the Wrong
Time
“Sir, we’veanalyzed their attack
pattern, and …
there is a danger”
Summary
• Anyone can threat model, and everyone should…soon!
• The skills, techniquesand repertoire can all be learned
• There are many traps
• Threat modeling can be the most effectiveway to drive security throughyour
product, service or system
“All models are wrong,
some models are useful”
— George Box, FRS
Thank you!
Questions?
https://associates.shostack.or
g
Resources
• adam.shostack.org/blog
• Threatmodelingbook.com
• Threatmodelingmanifesto.org
• TM channel at OWASP slack
– https://owasp.org/slack/invite
• https://www.linkedin.com/learning/instructors/adam-shostack
• adam@shostack.org
https://associates.shostack.or
g
Thank you!
• Star Wars: Episodes IV-VI
• Great CreativeCommons Lego brick art:
– Lego Envy,http://www.eurobricks.com/forum/index.php?showtopic=64532
– http://pinlac.com/LegoDSTractorBeam.html
– Seb H http://www.flickr.com/photos/88048956@N04/8531040850/
– Simon Liu http://www.flickr.com/photos/si-mocs/6999508124/
– KaitanTylerguy http://www.flickr.com/photos/kaitan/3326772088/
– NathanSawaya,http://brickartist.com/gallery/han-solo-in-carbonite/
– http://www.flickr.com/photos/prodiffusion/

Threat Modeling Lessons from Star Wars

  • 1.
    Threat Modeling Lessons from StarWars AdamShostack Presented March 2021
  • 2.
  • 3.
    Why Are WeHere Today? • Engineermore secure systems • Structured, systematicand comprehensiveapproach • Engineera consistent& predictable lack of surprise • Works for you (as people, organization and ecosystem)
  • 4.
    What Is ThreatModeling?
  • 5.
    Agenda –A simpleapproach tothreat modeling –Top 10 lessons
  • 6.
    (Some history and) Asimple approach to threatmodeling
  • 7.
  • 8.
  • 9.
    What Can GoWrong? Remember STRIDE
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
    Denial of Service ModelbyNathanSawaya http://brickartist.com/gallery/han-solo-in-carbonite/
  • 16.
  • 17.
    STRIDE Mnemonic • Spoofing •Tampering • Repudiation • InformationDisclosure • Denialof Service • Elevation of Privileges …Helps us be structured in how we thinkabout threats
  • 18.
  • 19.
    What Are WeGoing To Do About It? Threat Property Mitigation approach Spoofing Authentication ď‚· Passwords, multi-factor authN ď‚· Digital signatures Tampering Integrity ď‚· Permissions/ACLs ď‚· Digital signatures Repudiation Non-Repudiation (Accountability) ď‚· Secure logging and auditing ď‚· Digital Signatures Information Disclosure Confidentiality ď‚· Encryption ď‚· Permissions/ACLS Denial of Service Availability ď‚· Permissions/ACLs ď‚· Filtering ď‚· Quotas Elevation of privilege Authorization ď‚· Permissions/ACLs ď‚· Input validation
  • 20.
  • 22.
    Trap #1: “Searchyour feelings!” • “ThinkLikeAn Attacker” • Serious work is helped by structure Fix Trap
  • 23.
    Trap #2: “You’reNever Done Threat Modeling” Model Identify Threats Mitigate Validate Model Identify Threats Mitigate Validate
  • 24.
    Trap #3: “TheWay To Threat Model Is…” • Too much focus on specifics of how – Use this framework (STRIDE) – With this diagram type • Focus on helpingpeople find good threats • Focus on differentskills, systems – Developers – Operations Fix Trap
  • 25.
  • 26.
    Security mavens Expertsin other areas Trap #3: “The Way To Threat Model Is…” Software Systems
  • 27.
    Trap #4: ThreatModeling as One Skill • “I should learn tothreatmodel” • Thinkof threatmodeling – Likesoftwaredevelopment – Techniques&repertoire • Technique: DFDs,STRIDE,Attacktrees • Repertoire: – Tools:Firesheep,Hydra,Kali – Books:Cuckoo'sEggtoCountdowntoZeroDay • Allused toanalogize& reason about newsystems Trap Fix
  • 28.
    Trap #5: “ThreatModeling is Easy” • Thinkingyour first threatmodel will be easy • “Driving is easy” • Onceyou learn • 40,000 US deaths peryear • Planto work, build muscle Trap Fix
  • 29.
    Trap #6: ThreatModeling is for Specialists • ThinkingTM is for specialists • Make it likeversion control: – Every developer, most sysadmins know some – Some orgs have fulltime people managing trees • This is a stretch goal for threatmodeling Trap Fix
  • 30.
    Trap #7: TheWrong Focus • Start from your assets • Start by thinkingaboutyour attackers • Threat modeling should focus on findingthreats • Remember trap #3: “The way to threatmodel is” • Startingfrom assets or attackers work for some people Trap Fix
  • 31.
    Trap #8: StrainingAgainst The Supply Chain • Trying to do it all – Cost & feasibilityof fixeschanges – Threats are “easy” to address at different parts • SoC chipmakercan ship trusted boot • Developers can addlogging, not seeonsite logs • Thinkabout an alliance along your supply chain – Security Operations Guide – Non-requirements Trap Fix
  • 32.
    Requirements Threats Mitigations Requirements drivethreats Threatsdriverequirements No mitigation? Simplify requirements Threats need mitigation Mitigations can be bypassed Trap #9: Laser-Like Focus on Threats Interplay of attacks, mitigations and requirements
  • 33.
    Trap #10: ThreatModel at the Wrong Time “Sir, we’veanalyzed their attack pattern, and … there is a danger”
  • 34.
    Summary • Anyone canthreat model, and everyone should…soon! • The skills, techniquesand repertoire can all be learned • There are many traps • Threat modeling can be the most effectiveway to drive security throughyour product, service or system
  • 35.
    “All models arewrong, some models are useful” — George Box, FRS
  • 36.
  • 37.
  • 38.
    Resources • adam.shostack.org/blog • Threatmodelingbook.com •Threatmodelingmanifesto.org • TM channel at OWASP slack – https://owasp.org/slack/invite • https://www.linkedin.com/learning/instructors/adam-shostack • adam@shostack.org https://associates.shostack.or g
  • 39.
    Thank you! • StarWars: Episodes IV-VI • Great CreativeCommons Lego brick art: – Lego Envy,http://www.eurobricks.com/forum/index.php?showtopic=64532 – http://pinlac.com/LegoDSTractorBeam.html – Seb H http://www.flickr.com/photos/88048956@N04/8531040850/ – Simon Liu http://www.flickr.com/photos/si-mocs/6999508124/ – KaitanTylerguy http://www.flickr.com/photos/kaitan/3326772088/ – NathanSawaya,http://brickartist.com/gallery/han-solo-in-carbonite/ – http://www.flickr.com/photos/prodiffusion/

Editor's Notes

  • #3 20 years of threat modeling From startups to Microsoft
  • #4 Comfortable and confident they can threat model Do so as part of their jobs
  • #29 Phishing; believing things on the internet
  • #33 Aside: “no one would ever do that” 2 meanings, and also, mistakes
  • #34 “You make it look natural!” We don’t evolve to be able to find replay attacks Practice, practice
  • #37 If/how should we account for networking technology (FW, routers, load qbalancers)?
  • #38 Talk about the threat model has changed