├── Attack Tree
├── BLANK.plantuml
├── BLANK.plantuml.svg
├── README.md
├── cryptowallet.plantuml
├── cryptowallet.plantuml.svg
├── generic-cms.plantuml
├── generic-cms.plantuml.svg
├── iot-device
│ ├── iot-device.part1.plantuml
│ ├── iot-device.part1.plantuml.svg
│ ├── iot-device.part2.plantuml
│ └── iot-device.part2.plantuml.svg
├── jetscout
│ └── jetscout.jpg
├── online-battleroyale-game
│ ├── onlinegame.jpg
│ ├── onlinegame.plantuml
│ └── onlinegame.plantuml.svg
├── payment
│ ├── payment-online.plantuml
│ └── payment-online.plantuml.svg
├── physicalsafe.plantuml
├── physicalsafe.plantuml.svg
├── rentingcar.plantuml
├── rentingcar.plantuml.svg
├── scouter
│ └── scouter.jpg
└── sokify
│ ├── sokify.jpg
│ ├── sokify.plantuml
│ ├── sokify.plantuml.png
│ └── sokify.plantuml.svg
├── Flow Diagram
├── BLANK
│ ├── BLANK.py
│ ├── BLANK.py.dot
│ ├── BLANK.py.pdf
│ ├── BLANK.py.png
│ └── BLANK.py.svg
├── README.md
├── app-y-ness
│ ├── alt1-app-y-ness.py
│ ├── alt1-app-y-ness.py.png
│ ├── alt1-app-y-ness.py.svg
│ ├── app-y-ness.jpg
│ ├── app-y-ness.py
│ ├── app-y-ness.py.pdf
│ ├── app-y-ness.py.png
│ └── app-y-ness.py.svg
├── cryptocurrency-wallet
│ ├── cryptowallet.vsdx
│ ├── cryptowallet.vsdx.dwg
│ ├── cryptowallet.vsdx.pdf
│ ├── cryptowallet.vsdx.png
│ └── cryptowallet.vsdx.svg
├── generic-cms
│ ├── generic-cms.py
│ ├── generic-cms.py.dot
│ ├── generic-cms.py.pdf
│ └── generic-cms.py.svg
├── iot-device
│ ├── iot-device.vsdx
│ ├── iot-device.vsdx.dwg
│ ├── iot-device.vsdx.pdf
│ ├── iot-device.vsdx.png
│ └── iot-device.vsdx.svg
├── jetscout
│ ├── alt0-jetscout.jpg
│ ├── alt1-jetscout.jpg
│ ├── alt10-jetscout.jpg
│ ├── alt11-jetscout.jpg
│ ├── alt2-jetscout.jpg
│ ├── alt3-jetscout.jpg
│ ├── alt4-jetscout.jpg
│ ├── alt5-jetscout.jpg
│ ├── alt6-jetscout.jpg
│ ├── alt7-jetscout.jpg
│ ├── alt8-jetscout.jpg
│ ├── alt9-jetscout.jpg
│ └── jetscout.jpg
├── online-battleroyale-game
│ ├── onlinegame.jpg
│ ├── onlinegame.py
│ ├── onlinegame.py.dot
│ ├── onlinegame.py.pdf
│ ├── onlinegame.py.png
│ └── onlinegame.py.svg
├── payment
│ ├── payment-online.py
│ └── payment-online.py.png
├── renting-car-startup
│ ├── alt1-rentingcar.py.png
│ ├── alt2-rentingcar.jpg
│ ├── rentingcar.jpg
│ ├── rentingcar.py
│ ├── rentingcar.py.dot
│ ├── rentingcar.py.pdf
│ ├── rentingcar.py.png
│ └── rentingcar.py.svg
├── scouter
│ └── scouter.jpg
├── sokify
│ ├── alt1-sokify.json
│ ├── alt1-sokify.json.pdf
│ ├── alt1-sokify.json.png
│ └── sokify.jpg
└── webapp-threat-dragon
│ ├── webapp-threat-dragon.json
│ ├── webapp-threat-dragon.json.pdf
│ └── webapp-threat-dragon.json.png
├── INDEX.md
├── IriusRisk
├── 3-Tier-Web-App
│ ├── 3 Tier Web App - Threat Model and Risk Report.pdf
│ ├── Countermeasure-as-jira-ticket- Example.png
│ ├── Dataflow Diagram.png
│ ├── README.md
│ ├── Table of Countermeasures_3-tier-web-app.xls
│ └── Table of Threats_3-tier-web-app.xls
└── README.md
├── LICENSE.md
├── README.md
└── Template
├── BLANK
├── BLANK-draw.io.onepager.xml
├── BLANK-draw.io.onepager.xml.pdf
└── BLANK-draw.io.onepager.xml.svg
└── README.md
/Attack Tree/BLANK.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | skinparam monochrome true
3 | skinparam defaultTextAlignment center
4 |
5 | ' Root nodes
6 | agent "Goal" as goal
7 | agent "What attackers want" as what
8 |
9 | agent "Sub-goal" as subgoal
10 | goal --> subgoal
11 |
12 | agent "Sub-goal 2" as subgoal2
13 | goal --> subgoal2
14 |
15 | agent "Ways to get to goal" as subgoal3
16 | what --> subgoal3
17 |
18 | agent "Sub-sub goal" as subsubgoal
19 | agent "Sub-sub goal 2" as subsubgoal2
20 | agent "Sub-sub goal 3" as subsubgoal3
21 | subgoal3 ---> subsubgoal
22 | subgoal3 ---> subsubgoal2
23 | subgoal3 ---> subsubgoal3
24 |
25 | ' Abstraction (not going to model that)
26 | cloud "**···**" as another
27 | subgoal ---> another
28 | subgoal2 ---> subsubgoal
29 |
30 | ' Leaf nodes
31 | agent "exploit" as exploit
32 | agent "ways to get in" as ways
33 | agent "weakness" as weakness
34 |
35 | subsubgoal ---> exploit
36 |
37 | ' Chaining of exploits required to get to sub-sub goal
38 | interface "and" as and
39 | subsubgoal3 --> and
40 | and --> weakness
41 | and --> ways
42 |
43 | @enduml
--------------------------------------------------------------------------------
/Attack Tree/BLANK.plantuml.svg:
--------------------------------------------------------------------------------
1 | Goal What attackers want Sub-goal Sub-goal 2 Ways to get to goal Sub-sub goal Sub-sub goal 2 Sub-sub goal 3 ··· exploit ways to get in weakness and
--------------------------------------------------------------------------------
/Attack Tree/README.md:
--------------------------------------------------------------------------------
1 | Examples using different tools to create attack trees.
2 |
3 | Tool | File match |
4 | :--- | :---
5 | | Physical whiteboard or paper | `*.jpg` |
6 | | [PlantUML](https://plantuml-editor.kkeisuke.com/) | `*.plantuml` |
7 |
--------------------------------------------------------------------------------
/Attack Tree/cryptowallet.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | skinparam monochrome true
3 | skinparam defaultTextAlignment center
4 |
5 | agent "Steal cryptocurrency" as steal
6 | agent "Manipulate the market" as market
7 | agent "Invade privacy" as privacy
8 |
9 | agent "Expose their spending habits" as spy
10 | privacy --> spy
11 | agent "View their transactions on blockchain" as blockchain
12 | spy --> blockchain
13 |
14 | agent "Gain wallet access" as wallet
15 | steal --> wallet
16 |
17 | agent "**I**nternet **C**on **O**peration" as con
18 | steal --> con
19 |
20 | agent "Steal physical wallet\nand password" as phys
21 | agent "Find wallet seed" as seed
22 | agent "Gain access to\nlocal software wallet" as accesswallet
23 | agent "Gain access to\n web based wallet" as webwallet
24 | wallet --> phys
25 | wallet --> accesswallet
26 | wallet --> webwallet
27 | accesswallet --> seed
28 |
29 | agent "Weak seeding algo" as weakseed
30 | seed --> weakseed
31 |
32 | agent "Malware" as malware
33 | accesswallet --> malware
34 |
35 | agent "Gain remote access\nto local API" as api
36 | agent "Authentication bypass" as lackauth
37 | agent "DNS rebinding attack" as dnsrebind
38 | accesswallet --> api
39 | interface "and" as and
40 | api --> and
41 | and --> lackauth
42 | and --> dnsrebind
43 |
44 | agent "Gain exchange access" as xaccess
45 | agent "Steal account" as xaccount
46 | 'agent "Compromise network" as xnetwork
47 | agent "API access" as xapi
48 | agent "Steal API keys" as xkeys
49 | agent "Authentication bypass" as xauthbypass
50 | steal --> xaccess
51 | xaccess ---> xaccount
52 | 'xaccess --> xnetwork
53 | xaccess --> xapi
54 | xapi --> xkeys
55 | xapi --> xauthbypass
56 | xapi --> xaccount
57 |
58 | agent "Denial of service" as dos
59 | market --> dos
60 | market --> xaccess
61 | 'market -> steal
62 |
63 | cloud "**···**" as another
64 | xaccount --> another
65 | cloud "**···**" as anothertwo
66 | cloud "**···**" as anotherthree
67 | xauthbypass --> anothertwo
68 | xkeys --> anotherthree
69 |
70 | 'spy --> xaccess
71 | 'spy --> wallet
72 |
73 | @enduml
74 |
--------------------------------------------------------------------------------
/Attack Tree/generic-cms.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | skinparam monochrome true
3 | skinparam defaultTextAlignment center
4 |
5 | ' Root goals
6 | agent "Steal confidential data" as rootgoal1
7 | agent "Recon for other attacks" as rootgoal2
8 |
9 | ' Sub goals
10 | agent "Gain privileged access" as gainpriv
11 | rootgoal1 ---> gainpriv
12 |
13 | agent "Gather users data" as gatherusers
14 | rootgoal2 --> gatherusers
15 |
16 | agent "Compromise end users" as compromiseenduser
17 | gatherusers --> compromiseenduser
18 | rootgoal1 ---> compromiseenduser
19 |
20 | agent "XSS" as xss
21 | compromiseenduser ---> xss
22 |
23 | agent "Find user password" as guessupassword
24 | compromiseenduser --> guessupassword
25 |
26 | agent "Brute force" as bruteforce
27 | guessupassword --> bruteforce
28 | agent "Find in password dump" as passdump
29 | guessupassword --> passdump
30 |
31 | gainpriv ---> xss
32 |
33 |
34 |
35 | @enduml
--------------------------------------------------------------------------------
/Attack Tree/generic-cms.plantuml.svg:
--------------------------------------------------------------------------------
1 | Steal confidential data Recon for other attacks Gain privileged access Gather users data Compromise end users XSS Find user password Brute force Find in password dump
--------------------------------------------------------------------------------
/Attack Tree/iot-device/iot-device.part1.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | skinparam monochrome true
3 |
4 | agent "Mass mining" as mine
5 | agent "Mass scan" as scan
6 | agent "DDoS" as ddos
7 | agent "Control many devices \n(Botnet)" as botnet
8 | mine --> botnet
9 | scan --> botnet
10 | ddos --> botnet
11 |
12 | agent "Use legit command" as legitcmd
13 | agent "Exploit device flaws" as flaws
14 | agent "Obtain device access" as access
15 | botnet --> legitcmd
16 | botnet --> flaws
17 | botnet --> access
18 |
19 | agent "Get WiFi LAN access" as wifi
20 | agent "Get Physical access" as phys
21 | agent "Place Factory Backdoor" as factory
22 | agent "Hack cloud server" as cloud
23 | access --> wifi
24 | access --> phys
25 | access --> factory
26 | access --> cloud
27 |
28 | agent "Make my life miserable" as life
29 | agent "Randomware" as ransomware
30 | agent "Invade my privacy" as privacy
31 | agent "Mess with the lights" as mess
32 |
33 | life --> ransomware
34 | life --> privacy
35 | life --> mess
36 |
37 | agent "View my habits" as habits
38 | agent "Spy me live" as spy
39 | privacy --> habits
40 | privacy --> spy
41 |
42 | agent "Steal cloud data" as data
43 | habits --> data
44 | spy --> data
45 | data ---> cloud
46 |
47 | agent "Sniff network" as sniff
48 | habits ---> sniff
49 | spy ---> sniff
50 | access --> sniff
51 | sniff --> wifi
52 | sniff --> phys
53 |
54 | @enduml
--------------------------------------------------------------------------------
/Attack Tree/iot-device/iot-device.part1.plantuml.svg:
--------------------------------------------------------------------------------
1 | Mass mining Mass scan DDoS Control many devices (Botnet) Use legit command Exploit device flaws Obtain device access Get WiFi LAN access Get Physical access Place Factory Backdoor Hack cloud server Make my life miserable Randomware Invade my privacy Mess with the lights View my habits Spy me live Steal cloud data Sniff network
--------------------------------------------------------------------------------
/Attack Tree/iot-device/iot-device.part2.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | skinparam monochrome true
4 |
5 | agent "Hack cloud server" as cloud
6 |
7 | agent "Hack system" as sys
8 | agent "Hack account" as acc
9 |
10 | cloud --> sys
11 | cloud --> acc
12 |
13 | agent "Hack API" as api
14 | agent "Hack server" as server
15 |
16 | agent "RCE" as rce
17 | agent "SQLi" as sqli
18 |
19 | sys ---> api
20 | sys --> server
21 |
22 | server --> api
23 |
24 | api --> rce
25 |
26 | api ---> sqli
27 |
28 | rce --> sqli
29 |
30 | @enduml
--------------------------------------------------------------------------------
/Attack Tree/iot-device/iot-device.part2.plantuml.svg:
--------------------------------------------------------------------------------
1 | Hack cloud server Hack system Hack account Hack API Hack server RCE SQLi
--------------------------------------------------------------------------------
/Attack Tree/jetscout/jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Attack Tree/jetscout/jetscout.jpg
--------------------------------------------------------------------------------
/Attack Tree/online-battleroyale-game/onlinegame.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Attack Tree/online-battleroyale-game/onlinegame.jpg
--------------------------------------------------------------------------------
/Attack Tree/online-battleroyale-game/onlinegame.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | skinparam monochrome true
3 | skinparam defaultTextAlignment center
4 |
5 | ' Root nodes
6 | agent "Win Game" as win
7 | agent "Grief Players" as grief
8 | agent "Gain Fame" as fame
9 |
10 | agent "git gud" as gitgud
11 | win <-- gitgud
12 | cloud "**...**" as nope
13 | gitgud <-- nope
14 |
15 | agent "Local Cheat" as cheat
16 | win <-- cheat
17 | agent "Speed Hack" as speedhack
18 | agent "No Clip" as noclip
19 | agent "Wall Hack" as wallhack
20 | agent "Aim Bot" as aimbot
21 | cheat <-- speedhack
22 | cheat <-- noclip
23 | cheat <-- wallhack
24 | cheat <-- aimbot
25 |
26 | agent "Abuse client/server\nINPUT" as input
27 | agent "Abuse client/server\nOUTPUT" as output
28 | speedhack <-- input
29 | noclip <-- input
30 | wallhack <-- output
31 | agent "Spy Memory" as spymem
32 | output <-- spymem
33 | agent "Hook DLL" as hookdll
34 | spymem <-- hookdll
35 | agent "Windows OS limitations" as windows
36 | agent "DLL Injection" as dllinjection
37 | hookdll <-- windows
38 | hookdll <-- dllinjection
39 | agent "Network Sniff" as network
40 | output <-- network
41 |
42 | agent "Disconnect other players" as discon
43 | win <-- discon
44 | grief <-- discon
45 |
46 | agent "Mess with game progression" as progress
47 | grief <-- progress
48 | agent "Hack Ranking" as ranking
49 | progress <--- ranking
50 | agent "Hack Equipement/Skins" as equip
51 | progress <--- equip
52 |
53 | agent "Delete Account" as deleteaccount
54 | grief <-- deleteaccount
55 |
56 | agent "Hack Moderation Website" as hackwwwmods
57 | deleteaccount <-- hackwwwmods
58 | interface "and" as and
59 | agent "Gain corp network access" as gaincorp
60 | hackwwwmods <-- and
61 | agent "Steal Login Credentials" as steallogin
62 | agent "Exploit Website Server" as exploitserver
63 | and <-- gaincorp
64 | interface "or" as or
65 | and <-- or
66 | or <-- steallogin
67 | or <-- exploitserver
68 |
69 | agent "Gain Access to DB" as gainaccessdb
70 | deleteaccount <-- gainaccessdb
71 | agent "Hack API REST" as hackapirest
72 | interface "and" as and2
73 | and2 <-- gaincorp
74 | gainaccessdb <-- and2
75 | and2 <-- hackapirest
76 | agent "RCE" as rce
77 | agent "SQLi" as sqli
78 | hackapirest <-- rce
79 | hackapirest <-- sqli
80 |
81 | agent "Hack Scoreboard" as hackscore
82 | fame <-- hackscore
83 |
84 | @enduml
--------------------------------------------------------------------------------
/Attack Tree/payment/payment-online.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | skinparam backgroundcolor monochrome
3 | 'skinparam monochrome true
4 | skinparam defaultTextAlignment center
5 | skinparam titleFontSize 22
6 | skinparam handwritten true
7 |
8 | !define SPRITESURL https://raw.githubusercontent.com/rabelenda/cicon-plantuml-sprites/v1.0/sprites
9 | !includeurl SPRITESURL/user.puml
10 |
11 | !define ICONURL https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/v2.2.0
12 | !includeurl ICONURL/common.puml
13 | !includeurl ICONURL/font-awesome-5/cc_stripe.puml
14 |
15 | skinparam rectangle {
16 | borderColor Black
17 | backgroundColor #fff
18 | }
19 | skinparam agent {
20 | borderColor Black
21 | backgroundColor #fff
22 | }
23 | skinparam sequence{
24 | arrowColor Black
25 | }
26 | skinparam usecase {
27 | borderColor #fff
28 | backgroundColor #fff
29 | shadowing false
30 | fontSize 18
31 | }
32 |
33 | title
34 |
35 | Threat Model | Attack Tree | Payment Online
36 |
37 | end title
38 |
39 | 'legend left
40 | 'text
41 | 'endlegend
42 |
43 | left footer
44 | [[https://github.com/TClark000/threat-models/blob/base/Flow%20Diagram/payment/img/payment_online_advanced.html{Report} Flow Diagram Report with Vulnerabilities]]
45 | github.com/tclark000/threat-models/blob/base/Flow Diagram/payment/img/payment_online_advanced.html
46 |
47 | end footer
48 |
49 | (key entities/actors within \nthe payment process) as subtitle
50 |
51 | rectangle "<$user>\nThreat" as threat #Thistle
52 | rectangle "<$user>\nCustomer" as customer #LightGoldenRodYellow
53 | rectangle "<$user>\nMerchant" as merchant #LightGoldenRodYellow
54 | FA5_CC_STRIPE(stripe,Stripe) #LightGoldenRodYellow
55 |
56 | 'threat <. subtitle
57 | 'subtitle .> stripe
58 | 'subtitle .> merchant
59 | 'subtitle .> customer
60 | subtitle .> threat
61 | stripe <. subtitle
62 | merchant <. subtitle
63 | customer <. subtitle
64 |
65 | ' Root nodes
66 | agent "Intent - Disrupt Merchant Business" as goalDisrupt
67 | agent "Intent - Steal Credit Card Details" as goalSteal
68 |
69 | subtitle ... goalDisrupt #fff
70 | subtitle ... goalSteal #fff
71 |
72 | ' goalDisrupt
73 | agent "Prevent Purchases \nor Subscriptions" as goalPrevent
74 | agent "Use fraudulent \ncredit card" as goalFraudulentCC
75 | agent "Take advantage of Misconfiguration \n& Vulnerabilities" as goalApp
76 | agent "Target Stripe API" as goalStripeApi
77 | agent "Site Displays \nDifferent Content" as goalSite
78 | agent "Site no Longer Responds" as goalSite2
79 | agent "Steal customers" as goalStealCust
80 | agent "Create Fake Payments \nwith Stolen Cards" as goalFakePayments
81 | agent "Issue Fake Refunds \nand Cancel Orders" as goalRefund
82 |
83 | goalDisrupt --> goalFakePayments
84 | goalDisrupt--> goalRefund
85 | goalDisrupt --> goalPrevent
86 | goalDisrupt --> goalFraudulentCC
87 | goalDisrupt --> goalApp
88 | goalDisrupt --> goalStripeApi
89 | goalDisrupt --> goalStealCust
90 | goalDisrupt --> goalSite
91 | goalDisrupt --> goalSite2
92 |
93 | note top of goalFraudulentCC #LightGoldenRodYellow: Thwarted by implementing 3D Secure
94 |
95 | agent "Target Merchant API" as goalMerchantApi
96 | agent "Create a \nMock website" as goalMock
97 |
98 | goalPrevent --> goalMerchantApi
99 | goalStealCust --> goalMock
100 |
101 | agent "Denial of Service" as goalDoS
102 |
103 | goalMerchantApi --> goalDoS
104 |
105 | agent "Tamper with Application \ncausing outage" as goalCrash
106 | agent "Compromise Merchant \nWeb Servers" as goalServers
107 |
108 | goalApp --> goalCrash
109 | goalCrash --> goalServers
110 |
111 | agent "Command Line Execution \nthrough SQL Injection" as goalCLE
112 | agent "Path Traversal" as goalPathTraversal
113 | agent "Session Hijacking \n- ServerSide" as goalSessionServerSide
114 | agent "Using Malicious Files" as goalMaliciousFiles
115 | agent "XSS Targeting \nNon-Script Elements" as goalXSS
116 |
117 | goalServers --> goalCLE
118 | goalServers --> goalPathTraversal
119 | goalServers --> goalSessionServerSide
120 | goalServers --> goalMaliciousFiles
121 | goalServers --> goalXSS
122 |
123 | agent "Gain access to Stripes \nMerchant Dashboard" as goalMerchantDashboard
124 | agent "Compromise and \nor steal employee laptop \nand mobile phone" as goalLaptop
125 | goalFakePayments--> goalMerchantDashboard
126 | goalRefund --> goalMerchantDashboard
127 | goalMerchantDashboard --> goalLaptop
128 |
129 | agent "Domain Hijacking" as goalDomain
130 | agent "Denial of Service Attack" as goalDoS2
131 |
132 | goalSite --> goalDomain
133 | goalSite2 --> goalDomain
134 | goalSite2 --> goalDoS2
135 |
136 | ' goalSteal
137 | agent "Target Customer Details \nstored by Merchant (db)" as goalCustLogin
138 | agent "Target Customer Client \n(home pc)" as goalCustClient
139 | agent "Target Stripe" as goalStripe
140 | agent "Customer uses Public WiFi \nto make a Payment" as goalPublicWiFi
141 |
142 | goalSteal --> goalCustLogin
143 | goalSteal --> goalCustClient
144 | goalSteal --> goalStripe
145 | goalSteal --> goalPublicWiFi
146 |
147 | agent "Target known \nCustomers of Merchant" as goalSocial
148 | agent "Social Engineering \nsuch as phishing" as goalSocialEng
149 | agent "Take advantage of \nMisconfiguration \n& Vulnerabilities" as goalStripeMisConfig
150 | agent "Insecure Wireless \nProtocols (WEP)" as goalMitM
151 |
152 | goalCustLogin --> goalSocial
153 | goalCustClient --> goalSocial
154 | goalStripe --> goalSocialEng
155 | goalStripe --> goalStripeMisConfig
156 | goalPublicWiFi --> goalMitM
157 |
158 | agent "Lateral movement \nwithin Organization" as goalLateral
159 | agent "Target Stripe for \nAdministrative rights" as goalStripeAdmin
160 | agent "Man in the Middle Attack\n(MiTM)" as goalManInMiddle
161 |
162 | goalSocialEng --> goalStripeAdmin
163 | goalStripeAdmin --> goalLateral
164 | goalStripeMisConfig --> goalStripeAdmin
165 | goalStripeMisConfig --> goalLateral
166 | goalMitM --> goalManInMiddle
167 |
168 | agent "Inject false Info & \nIntercept Data transfer" as goalDataWiFi
169 |
170 | goalManInMiddle --> goalDataWiFi
171 |
172 | goalMock --> goalSocial
173 | goalStripeApi --> goalDoS
174 |
175 | agent "Social Engineering \nphishing" as goalPhishing
176 | agent "Session Hijacking" as goalSessionHijacking
177 |
178 | goalSocial --> goalPhishing
179 | goalSocial --> goalSessionHijacking
180 |
181 | agent "Steal Customer Data" as goalData
182 | agent "Transfer Money to \nWrong Account" as goalBankAccount
183 |
184 | goalLateral --> goalData
185 | goalDataWiFi --> goalBankAccount
186 |
187 | @enduml
188 |
--------------------------------------------------------------------------------
/Attack Tree/physicalsafe.plantuml:
--------------------------------------------------------------------------------
1 |
2 | @startuml
3 | skinparam monochrome true
4 | skinparam defaultTextAlignment center
5 |
6 | ' Root node
7 | agent "Open Safe" as goal
8 |
9 | ' Sub goals
10 | agent "Pick Lock" as picklock
11 | agent "Learn Combo" as learncombo
12 | agent "Cut Open Safe" as cutopensafe
13 |
14 | goal --> picklock
15 | goal --> learncombo
16 | goal --> cutopensafe
17 |
18 | agent "Find Written Combo" as findwritten
19 | learncombo --> findwritten
20 |
21 | agent "Get Combo from Target" as getcombotarget
22 | learncombo --> getcombotarget
23 | agent "Extortion" as extortion
24 | agent "Evesdrop" as evesdrop
25 | agent "Bribe" as bribe
26 | getcombotarget --> extortion
27 | getcombotarget --> evesdrop
28 | getcombotarget --> bribe
29 |
30 | interface "and" as and
31 | evesdrop --> and
32 |
33 | agent "Listen to Conversation" as listenconvo
34 | agent "Target Says Combo" as targetsayscombo
35 | and --> listenconvo
36 | and --> targetsayscombo
37 |
38 | ' Abstraction (not going to model that)
39 | cloud "**···**" as another
40 | extortion --> another
41 |
42 | @enduml
43 |
--------------------------------------------------------------------------------
/Attack Tree/physicalsafe.plantuml.svg:
--------------------------------------------------------------------------------
1 | Open Safe Pick Lock Learn Combo Cut Open Safe Find Written Combo Get Combo from Target Extortion Evesdrop Bribe and Listen to Conversation Target Says Combo ···
--------------------------------------------------------------------------------
/Attack Tree/rentingcar.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | skinparam monochrome true
3 | skinparam defaultTextAlignment center
4 | ' Root nodes
5 | agent "Steal Car" as goalsteal
6 | agent "Disrupt business operations" as goaldisrupt
7 |
8 | ' Sub goals
9 | agent "Make car unrentable" as goaldos
10 | agent "Rent all car" as goalrentall
11 |
12 | goaldisrupt --> goaldos
13 | goaldisrupt --> goalrentall
14 |
15 | agent "DoS car rentals" as dosrentals
16 | goaldos --> dosrentals
17 |
18 | agent "Break Cars" as breakcars
19 | agent "DoS API Gateway" as dosapi
20 | agent "Mess with mobile app" as messmobile
21 | dosrentals --> breakcars
22 | ' This is a good opportunity to try refactoring for better view
23 | ' Try changing the following ---> to --> and see how it looks
24 | dosrentals ---> dosapi
25 | dosrentals --> messmobile
26 |
27 | agent "Crash Mobile App" as crashmobile
28 | messmobile --> crashmobile
29 |
30 | agent "Get App Removed from App Store" as removestore
31 | messmobile --> removestore
32 |
33 | agent "DDoS with many requests" as ddosreq
34 | agent "Screw certificates" as screwcerts
35 | agent "Gain Access to system" as gainsysaccess
36 | dosapi --> ddosreq
37 | dosapi --> screwcerts
38 | dosapi --> gainsysaccess
39 |
40 | agent "Steal admin credentials" as stealadmincreds
41 | gainsysaccess --> stealadmincreds
42 |
43 | agent "(todo)" as detailsadminscred
44 | stealadmincreds --> detailsadminscred
45 |
46 | agent "SF Style" as sfstyle
47 | goalsteal --> sfstyle
48 | cloud "**иии**" as cloud1
49 | sfstyle --> cloud1
50 |
51 | interface "and" as and1
52 | goalsteal --> and1
53 |
54 | agent "Unlock Car" as unlockcar
55 | agent "Start Engine" as startengine
56 | and1 --> unlockcar
57 | and1 --> startengine
58 |
59 | agent "Gain Car Owner Access" as gainowner
60 |
61 | unlockcar --> gainowner
62 | startengine --> gainowner
63 |
64 | agent "Get Owner Credentials" as getocreds
65 | gainowner --> getocreds
66 | gainowner --> gainsysaccess
67 |
68 | agent "Steal creds from owner" as stealcreds
69 | getocreds --> stealcreds
70 | agent "Ask nicely" as nicely
71 | getocreds --> nicely
72 |
73 | agent "Bluetooth snarfing" as snarf
74 | stealcreds --> snarf
75 |
76 | agent "Evil Twin" as eviltwin
77 | stealcreds --> eviltwin
78 |
79 | agent "Lack of transport crypto" as lackbcrypto
80 |
81 | snarf --> lackbcrypto
82 |
83 | @enduml
--------------------------------------------------------------------------------
/Attack Tree/scouter/scouter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Attack Tree/scouter/scouter.jpg
--------------------------------------------------------------------------------
/Attack Tree/sokify/sokify.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Attack Tree/sokify/sokify.jpg
--------------------------------------------------------------------------------
/Attack Tree/sokify/sokify.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | skinparam monochrome true
3 | skinparam defaultTextAlignment center
4 |
5 | ' Root nodes
6 | agent "financial Gain" as financial
7 | agent "stalk" as stalk
8 |
9 | ' Sub goals
10 | agent "steal customers information" as steal
11 | agent "view public data" as viewpublic
12 |
13 | financial --> steal
14 | stalk --> steal
15 | stalk --> viewpublic
16 |
17 | agent "search for leak" as leak
18 | agent "view instagram" as instagram
19 | viewpublic --> leak
20 | viewpublic --> instagram
21 |
22 | agent "compromised marketing laptop" as laptop
23 | agent "Hack all the fax" as fax
24 |
25 | steal --> laptop
26 | steal --> fax
27 |
28 | cloud "**...**" as cloud1
29 | cloud "**...**" as cloud2
30 | laptop --> cloud1
31 | fax --> cloud2
32 |
33 | agent "hack web api" as hackapi
34 | steal --> hackapi
35 |
36 | agent "domain name takeover" as dnstakeover
37 | agent "intercept incoming traffic" as intercept
38 | agent "impersonate user" as impersonate
39 |
40 | hackapi ---> dnstakeover
41 | hackapi ---> intercept
42 | hackapi ---> impersonate
43 |
44 | agent "registration jacking" as regjacking
45 | agent "mitm" as mitm
46 | agent "find vuln" as findvuln
47 |
48 | hackapi ---> findvuln
49 |
50 | impersonate --> regjacking
51 | impersonate --> mitm
52 | impersonate --> findvuln
53 |
54 | interface "and" as and1
55 | mitm --> and1
56 |
57 | agent "user connecting to public wifi" as publicwifi
58 | agent "clear text protocol" as cleartext
59 | and1 --> publicwifi
60 | and1 --> cleartext
61 |
62 |
63 | @enduml
--------------------------------------------------------------------------------
/Attack Tree/sokify/sokify.plantuml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Attack Tree/sokify/sokify.plantuml.png
--------------------------------------------------------------------------------
/Attack Tree/sokify/sokify.plantuml.svg:
--------------------------------------------------------------------------------
1 | financial Gain stalk steal customers information view public data search for leak view instagram compromised marketing laptop Hack all the fax ... ... hack web api domain name takeover intercept incoming traffic impersonate user registration jacking mitm find vuln and user connecting to public wifi clear text protocol
--------------------------------------------------------------------------------
/Flow Diagram/BLANK/BLANK.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | from pytm import *
4 |
5 | tm = TM("Example Flow Diagram")
6 | tm.description = "This is a sample threat model for the Threat Modeling Workshop."
7 |
8 | internet = Boundary(" ")
9 |
10 | user = Actor("Actor (user)")
11 |
12 | web = Server("Process")
13 | web.inBoundary = internet
14 |
15 | api = Server("Another Process")
16 | api.inBoundary = internet
17 |
18 | db = Datastore("Datastore")
19 | db.inBoundary = internet
20 |
21 | another = SetOfProcesses("Multiples Process")
22 | another.inBoundary = internet
23 |
24 | user_to_web = Dataflow(user, web, "HTTPS")
25 | web_to_api = Dataflow(web, api, "HTTP")
26 | api_to_db = Dataflow(api, db, " ")
27 | web_to_another = Dataflow(web, another, "?")
28 |
29 | tm.process()
--------------------------------------------------------------------------------
/Flow Diagram/BLANK/BLANK.py.dot:
--------------------------------------------------------------------------------
1 | digraph tm {
2 | graph [
3 | fontname = Arial;
4 | fontsize = 14;
5 | ]
6 | node [
7 | fontname = Arial;
8 | fontsize = 14;
9 | rankdir = lr;
10 | ]
11 | edge [
12 | shape = none;
13 | fontname = Arial;
14 | fontsize = 12;
15 | ]
16 | labelloc = "t";
17 | fontsize = 20;
18 | nodesep = 1;
19 |
20 | subgraph cluster_cacebafcaebeabfbbacecaba {
21 | graph [
22 | fontsize = 10;
23 | fontcolor = firebrick2;
24 | style = dashed;
25 | color = firebrick2;
26 | label = < >;
27 | ]
28 |
29 | bfecadfeecdeafdaedadecf [
30 | shape = circle
31 | color = black
32 | label = <
>;
33 | ]
34 | fcbdafdbbdcfcbbbefdee [
35 | shape = circle
36 | color = black
37 | label = <>;
38 | ]
39 | ffaddaddffcafad [
40 | shape = none;
41 | color = black;
42 | label = <>;
43 | ]
44 | deddbeacafbddfdccbcbccbbf [
45 | shape = doublecircle;
46 | color = black;
47 |
48 | label = <>;
49 | ]
50 |
51 | }
52 |
53 | dcecfdcdcbadffbc [
54 | shape = square;
55 | label = <>;
56 | ]
57 | dcecfdcdcbadffbc -> bfecadfeecdeafdaedadecf [
58 | color = black;
59 | label = <>;
60 | ]
61 | bfecadfeecdeafdaedadecf -> fcbdafdbbdcfcbbbefdee [
62 | color = black;
63 | label = <>;
64 | ]
65 | fcbdafdbbdcfcbbbefdee -> ffaddaddffcafad [
66 | color = black;
67 | label = <>;
68 | ]
69 | bfecadfeecdeafdaedadecf -> deddbeacafbddfdccbcbccbbf [
70 | color = black;
71 | label = <>;
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------
/Flow Diagram/BLANK/BLANK.py.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/BLANK/BLANK.py.pdf
--------------------------------------------------------------------------------
/Flow Diagram/BLANK/BLANK.py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/BLANK/BLANK.py.png
--------------------------------------------------------------------------------
/Flow Diagram/BLANK/BLANK.py.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 | tm
11 |
12 | cluster_cacebafcaebeabfbbacecaba
13 |
14 |
15 |
16 |
17 | bfecadfeecdeafdaedadecf
18 |
19 | Process
20 |
21 |
22 | fcbdafdbbdcfcbbbefdee
23 |
24 | Another
25 | Process
26 |
27 |
28 | bfecadfeecdeafdaedadecf->fcbdafdbbdcfcbbbefdee
29 |
30 |
31 | HTTP
32 |
33 |
34 | deddbeacafbddfdccbcbccbbf
35 |
36 |
37 | Multiples
38 | Process
39 |
40 |
41 | bfecadfeecdeafdaedadecf->deddbeacafbddfdccbcbccbbf
42 |
43 |
44 | ?
45 |
46 |
47 | ffaddaddffcafad
48 | Datastore
49 |
50 |
51 |
52 |
53 | fcbdafdbbdcfcbbbefdee->ffaddaddffcafad
54 |
55 |
56 |
57 |
58 |
59 | dcecfdcdcbadffbc
60 |
61 | Actor
62 | (user)
63 |
64 |
65 | dcecfdcdcbadffbc->bfecadfeecdeafdaedadecf
66 |
67 |
68 | HTTPS
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/Flow Diagram/README.md:
--------------------------------------------------------------------------------
1 | Examples of flow diagrams using different tools to create them.
2 |
3 | Can be of various sub-types such as
4 | * Data Flow Diagram
5 | * Connection Flow Diagram
6 | * Process Flow Diagram
7 |
8 | Tool | File match |
9 | :--- | :---
10 | | [pytm](https://github.com/izar/pytm/): A Pythonic framework for threat modeling | `*.py` |
11 | | [Threat Dragon](https://owasp.org/www-project-threat-dragon/): The OWASP threat modelling tool | `*.json` |
12 | | [Graphviz](https://graphviz.gitlab.io/) DOT | `*.dot` |
13 | | Microsoft Visio | `*.vsdx` |
14 | | Physical whiteboard or paper | `*.jpg` |
15 |
16 | Currently pytm is generating the dot and then Graphviz is used to create outputs.
17 |
18 | Threat Dragon is an OWASP project. It is both an online threat modelling web application and a desktop application. It includes system diagramming as well as a rule engine to auto-generate threats.
19 |
20 | Files starting with `altN-` are alternate version of the same system being modeled by a different person.
21 |
--------------------------------------------------------------------------------
/Flow Diagram/app-y-ness/alt1-app-y-ness.py:
--------------------------------------------------------------------------------
1 | from pytm.pytm import TM, Boundary, Server, Actor, Datastore, Dataflow, SetOfProcesses
2 |
3 | tm = TM("App-y-ness")
4 | tm.description = "This is a sample threat model for the Threat Modeling Workshop."
5 |
6 | internet = Boundary("Internet")
7 |
8 | user = Actor("App-y-tenant")
9 |
10 | app = Server("Mobile App")
11 |
12 | buyApi = Server("Buy API-y")
13 | buyApi.inBoundary = internet
14 |
15 | rentApi = Server("Rent API-y")
16 | rentApi.inBoundary = internet
17 |
18 | market = SetOfProcesses("Market-y")
19 | market.inBoundary = internet
20 |
21 | alertApi = Server("Alert API-y")
22 | alertApi.inBoundary = internet
23 |
24 | authApi = Server("Auth API-y")
25 | authApi.inBoundary = internet
26 |
27 | allAuth = Server("All Auth")
28 | allAuth.inBoundary = internet
29 |
30 | phoneCloud = Server("Phone Provider Cloud")
31 |
32 | firensurfCloud = Server("Fire n' Surf .gov")
33 |
34 | dbB = Datastore("Oracle Table B")
35 | dbB.inBoundary = internet
36 |
37 | dbR = Datastore("Oracle Table R")
38 | dbR.inBoundary = internet
39 |
40 | dbT = Datastore("Oracle Table T")
41 | dbT.inBoundary = internet
42 |
43 | user_to_app = Dataflow(user, app, "use")
44 | app_to_buyapi = Dataflow(app, buyApi, "HTTPS JSON")
45 | app_to_phonecloud = Dataflow(app, phoneCloud, " ")
46 | app_to_rentapi = Dataflow(app, rentApi, "HTTPS JSON")
47 | app_to_authapi = Dataflow(app, authApi, "HTTPS JSON")
48 | app_to_dbt = Dataflow(authApi, dbT, "Token-y")
49 | allauth_to_dbt = Dataflow(allAuth, dbT, " ")
50 | buyapi_to_dbt = Dataflow(buyApi, dbT, " ")
51 | buyapi_to_market = Dataflow(buyApi, market, " ")
52 | rentapi_to_dbr = Dataflow(rentApi, dbR, " ")
53 | rentapi_to_dbb = Dataflow(buyApi, dbB, " ")
54 | rentapi_to_market = Dataflow(rentApi, market, " ")
55 | alert_to_phonecloud = Dataflow(alertApi, phoneCloud, "push")
56 | alert_to_firensurf = Dataflow(alertApi, firensurfCloud, "Kafka HTTPS")
57 | firensurf_to_alert = Dataflow(firensurfCloud, alertApi, "push")
58 | buyapi_to_phonecloud = Dataflow(buyApi, phoneCloud, " ")
59 |
60 | tm.process()
61 |
--------------------------------------------------------------------------------
/Flow Diagram/app-y-ness/alt1-app-y-ness.py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/app-y-ness/alt1-app-y-ness.py.png
--------------------------------------------------------------------------------
/Flow Diagram/app-y-ness/alt1-app-y-ness.py.svg:
--------------------------------------------------------------------------------
1 |
3 |
4 | tm
5 |
6 |
7 | cluster_bfaefefcfbeeafeefac
8 |
9 | Internet
10 |
11 |
12 |
13 | aeedbbaaddfaabcd
14 |
15 | Buy
16 | API-y
17 |
18 |
19 |
20 | dcffabefabccccaedbd
21 |
22 |
23 | Market-y
24 |
25 |
26 |
27 | aeedbbaaddfaabcd->dcffabefabccccaedbd
28 |
29 |
30 |
31 |
32 |
33 |
34 | abafcafdbfecaeffabaacdaa
35 | Oracle Table B
36 |
37 |
38 |
39 |
40 |
41 | aeedbbaaddfaabcd->abafcafdbfecaeffabaacdaa
42 |
43 |
44 |
45 |
46 |
47 |
48 | cddeffdbddceaedacfabfcfdfba
49 | Oracle Table T
50 |
51 |
52 |
53 |
54 |
55 | aeedbbaaddfaabcd->cddeffdbddceaedacfabfcfdfba
56 |
57 |
58 |
59 |
60 |
61 |
62 | dabeeeacccddebefbfcaa
63 |
64 | Phone
65 | Provider
66 | Cloud
67 |
68 |
69 |
70 | aeedbbaaddfaabcd->dabeeeacccddebefbfcaa
71 |
72 |
73 |
74 |
75 |
76 |
77 | bbdeaebdefcdfcdeddcce
78 |
79 | Rent
80 | API-y
81 |
82 |
83 |
84 | bbdeaebdefcdfcdeddcce->dcffabefabccccaedbd
85 |
86 |
87 |
88 |
89 |
90 |
91 | faeedeffeeccfefdabd
92 | Oracle Table R
93 |
94 |
95 |
96 |
97 |
98 | bbdeaebdefcdfcdeddcce->faeedeffeeccfefdabd
99 |
100 |
101 |
102 |
103 |
104 |
105 | cfafcafbfdeeffbfdffcfbf
106 |
107 | Alert
108 | API-y
109 |
110 |
111 |
112 | cfafcafbfdeeffbfdffcfbf->dabeeeacccddebefbfcaa
113 |
114 |
115 | push
116 |
117 |
118 |
119 | dfcdfbbdbaaeabcecedfdde
120 |
121 | Fire n' Surf .gov
122 |
123 |
124 |
125 | cfafcafbfdeeffbfdffcfbf->dfcdfbbdbaaeabcecedfdde
126 |
127 |
128 | Kafka
129 | HTTPS
130 |
131 |
132 |
133 | eaddecbacbcbcc
134 |
135 | Auth
136 | API-y
137 |
138 |
139 |
140 | eaddecbacbcbcc->cddeffdbddceaedacfabfcfdfba
141 |
142 |
143 | Token-y
144 |
145 |
146 |
147 | beddcffdabbedfadacb
148 |
149 | All Auth
150 |
151 |
152 |
153 | beddcffdabbedfadacb->cddeffdbddceaedacfabfcfdfba
154 |
155 |
156 |
157 |
158 |
159 |
160 | bbafbeacfeeacbedbcbeb
161 |
162 | App-y-tenant
163 |
164 |
165 |
166 | fdedecdffddacddebbac
167 |
168 | Mobile App
169 |
170 |
171 |
172 | bbafbeacfeeacbedbcbeb->fdedecdffddacddebbac
173 |
174 |
175 | use
176 |
177 |
178 |
179 | fdedecdffddacddebbac->aeedbbaaddfaabcd
180 |
181 |
182 | HTTPS
183 | JSON
184 |
185 |
186 |
187 | fdedecdffddacddebbac->bbdeaebdefcdfcdeddcce
188 |
189 |
190 | HTTPS
191 | JSON
192 |
193 |
194 |
195 | fdedecdffddacddebbac->eaddecbacbcbcc
196 |
197 |
198 | HTTPS
199 | JSON
200 |
201 |
202 |
203 | fdedecdffddacddebbac->dabeeeacccddebefbfcaa
204 |
205 |
206 |
207 |
208 |
209 |
210 | dfcdfbbdbaaeabcecedfdde->cfafcafbfdeeffbfdffcfbf
211 |
212 |
213 | push
214 |
215 |
216 |
--------------------------------------------------------------------------------
/Flow Diagram/app-y-ness/app-y-ness.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/app-y-ness/app-y-ness.jpg
--------------------------------------------------------------------------------
/Flow Diagram/app-y-ness/app-y-ness.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | from pytm.pytm import TM, Server, Datastore, Dataflow, Boundary, Actor, Lambda
4 |
5 | tm = TM("my test tm")
6 | tm.description = "another test tm"
7 |
8 | Web = Boundary("Internal Web")
9 | external_web = Boundary("External Web")
10 |
11 | user = Actor("App-y-Tenant")
12 |
13 | app = Server("Mobile App")
14 |
15 | buy_api = Server("Buy API-y")
16 | buy_api.inBoundary = Web
17 |
18 | rent_api = Server("Rent API-y")
19 | rent_api.inBoundary = Web
20 |
21 | alert_api = Server("Alert API-y")
22 | alert_api.inBoundary = Web
23 |
24 | cloud = Server("Phone Provider Cloud")
25 | cloud.inBoundary = external_web
26 | alert_api_to_cloud = Dataflow(alert_api, cloud, "push")
27 | cloud_to_app = Dataflow(cloud, app, " ")
28 |
29 | db_b = Datastore("Oracle Table B")
30 | db_b.inBoundary = Web
31 | buy_api_to_db = Dataflow(buy_api, db_b, " ")
32 |
33 | db_r = Datastore("Oracle Table R")
34 | db_r.inBoundary = Web
35 | rent_api_to_db = Dataflow(rent_api, db_r, " ")
36 |
37 | db_t = Datastore("Oracle Table Tenants")
38 | db_t.inBoundary = Web
39 | rent_api_to_db_t = Dataflow(rent_api, db_t, " ")
40 | buy_api_to_db_t = Dataflow(buy_api, db_t, " ")
41 | alert_api_to_db_t = Dataflow(alert_api, db_t, " ")
42 |
43 | auth = Server("Auth API-y")
44 | auth.inBoundary = Web
45 | Dataflow(auth, db_t, 'auth')
46 | Dataflow(app, auth, 'https')
47 |
48 | user_to_app = Dataflow(user, app, "use")
49 | app_to_buy_api = Dataflow(app, buy_api, "https")
50 | app_to_rent_api = Dataflow(app, rent_api, "https")
51 | buy_api_to_cloud = Dataflow(buy_api, cloud, " ")
52 |
53 | gov = Server("Fire 'n' Stuff .gov")
54 | gov.inBoundary = external_web
55 | alert_api_to_gov = Dataflow(alert_api, gov, "https")
56 | Dataflow(gov, alert_api, "callback")
57 |
58 | operator = Actor("Operator Employee")
59 | Dataflow(operator, db_t, "admin")
60 |
61 | tm.process()
62 |
--------------------------------------------------------------------------------
/Flow Diagram/app-y-ness/app-y-ness.py.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/app-y-ness/app-y-ness.py.pdf
--------------------------------------------------------------------------------
/Flow Diagram/app-y-ness/app-y-ness.py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/app-y-ness/app-y-ness.py.png
--------------------------------------------------------------------------------
/Flow Diagram/app-y-ness/app-y-ness.py.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 | tm
11 |
12 |
13 | cluster_edcdfcbdfdceaedef
14 |
15 | Internal Web
16 |
17 |
18 | cluster_dcceffcefaafdbcebcbfc
19 |
20 | External Web
21 |
22 |
23 |
24 | befcfdefafeaaadfd
25 |
26 | Buy
27 | API-y
28 |
29 |
30 |
31 | dbdadadcabeafdeddbf
32 | Oracle Table B
33 |
34 |
35 |
36 |
37 |
38 | befcfdefafeaaadfd->dbdadadcabeafdeddbf
39 |
40 |
41 |
42 |
43 |
44 |
45 | abdeeeafebabefacdf
46 | Oracle Table Tenants
47 |
48 |
49 |
50 |
51 |
52 | befcfdefafeaaadfd->abdeeeafebabefacdf
53 |
54 |
55 |
56 |
57 |
58 |
59 | bdeaedabecfeeffced
60 |
61 | Phone Provider Cloud
62 |
63 |
64 |
65 | befcfdefafeaaadfd->bdeaedabecfeeffced
66 |
67 |
68 |
69 |
70 |
71 |
72 | cbacaafdbbdea
73 |
74 | Rent
75 | API-y
76 |
77 |
78 |
79 | edcacdffccbcdae
80 | Oracle Table R
81 |
82 |
83 |
84 |
85 |
86 | cbacaafdbbdea->edcacdffccbcdae
87 |
88 |
89 |
90 |
91 |
92 |
93 | cbacaafdbbdea->abdeeeafebabefacdf
94 |
95 |
96 |
97 |
98 |
99 |
100 | cbfdfcdafcbfdbd
101 |
102 | Alert
103 | API-y
104 |
105 |
106 |
107 | cbfdfcdafcbfdbd->abdeeeafebabefacdf
108 |
109 |
110 |
111 |
112 |
113 |
114 | cbfdfcdafcbfdbd->bdeaedabecfeeffced
115 |
116 |
117 | push
118 |
119 |
120 |
121 | ceebfeddceaeffcedebbbdfd
122 |
123 | Fire 'n' Stuff .gov
124 |
125 |
126 |
127 | cbfdfcdafcbfdbd->ceebfeddceaeffcedebbbdfd
128 |
129 |
130 | https
131 |
132 |
133 |
134 | fffcaaaaadddccccecebeeff
135 |
136 | Auth
137 | API-y
138 |
139 |
140 |
141 | fffcaaaaadddccccecebeeff->abdeeeafebabefacdf
142 |
143 |
144 | auth
145 |
146 |
147 |
148 | deaacefbafdecabbebcfddccdeaacaaff
149 |
150 | Mobile App
151 |
152 |
153 |
154 | bdeaedabecfeeffced->deaacefbafdecabbebcfddccdeaacaaff
155 |
156 |
157 |
158 |
159 |
160 |
161 | ceebfeddceaeffcedebbbdfd->cbfdfcdafcbfdbd
162 |
163 |
164 | callback
165 |
166 |
167 |
168 | beffadbafbaeeceacefdaac
169 |
170 | App-y-Tenant
171 |
172 |
173 |
174 | beffadbafbaeeceacefdaac->deaacefbafdecabbebcfddccdeaacaaff
175 |
176 |
177 | use
178 |
179 |
180 |
181 | deaacefbafdecabbebcfddccdeaacaaff->befcfdefafeaaadfd
182 |
183 |
184 | https
185 |
186 |
187 |
188 | deaacefbafdecabbebcfddccdeaacaaff->cbacaafdbbdea
189 |
190 |
191 | https
192 |
193 |
194 |
195 | deaacefbafdecabbebcfddccdeaacaaff->fffcaaaaadddccccecebeeff
196 |
197 |
198 | https
199 |
200 |
201 |
202 | cdaabdfabceaffff
203 |
204 | Operator
205 | Employee
206 |
207 |
208 |
209 | cdaabdfabceaffff->abdeeeafebabefacdf
210 |
211 |
212 | admin
213 |
214 |
215 |
216 |
--------------------------------------------------------------------------------
/Flow Diagram/cryptocurrency-wallet/cryptowallet.vsdx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/cryptocurrency-wallet/cryptowallet.vsdx
--------------------------------------------------------------------------------
/Flow Diagram/cryptocurrency-wallet/cryptowallet.vsdx.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/cryptocurrency-wallet/cryptowallet.vsdx.dwg
--------------------------------------------------------------------------------
/Flow Diagram/cryptocurrency-wallet/cryptowallet.vsdx.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/cryptocurrency-wallet/cryptowallet.vsdx.pdf
--------------------------------------------------------------------------------
/Flow Diagram/cryptocurrency-wallet/cryptowallet.vsdx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/cryptocurrency-wallet/cryptowallet.vsdx.png
--------------------------------------------------------------------------------
/Flow Diagram/generic-cms/generic-cms.py:
--------------------------------------------------------------------------------
1 | from pytm.pytm import TM, Boundary, Server, Actor, Datastore, Dataflow, SetOfProcesses
2 |
3 | tm = TM("Generic CMS example")
4 | tm.description = "This is a sample threat model for the Threat Model Cookbook."
5 |
6 | internet = Boundary("Internet")
7 |
8 | user = Actor("Generic/Privilege User")
9 |
10 | webserver = Server("Web Server")
11 | webserver.inBoundary = internet
12 |
13 | user_to_webserver = Dataflow(user, webserver, "HTTPS")
14 |
15 | db = Datastore("db")
16 | db.inBoundary = internet
17 | db_to_webserver = Dataflow(webserver, db, " ")
18 |
19 | adminuser = Actor(" admin ")
20 | admin_to_webserver = Dataflow(adminuser, db, "unsecure mysql connection")
21 |
22 | cdn = SetOfProcesses("CDN network")
23 | user_to_cdn = Dataflow(user, cdn, "HTTP")
24 | webserver_to_cdn = Dataflow(webserver, cdn, "Push to Bucket")
25 |
26 | tm.process()
27 |
--------------------------------------------------------------------------------
/Flow Diagram/generic-cms/generic-cms.py.dot:
--------------------------------------------------------------------------------
1 | digraph tm {
2 | graph [
3 | fontname = Arial;
4 | fontsize = 14;
5 | ]
6 | node [
7 | fontname = Arial;
8 | fontsize = 14;
9 | rankdir = lr;
10 | ]
11 | edge [
12 | shape = none;
13 | fontname = Arial;
14 | fontsize = 12;
15 | ]
16 | labelloc = "t";
17 | fontsize = 20;
18 | nodesep = 1;
19 |
20 | subgraph cluster_bfaefefcfbeeafeefac {
21 | graph [
22 | fontsize = 10;
23 | fontcolor = firebrick2;
24 | style = dashed;
25 | color = firebrick2;
26 | label = <Internet >;
27 | ]
28 |
29 | aaedcfceefeffbdc [
30 | shape = circle
31 | color = black
32 | label = <>;
33 | ]
34 | acbfeaddadeceddbbbbca [
35 | shape = none;
36 | color = black;
37 | label = <>;
38 | ]
39 |
40 | }
41 |
42 | abbfadcbfacaebcdefda [
43 | shape = square;
44 | label = <>;
45 | ]
46 | abbfadcbfacaebcdefda -> aaedcfceefeffbdc [
47 | color = black;
48 | label = <>;
49 | ]
50 | aaedcfceefeffbdc -> acbfeaddadeceddbbbbca [
51 | color = black;
52 | label = <>;
53 | ]
54 | cafbfbfeedbdeecbccebfdf [
55 | shape = square;
56 | label = <>;
57 | ]
58 | cafbfbfeedbdeecbccebfdf -> acbfeaddadeceddbbbbca [
59 | color = black;
60 | label = <>;
61 | ]
62 | bebdddeabdfbacdceded [
63 | shape = doublecircle;
64 | color = black;
65 |
66 | label = <>;
67 | ]
68 | abbfadcbfacaebcdefda -> bebdddeabdfbacdceded [
69 | color = black;
70 | label = <>;
71 | ]
72 | aaedcfceefeffbdc -> bebdddeabdfbacdceded [
73 | color = black;
74 | label = <>;
75 | ]
76 | }
77 |
--------------------------------------------------------------------------------
/Flow Diagram/generic-cms/generic-cms.py.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/generic-cms/generic-cms.py.pdf
--------------------------------------------------------------------------------
/Flow Diagram/generic-cms/generic-cms.py.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 | tm
11 |
12 | cluster_bfaefefcfbeeafeefac
13 |
14 | Internet
15 |
16 |
17 | aaedcfceefeffbdc
18 |
19 | Web Server
20 |
21 |
22 | acbfeaddadeceddbbbbca
23 | db
24 |
25 |
26 |
27 |
28 | aaedcfceefeffbdc->acbfeaddadeceddbbbbca
29 |
30 |
31 |
32 |
33 |
34 | bebdddeabdfbacdceded
35 |
36 |
37 | CDN network
38 |
39 |
40 | aaedcfceefeffbdc->bebdddeabdfbacdceded
41 |
42 |
43 | Push to Bucket
44 |
45 |
46 | abbfadcbfacaebcdefda
47 |
48 | Generic/Privilege User
49 |
50 |
51 | abbfadcbfacaebcdefda->aaedcfceefeffbdc
52 |
53 |
54 | HTTPS
55 |
56 |
57 | abbfadcbfacaebcdefda->bebdddeabdfbacdceded
58 |
59 |
60 | HTTP
61 |
62 |
63 | cafbfbfeedbdeecbccebfdf
64 |
65 | admin
66 |
67 |
68 | cafbfbfeedbdeecbccebfdf->acbfeaddadeceddbbbbca
69 |
70 |
71 | unsecure
72 | mysql
73 | connection
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/Flow Diagram/iot-device/iot-device.vsdx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/iot-device/iot-device.vsdx
--------------------------------------------------------------------------------
/Flow Diagram/iot-device/iot-device.vsdx.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/iot-device/iot-device.vsdx.dwg
--------------------------------------------------------------------------------
/Flow Diagram/iot-device/iot-device.vsdx.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/iot-device/iot-device.vsdx.pdf
--------------------------------------------------------------------------------
/Flow Diagram/iot-device/iot-device.vsdx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/iot-device/iot-device.vsdx.png
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt0-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt0-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt1-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt1-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt10-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt10-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt11-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt11-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt2-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt2-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt3-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt3-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt4-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt4-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt5-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt5-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt6-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt6-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt7-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt7-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt8-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt8-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/alt9-jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/alt9-jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/jetscout/jetscout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/jetscout/jetscout.jpg
--------------------------------------------------------------------------------
/Flow Diagram/online-battleroyale-game/onlinegame.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/online-battleroyale-game/onlinegame.jpg
--------------------------------------------------------------------------------
/Flow Diagram/online-battleroyale-game/onlinegame.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | from pytm import *
4 |
5 | tm = TM("Battle Royale Game Flow Diagram")
6 | tm.description = "This is a threat model made in the Threat Modeling Workshop."
7 |
8 | playerlocal = Boundary("player's local machine")
9 | corp = Boundary("corp network")
10 | prod = Boundary("prod network")
11 |
12 | player = Actor("Player")
13 | anon = Actor("Anonymous WWW User-Agent")
14 |
15 | cs = Actor("Customer Support")
16 | cs.inBoundary = corp
17 |
18 | gameclient = Server("Game Client")
19 | browser = Server("Browser")
20 |
21 | for process in [browser, gameclient, anon, player]:
22 | process.inBoundary = playerlocal
23 |
24 | wwwstats = Server("Website Stats")
25 | lobby = Server("Lobby")
26 | gameservers = SetOfProcesses("Game Servers")
27 | wwwmod = Server("Moderation Website")
28 | apirest = Server("API REST")
29 |
30 |
31 | playerdb = Datastore("Player Database")
32 | statsdb = Datastore("Stats Database")
33 |
34 |
35 | for process in [wwwstats, lobby, gameservers, wwwmod, apirest, playerdb, statsdb]:
36 | process.inBoundary = prod
37 |
38 |
39 | player_to_gameclient = Dataflow(player, gameclient, "Uses/Launch")
40 | player_to_browser = Dataflow(player, browser, "Uses/Launch")
41 | anon_to_wwwstats = Dataflow(anon, wwwstats, " ")
42 | browser_to_wwwstats = Dataflow(browser, wwwstats, "HTTPS")
43 | wwwstats_to_apirest = Dataflow(wwwstats, apirest, " ")
44 | wwwstats_to_playerdb = Dataflow(wwwstats, playerdb, " ")
45 |
46 | gameclient_to_lobby = Dataflow(gameclient, lobby, "TCP 1234")
47 | gameclient_to_gameservers = Dataflow(gameclient, gameservers, "TCP 1235")
48 |
49 | lobby_to_gameservers = Dataflow(lobby, gameservers, " ")
50 | lobby_to_playerdb = Dataflow(lobby, playerdb, " ")
51 | lobby_to_apirest = Dataflow(lobby, apirest, " ")
52 |
53 | wwwmod_to_playerdb = Dataflow(wwwmod, playerdb, " ")
54 | cs_to_wwwmod = Dataflow(cs, wwwmod, " ")
55 |
56 | gameservers_to_statsdb = Dataflow(gameservers, statsdb, "r/w")
57 | gameservers_to_playerdb = Dataflow(gameservers, playerdb, " ")
58 |
59 | apirest_to_statsdb = Dataflow(apirest, statsdb, "r/o")
60 | apirest_to_playerdb = Dataflow(apirest, playerdb, " ")
61 |
62 |
63 | tm.process()
64 |
--------------------------------------------------------------------------------
/Flow Diagram/online-battleroyale-game/onlinegame.py.dot:
--------------------------------------------------------------------------------
1 | digraph tm {
2 | graph [
3 | fontname = Arial;
4 | fontsize = 14;
5 | ]
6 | node [
7 | fontname = Arial;
8 | fontsize = 14;
9 | rankdir = lr;
10 | ]
11 | edge [
12 | shape = none;
13 | fontname = Arial;
14 | fontsize = 12;
15 | ]
16 | labelloc = "t";
17 | fontsize = 20;
18 | nodesep = 1;
19 |
20 | subgraph cluster_fbeabbaffbddabbabcfedb {
21 | graph [
22 | fontsize = 10;
23 | fontcolor = firebrick2;
24 | style = dashed;
25 | color = firebrick2;
26 | label = <player's local machine >;
27 | ]
28 |
29 | fbcaeddddeefdddddaa [
30 | shape = square;
31 | label = <>;
32 | ]
33 | bbdaeeabfbcadceebcadaebc [
34 | shape = square;
35 | label = <>;
36 | ]
37 | eeacbebacadfdaeabacaddc [
38 | shape = circle
39 | color = black
40 | label = <>;
41 | ]
42 | bdddedacabacdfeddffdaadd [
43 | shape = circle
44 | color = black
45 | label = <>;
46 | ]
47 |
48 | }
49 |
50 | subgraph cluster_fbacafbcbcedbcdfdbaffce {
51 | graph [
52 | fontsize = 10;
53 | fontcolor = firebrick2;
54 | style = dashed;
55 | color = firebrick2;
56 | label = <corp network >;
57 | ]
58 |
59 | eabceadefdfcedfdedbf [
60 | shape = square;
61 | label = <>;
62 | ]
63 |
64 | }
65 |
66 | subgraph cluster_ebadbbacbbbedfbcbfaabfe {
67 | graph [
68 | fontsize = 10;
69 | fontcolor = firebrick2;
70 | style = dashed;
71 | color = firebrick2;
72 | label = <prod network >;
73 | ]
74 |
75 | aaadadabaedafcbfbfcaf [
76 | shape = circle
77 | color = black
78 | label = <>;
79 | ]
80 | abadddfbbebffeabdaecdddcdefedb [
81 | shape = circle
82 | color = black
83 | label = <>;
84 | ]
85 | caecbddedafabcdeefbbfacddfefd [
86 | shape = doublecircle;
87 | color = black;
88 |
89 | label = <>;
90 | ]
91 | fdedbaafbdebedfaaceeadebccb [
92 | shape = circle
93 | color = black
94 | label = <>;
95 | ]
96 | cafbafcaeebacedecccaccfa [
97 | shape = circle
98 | color = black
99 | label = <>;
100 | ]
101 | eaafdccecbcfaabcc [
102 | shape = none;
103 | color = black;
104 | label = <>;
105 | ]
106 | aefaafefabdabbbfefa [
107 | shape = none;
108 | color = black;
109 | label = <>;
110 | ]
111 |
112 | }
113 |
114 | fbcaeddddeefdddddaa -> eeacbebacadfdaeabacaddc [
115 | color = black;
116 | label = <>;
117 | ]
118 | fbcaeddddeefdddddaa -> bdddedacabacdfeddffdaadd [
119 | color = black;
120 | label = <>;
121 | ]
122 | bbdaeeabfbcadceebcadaebc -> aaadadabaedafcbfbfcaf [
123 | color = black;
124 | label = <>;
125 | ]
126 | bdddedacabacdfeddffdaadd -> aaadadabaedafcbfbfcaf [
127 | color = black;
128 | label = <>;
129 | ]
130 | aaadadabaedafcbfbfcaf -> cafbafcaeebacedecccaccfa [
131 | color = black;
132 | label = <>;
133 | ]
134 | aaadadabaedafcbfbfcaf -> eaafdccecbcfaabcc [
135 | color = black;
136 | label = <>;
137 | ]
138 | eeacbebacadfdaeabacaddc -> abadddfbbebffeabdaecdddcdefedb [
139 | color = black;
140 | label = <>;
141 | ]
142 | eeacbebacadfdaeabacaddc -> caecbddedafabcdeefbbfacddfefd [
143 | color = black;
144 | label = <>;
145 | ]
146 | abadddfbbebffeabdaecdddcdefedb -> caecbddedafabcdeefbbfacddfefd [
147 | color = black;
148 | label = <>;
149 | ]
150 | abadddfbbebffeabdaecdddcdefedb -> eaafdccecbcfaabcc [
151 | color = black;
152 | label = <>;
153 | ]
154 | abadddfbbebffeabdaecdddcdefedb -> cafbafcaeebacedecccaccfa [
155 | color = black;
156 | label = <>;
157 | ]
158 | fdedbaafbdebedfaaceeadebccb -> eaafdccecbcfaabcc [
159 | color = black;
160 | label = <>;
161 | ]
162 | eabceadefdfcedfdedbf -> fdedbaafbdebedfaaceeadebccb [
163 | color = black;
164 | label = <>;
165 | ]
166 | caecbddedafabcdeefbbfacddfefd -> aefaafefabdabbbfefa [
167 | color = black;
168 | label = <>;
169 | ]
170 | caecbddedafabcdeefbbfacddfefd -> eaafdccecbcfaabcc [
171 | color = black;
172 | label = <>;
173 | ]
174 | cafbafcaeebacedecccaccfa -> aefaafefabdabbbfefa [
175 | color = black;
176 | label = <>;
177 | ]
178 | cafbafcaeebacedecccaccfa -> eaafdccecbcfaabcc [
179 | color = black;
180 | label = <>;
181 | ]
182 | }
183 |
--------------------------------------------------------------------------------
/Flow Diagram/online-battleroyale-game/onlinegame.py.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/online-battleroyale-game/onlinegame.py.pdf
--------------------------------------------------------------------------------
/Flow Diagram/online-battleroyale-game/onlinegame.py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/online-battleroyale-game/onlinegame.py.png
--------------------------------------------------------------------------------
/Flow Diagram/online-battleroyale-game/onlinegame.py.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 | tm
11 |
12 | cluster_fbeabbaffbddabbabcfedb
13 |
14 | player's local machine
15 |
16 | cluster_ebadbbacbbbedfbcbfaabfe
17 |
18 | prod network
19 |
20 | cluster_fbacafbcbcedbcdfdbaffce
21 |
22 | corp network
23 |
24 |
25 | fbcaeddddeefdddddaa
26 |
27 | Player
28 |
29 |
30 | eeacbebacadfdaeabacaddc
31 |
32 | Game
33 | Client
34 |
35 |
36 | fbcaeddddeefdddddaa->eeacbebacadfdaeabacaddc
37 |
38 |
39 | Uses/Launch
40 |
41 |
42 | bdddedacabacdfeddffdaadd
43 |
44 | Browser
45 |
46 |
47 | fbcaeddddeefdddddaa->bdddedacabacdfeddffdaadd
48 |
49 |
50 | Uses/Launch
51 |
52 |
53 | bbdaeeabfbcadceebcadaebc
54 |
55 | Anonymous
56 | WWW User-Agent
57 |
58 |
59 | aaadadabaedafcbfbfcaf
60 |
61 | Website
62 | Stats
63 |
64 |
65 | bbdaeeabfbcadceebcadaebc->aaadadabaedafcbfbfcaf
66 |
67 |
68 |
69 |
70 |
71 | abadddfbbebffeabdaecdddcdefedb
72 |
73 | Lobby
74 |
75 |
76 | eeacbebacadfdaeabacaddc->abadddfbbebffeabdaecdddcdefedb
77 |
78 |
79 | TCP 1234
80 |
81 |
82 | caecbddedafabcdeefbbfacddfefd
83 |
84 |
85 | Game
86 | Servers
87 |
88 |
89 | eeacbebacadfdaeabacaddc->caecbddedafabcdeefbbfacddfefd
90 |
91 |
92 | TCP 1235
93 |
94 |
95 | bdddedacabacdfeddffdaadd->aaadadabaedafcbfbfcaf
96 |
97 |
98 | HTTPS
99 |
100 |
101 | eabceadefdfcedfdedbf
102 |
103 | Customer Support
104 |
105 |
106 | fdedbaafbdebedfaaceeadebccb
107 |
108 | Moderation
109 | Website
110 |
111 |
112 | eabceadefdfcedfdedbf->fdedbaafbdebedfaaceeadebccb
113 |
114 |
115 |
116 |
117 |
118 | cafbafcaeebacedecccaccfa
119 |
120 | API REST
121 |
122 |
123 | aaadadabaedafcbfbfcaf->cafbafcaeebacedecccaccfa
124 |
125 |
126 |
127 |
128 |
129 | eaafdccecbcfaabcc
130 | Player Database
131 |
132 |
133 |
134 |
135 | aaadadabaedafcbfbfcaf->eaafdccecbcfaabcc
136 |
137 |
138 |
139 |
140 |
141 | abadddfbbebffeabdaecdddcdefedb->caecbddedafabcdeefbbfacddfefd
142 |
143 |
144 |
145 |
146 |
147 | abadddfbbebffeabdaecdddcdefedb->cafbafcaeebacedecccaccfa
148 |
149 |
150 |
151 |
152 |
153 | abadddfbbebffeabdaecdddcdefedb->eaafdccecbcfaabcc
154 |
155 |
156 |
157 |
158 |
159 | caecbddedafabcdeefbbfacddfefd->eaafdccecbcfaabcc
160 |
161 |
162 |
163 |
164 |
165 | aefaafefabdabbbfefa
166 | Stats Database
167 |
168 |
169 |
170 |
171 | caecbddedafabcdeefbbfacddfefd->aefaafefabdabbbfefa
172 |
173 |
174 | r/w
175 |
176 |
177 | fdedbaafbdebedfaaceeadebccb->eaafdccecbcfaabcc
178 |
179 |
180 |
181 |
182 |
183 | cafbafcaeebacedecccaccfa->eaafdccecbcfaabcc
184 |
185 |
186 |
187 |
188 |
189 | cafbafcaeebacedecccaccfa->aefaafefabdabbbfefa
190 |
191 |
192 | r/o
193 |
194 |
195 |
196 |
--------------------------------------------------------------------------------
/Flow Diagram/payment/payment-online.py:
--------------------------------------------------------------------------------
1 | # https://github.com/izar/pytm
2 | from pytm import (
3 | TM, Server, Dataflow, Boundary, Actor, ExternalEntity, Process
4 | )
5 |
6 | payment_online = TM("stripe")
7 | payment_online.description = "stripe payment"
8 | payment_online.isOrdered = True
9 | payment_online.mergeResponses = True
10 |
11 | Customer_Client_Web = Boundary("Customer/Internet")
12 | Merchant_Web = Boundary("Merchant/Web")
13 | Stripe_API = Boundary("Stripe/Web")
14 |
15 | customer = Actor("Customer")
16 |
17 | customer_client = ExternalEntity("Customer Client")
18 | customer_client.inBoundary = Customer_Client_Web
19 | # user.levels = [2]
20 |
21 | merchant_web = Server("Merchant Web Server")
22 | merchant_web.inBoundary = Merchant_Web
23 | merchant_web.OS = "Ubuntu"
24 | merchant_web.isHardened = True
25 | merchant_web.onAWS = True
26 | # web.levels = [2]
27 |
28 | stripe_api = ExternalEntity("Stripe API service")
29 | stripe_api.inBoundary = Stripe_API
30 | stripe_api.onAWS = False
31 |
32 | stripe_process = Process("Stripe Payment Service")
33 | stripe_process.inBoundary = Stripe_API
34 |
35 | customer_to_customer_client = Dataflow(customer, customer_client, "Customer logs into the merchant site (*)")
36 | customer_to_customer_client.protocol = "HTTPS"
37 | customer_to_customer_client.dstPort = 443
38 | customer_to_customer_client.data = 'OAuth'
39 |
40 | customer_to_customer_client = Dataflow(customer, customer_client, "Customer proceeds to payment page to make a purchase (*)")
41 | customer_to_customer_client.protocol = "HTTPS"
42 | customer_to_customer_client.dstPort = 443
43 |
44 | customer_client_to_merchant_web = Dataflow(customer_client, merchant_web, "Customer Client sends order intent, including order amount (*)")
45 | customer_client_to_merchant_web.protocol = "HTTPS"
46 | customer_client_to_merchant_web.dstPort = 443
47 |
48 | merchant_web_to_stripe_api = Dataflow(merchant_web, stripe_api, "Merchant sends order information inc amount and currency (*)")
49 | merchant_web_to_stripe_api.data = 'POST /v1/payment_intents'
50 |
51 | stripe_api_to_merchant_web = Dataflow(stripe_api, merchant_web, "Return PaymentIntent to the Merchant (*)")
52 | stripe_api_to_merchant_web.data = 'Response'
53 | stripe_api_to_merchant_web.responseTo = merchant_web_to_stripe_api
54 |
55 | merchant_web_to_customer_client = Dataflow( merchant_web, customer_client, "Return PaymentIntent to the Customer Client (*)")
56 | merchant_web_to_customer_client.data = 'merchant_secret'
57 | merchant_web_to_customer_client.responseTo = customer_client_to_merchant_web
58 |
59 | customer_to_customer_client = Dataflow(customer, customer_client, "Customer provides card details and finalizes payment (*)")
60 |
61 | customer_client_to_stripe_api = Dataflow(customer_client, stripe_api, "Customer Client sends stripe.confirmCardPayment() (*)")
62 | customer_client_to_stripe_api.data = "client_secret and card details"
63 |
64 | stripe_api_to_stripe_process = Dataflow(stripe_api, stripe_process, "Attempt payment")
65 | stripe_process_to_stripe_api = Dataflow(stripe_process, stripe_api, "Payment Response")
66 |
67 | stripe_api_to_customer_client = Dataflow(stripe_api, customer_client, "Return the PaymentIntent with status (*)")
68 | stripe_api_to_customer_client.data = "Return the PaymentIntent with status 'succeeded'"
69 |
70 | payment_online.process()
71 |
--------------------------------------------------------------------------------
/Flow Diagram/payment/payment-online.py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/payment/payment-online.py.png
--------------------------------------------------------------------------------
/Flow Diagram/renting-car-startup/alt1-rentingcar.py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/renting-car-startup/alt1-rentingcar.py.png
--------------------------------------------------------------------------------
/Flow Diagram/renting-car-startup/alt2-rentingcar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/renting-car-startup/alt2-rentingcar.jpg
--------------------------------------------------------------------------------
/Flow Diagram/renting-car-startup/rentingcar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/renting-car-startup/rentingcar.jpg
--------------------------------------------------------------------------------
/Flow Diagram/renting-car-startup/rentingcar.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | from pytm import *
4 |
5 | tm = TM("Renting Car Startup Flow Diagram")
6 | tm.description = "This is a threat model made in the Threat Modeling Workshop."
7 |
8 | owner = Actor("Owner Phone")
9 | customer = Actor("Customer Phone")
10 |
11 | ownz = Server("Ownz Mobile")
12 | cadz = Server("Cadz Mobile")
13 |
14 | apigw = Server("API Gateway")
15 | auth = Server("Auth")
16 | conncar = SetOfProcesses("Connected Car")
17 | abc = Server("ABC")
18 |
19 | api = Server("API")
20 | apiar = Server("API AR")
21 | apiai = Server("API AI")
22 | apiamfm = Server("API AM/FM")
23 |
24 | unsure = Process("?")
25 | # todo change this for a cloud?
26 | watson = ExternalEntity("Watson")
27 |
28 | flatfile = Datastore("Flatfile radio stations")
29 | carsdb = Datastore("Cars DB")
30 |
31 | insidecar = Boundary("Inside the car")
32 | dmz = Boundary("DMZ")
33 | prod = Boundary(" ")
34 |
35 | for process in [conncar, cadz, abc, customer]:
36 | process.inBoundary = insidecar
37 |
38 | apiai.inBoundary = dmz
39 |
40 | for process in [apigw, api, apiar, apiamfm, auth, flatfile, carsdb, unsure]:
41 | process.inBoundary = prod
42 |
43 | owner2ownz = Dataflow(owner, ownz, "Launch")
44 | customer2cadz = Dataflow(customer, cadz, "Launch")
45 | ownz2apigw = Dataflow(ownz, apigw, "HTTPS")
46 | cadz2apigw = Dataflow(cadz, apigw, "HTTPS")
47 |
48 | apigw2apiai = Dataflow(apigw, apiai, "HTTP")
49 | apigw2apiamfm = Dataflow(apigw, apiamfm, "SSH")
50 | apigw2apiar = Dataflow(apigw, apiar, "HTTP/2")
51 | apigw2api = Dataflow(apigw, api, "HTTP")
52 |
53 | api2carsdb = Dataflow(api, carsdb, " ")
54 | apiaamfm2flatfile = Dataflow(apiamfm, flatfile, " ")
55 | apiai2watson = Dataflow(apiai, watson, " ")
56 | apigw2auth = Dataflow(apigw, auth, "Kerberos")
57 |
58 | apiar2unsure = Dataflow(apiar, unsure, " ")
59 |
60 | conncar2abc = Dataflow(conncar, abc, " ")
61 | abc2carsdb = Dataflow(abc, carsdb, " ")
62 | conncar2cadz = Dataflow(conncar, cadz, "Bluetooth")
63 |
64 |
65 | tm.process()
66 |
--------------------------------------------------------------------------------
/Flow Diagram/renting-car-startup/rentingcar.py.dot:
--------------------------------------------------------------------------------
1 | digraph tm {
2 | graph [
3 | fontname = Arial;
4 | fontsize = 14;
5 | ]
6 | node [
7 | fontname = Arial;
8 | fontsize = 14;
9 | rankdir = lr;
10 | ]
11 | edge [
12 | shape = none;
13 | fontname = Arial;
14 | fontsize = 12;
15 | ]
16 | labelloc = "t";
17 | fontsize = 20;
18 | nodesep = 1;
19 |
20 | subgraph cluster_ebfdeebacddeedccfbbfdceebeddac {
21 | graph [
22 | fontsize = 10;
23 | fontcolor = firebrick2;
24 | style = dashed;
25 | color = firebrick2;
26 | label = <Inside the car >;
27 | ]
28 |
29 | aaafaecedffadddebbefcdbbbd [
30 | shape = square;
31 | label = <>;
32 | ]
33 | cbbaebebaaaddcbbfdfcefdedaacd [
34 | shape = circle
35 | color = black
36 | label = <>;
37 | ]
38 | dcbcdbadccdabbbcfadee [
39 | shape = doublecircle;
40 | color = black;
41 |
42 | label = <>;
43 | ]
44 | cbcfcfeebbebeafaaafad [
45 | shape = circle
46 | color = black
47 | label = <>;
48 | ]
49 |
50 | }
51 |
52 | subgraph cluster_deffadbbecbaffaffcdd {
53 | graph [
54 | fontsize = 10;
55 | fontcolor = firebrick2;
56 | style = dashed;
57 | color = firebrick2;
58 | label = <DMZ >;
59 | ]
60 |
61 | caeacffecebffaadaed [
62 | shape = circle
63 | color = black
64 | label = <>;
65 | ]
66 |
67 | }
68 |
69 | subgraph cluster_cacebafcaebeabfbbacecaba {
70 | graph [
71 | fontsize = 10;
72 | fontcolor = firebrick2;
73 | style = dashed;
74 | color = firebrick2;
75 | label = < >;
76 | ]
77 |
78 | edeefeaeddcfbaeaafbed [
79 | shape = circle
80 | color = black
81 | label = <>;
82 | ]
83 | defcdafddccbccba [
84 | shape = circle
85 | color = black
86 | label = <>;
87 | ]
88 | feddafabacdadcfdfee [
89 | shape = circle
90 | color = black
91 | label = <>;
92 | ]
93 | cebcbadfdcacbfccebb [
94 | shape = circle
95 | color = black
96 | label = <>;
97 | ]
98 | aaedddcebefbebabd [
99 | shape = circle
100 | color = black
101 | label = <>;
102 | ]
103 | adadefacfbffbbffbffa [
104 | shape = circle;
105 | color = black;
106 |
107 | label = <>;
108 | ]
109 | dddabcdbcaeffdbaafc [
110 | shape = none;
111 | color = black;
112 | label = <>;
113 | ]
114 | dcdcdbdeedebdddaeebbbcc [
115 | shape = none;
116 | color = black;
117 | label = <>;
118 | ]
119 |
120 | }
121 |
122 | abfadfcbbcaaafabcfbdfefeda [
123 | shape = square;
124 | label = <>;
125 | ]
126 | cbaffdfcaeeefbada [
127 | shape = circle
128 | color = black
129 | label = <>;
130 | ]
131 | bceeebfabdfbccabedaccde [
132 | shape = square;
133 | label = <>;
134 | ]
135 | abfadfcbbcaaafabcfbdfefeda -> cbaffdfcaeeefbada [
136 | color = black;
137 | label = <>;
138 | ]
139 | aaafaecedffadddebbefcdbbbd -> cbbaebebaaaddcbbfdfcefdedaacd [
140 | color = black;
141 | label = <>;
142 | ]
143 | cbaffdfcaeeefbada -> edeefeaeddcfbaeaafbed [
144 | color = black;
145 | label = <>;
146 | ]
147 | cbbaebebaaaddcbbfdfcefdedaacd -> edeefeaeddcfbaeaafbed [
148 | color = black;
149 | label = <>;
150 | ]
151 | edeefeaeddcfbaeaafbed -> caeacffecebffaadaed [
152 | color = black;
153 | label = <>;
154 | ]
155 | edeefeaeddcfbaeaafbed -> aaedddcebefbebabd [
156 | color = black;
157 | label = <>;
158 | ]
159 | edeefeaeddcfbaeaafbed -> cebcbadfdcacbfccebb [
160 | color = black;
161 | label = <>;
162 | ]
163 | edeefeaeddcfbaeaafbed -> feddafabacdadcfdfee [
164 | color = black;
165 | label = <>;
166 | ]
167 | feddafabacdadcfdfee -> dcdcdbdeedebdddaeebbbcc [
168 | color = black;
169 | label = <>;
170 | ]
171 | aaedddcebefbebabd -> dddabcdbcaeffdbaafc [
172 | color = black;
173 | label = <>;
174 | ]
175 | caeacffecebffaadaed -> bceeebfabdfbccabedaccde [
176 | color = black;
177 | label = <>;
178 | ]
179 | edeefeaeddcfbaeaafbed -> defcdafddccbccba [
180 | color = black;
181 | label = <>;
182 | ]
183 | cebcbadfdcacbfccebb -> adadefacfbffbbffbffa [
184 | color = black;
185 | label = <>;
186 | ]
187 | dcbcdbadccdabbbcfadee -> cbcfcfeebbebeafaaafad [
188 | color = black;
189 | label = <>;
190 | ]
191 | cbcfcfeebbebeafaaafad -> dcdcdbdeedebdddaeebbbcc [
192 | color = black;
193 | label = <>;
194 | ]
195 | dcbcdbadccdabbbcfadee -> cbbaebebaaaddcbbfdfcefdedaacd [
196 | color = black;
197 | label = <>;
198 | ]
199 | }
200 |
--------------------------------------------------------------------------------
/Flow Diagram/renting-car-startup/rentingcar.py.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/renting-car-startup/rentingcar.py.pdf
--------------------------------------------------------------------------------
/Flow Diagram/renting-car-startup/rentingcar.py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/renting-car-startup/rentingcar.py.png
--------------------------------------------------------------------------------
/Flow Diagram/renting-car-startup/rentingcar.py.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 | tm
11 |
12 | cluster_ebfdeebacddeedccfbbfdceebeddac
13 |
14 | Inside the car
15 |
16 | cluster_deffadbbecbaffaffcdd
17 |
18 | DMZ
19 |
20 | cluster_cacebafcaebeabfbbacecaba
21 |
22 |
23 |
24 |
25 | aaafaecedffadddebbefcdbbbd
26 |
27 | Customer Phone
28 |
29 |
30 | cbbaebebaaaddcbbfdfcefdedaacd
31 |
32 | Cadz Mobile
33 |
34 |
35 | aaafaecedffadddebbefcdbbbd->cbbaebebaaaddcbbfdfcefdedaacd
36 |
37 |
38 | Launch
39 |
40 |
41 | edeefeaeddcfbaeaafbed
42 |
43 | API Gateway
44 |
45 |
46 | cbbaebebaaaddcbbfdfcefdedaacd->edeefeaeddcfbaeaafbed
47 |
48 |
49 | HTTPS
50 |
51 |
52 | dcbcdbadccdabbbcfadee
53 |
54 |
55 | Connected Car
56 |
57 |
58 | dcbcdbadccdabbbcfadee->cbbaebebaaaddcbbfdfcefdedaacd
59 |
60 |
61 | Bluetooth
62 |
63 |
64 | cbcfcfeebbebeafaaafad
65 |
66 | ABC
67 |
68 |
69 | dcbcdbadccdabbbcfadee->cbcfcfeebbebeafaaafad
70 |
71 |
72 |
73 |
74 |
75 | dcdcdbdeedebdddaeebbbcc
76 | Cars DB
77 |
78 |
79 |
80 |
81 | cbcfcfeebbebeafaaafad->dcdcdbdeedebdddaeebbbcc
82 |
83 |
84 |
85 |
86 |
87 | caeacffecebffaadaed
88 |
89 | API AI
90 |
91 |
92 | bceeebfabdfbccabedaccde
93 |
94 | Watson
95 |
96 |
97 | caeacffecebffaadaed->bceeebfabdfbccabedaccde
98 |
99 |
100 |
101 |
102 |
103 | edeefeaeddcfbaeaafbed->caeacffecebffaadaed
104 |
105 |
106 | HTTP
107 |
108 |
109 | defcdafddccbccba
110 |
111 | Auth
112 |
113 |
114 | edeefeaeddcfbaeaafbed->defcdafddccbccba
115 |
116 |
117 | Kerberos
118 |
119 |
120 | feddafabacdadcfdfee
121 |
122 | API
123 |
124 |
125 | edeefeaeddcfbaeaafbed->feddafabacdadcfdfee
126 |
127 |
128 | HTTP
129 |
130 |
131 | cebcbadfdcacbfccebb
132 |
133 | API AR
134 |
135 |
136 | edeefeaeddcfbaeaafbed->cebcbadfdcacbfccebb
137 |
138 |
139 | HTTP/2
140 |
141 |
142 | aaedddcebefbebabd
143 |
144 | API AM/FM
145 |
146 |
147 | edeefeaeddcfbaeaafbed->aaedddcebefbebabd
148 |
149 |
150 | SSH
151 |
152 |
153 | feddafabacdadcfdfee->dcdcdbdeedebdddaeebbbcc
154 |
155 |
156 |
157 |
158 |
159 | adadefacfbffbbffbffa
160 |
161 | ?
162 |
163 |
164 | cebcbadfdcacbfccebb->adadefacfbffbbffbffa
165 |
166 |
167 |
168 |
169 |
170 | dddabcdbcaeffdbaafc
171 | Flatfile radio stations
172 |
173 |
174 |
175 |
176 | aaedddcebefbebabd->dddabcdbcaeffdbaafc
177 |
178 |
179 |
180 |
181 |
182 | abfadfcbbcaaafabcfbdfefeda
183 |
184 | Owner Phone
185 |
186 |
187 | cbaffdfcaeeefbada
188 |
189 | Ownz Mobile
190 |
191 |
192 | abfadfcbbcaaafabcfbdfefeda->cbaffdfcaeeefbada
193 |
194 |
195 | Launch
196 |
197 |
198 | cbaffdfcaeeefbada->edeefeaeddcfbaeaafbed
199 |
200 |
201 | HTTPS
202 |
203 |
204 |
205 |
--------------------------------------------------------------------------------
/Flow Diagram/scouter/scouter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/scouter/scouter.jpg
--------------------------------------------------------------------------------
/Flow Diagram/sokify/alt1-sokify.json.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/sokify/alt1-sokify.json.pdf
--------------------------------------------------------------------------------
/Flow Diagram/sokify/alt1-sokify.json.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/sokify/alt1-sokify.json.png
--------------------------------------------------------------------------------
/Flow Diagram/sokify/sokify.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/sokify/sokify.jpg
--------------------------------------------------------------------------------
/Flow Diagram/webapp-threat-dragon/webapp-threat-dragon.json.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/webapp-threat-dragon/webapp-threat-dragon.json.pdf
--------------------------------------------------------------------------------
/Flow Diagram/webapp-threat-dragon/webapp-threat-dragon.json.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Flow Diagram/webapp-threat-dragon/webapp-threat-dragon.json.png
--------------------------------------------------------------------------------
/INDEX.md:
--------------------------------------------------------------------------------
1 | # OWASP Threat Model Cookbook Index
2 |
3 | Global view of example systems, with their overall description, that are represented in this project.
4 |
5 |
6 | ## BLANK
7 | A generic model with generic name that doesn't represent a particular system. Useful to introduce a methodology without leading people into a particular architecture.
8 |
9 | [](./Flow%20Diagram/BLANK)
10 |
11 | [](./Attack%20Tree/BLANK.plantuml)
12 |
13 | [](./Template/BLANK)
14 |
15 |
16 |
17 | ## app-y-ness
18 | A mobile application to manage tenants of an apartment complex and sells various products that the landlord brews and grows. Tenants can use the mobile app to pay rent, buy products and receive fire n' surf alerts.
19 |
20 | [](./Flow%20Diagram/app-y-ness)
21 |
22 |
23 | ## cryptocurrency-wallet
24 | A desktop application based on Electron that handle cryptocurrency operations with the Blockchain. The model also includes related components such as a Cryptocurrency Exchange web site and a trading bot in python.
25 |
26 | [](./Flow%20Diagram/cryptocurrency-wallet)
27 |
28 | [](./Attack%20Tree/cryptowallet.plantuml)
29 |
30 |
31 | ## generic-cms
32 | A simple web content management system with generic name components. Has a web server, a database and a CDN.
33 |
34 | [](./Flow%20Diagram/generic-cms)
35 |
36 | [](./Attack%20Tree/generic-cms.plantuml)
37 |
38 |
39 | ## iot-device
40 | An internet of things device such as a lightbulb that is controlled with a mobile app, a python script or a cloud API. A website provides the cloud integration user interface and the IoT device exposes a local network API.
41 |
42 | [](./Flow%20Diagram/iot-device)
43 |
44 | [](./Attack%20Tree/iot-device)
45 |
46 | [](./Attack%20Tree/iot-device)
47 |
48 |
49 | ## jetscout
50 | A rental scooter equipped with a jet engine and tracking system that relies on IoT smart components. It receives voice commands and has a seat with a smart scale on it to know when the rider is sitting or has felt. It tracks health data from smart sensors and store it into the cloud for insurance purpose (totally not for reselling it). It has also a remote API that can control its jet engine.
51 |
52 | [](./Flow%20Diagram/jetscout)
53 |
54 | [](./Flow%20Diagram/jetscout)
55 |
56 | [](./Attack%20Tree/jetscout)
57 |
58 |
59 | ## online-battleroyale-game
60 | A multiplayer video game client and server that has a lobby for matchmaking and provide statistics about the matches and players. Player accounts are stored in a central database and Customer Support staff can access it for moderation purposes.
61 |
62 | [](./Flow%20Diagram/online-battleroyale-game)
63 |
64 | [](./Attack%20Tree/online-battleroyale-game)
65 |
66 |
67 | ## physicalsafe
68 | A textbook example of a physical safe that a bad actor wants to open.
69 |
70 | [](./Attack%20Tree/physicalsafe.plantuml)
71 |
72 |
73 | ## renting-car-startup
74 | A startup ecosystem based on mobile applications and APIs that manage peer to peer car rentals. A customer can use a mobile app to unlock and start the car. The owner of the car has its own mobile app to manage rentals. It has AI linked to its APIs and supports augmented reality features. The APIs also allows to change radio stations which are stored in the cloud on a flat file for legacy reasons.
75 |
76 | [](./Flow%20Diagram/renting-car-startup)
77 |
78 | [](./Attack%20Tree/rentingcar.plantuml)
79 |
80 |
81 | ## scouter
82 | A shared scooter company (competitor of jetscout) that uses a vending machine to distribute tickets for renting their fleet of shared electric scooters. They use drones to track customers.
83 |
84 | [](./Flow%20Diagram/scouter)
85 |
86 | [](./Attack%20Tree/scouter)
87 |
88 |
89 | ## sokify
90 | An online hipster store platform that allows people to see pictures of socks on social medias and buy them. Its main components are a mobile application and an API, which connect to a legacy inventory management system that still sends fax.
91 |
92 | [](./Flow%20Diagram/sokify)
93 |
94 | [](./Attack%20Tree/sokify)
95 |
96 |
97 | ## webapp-threat-dragon
98 | A sample model of a web application, with a queue-decoupled background process. The OWASP Threat Dragon PDF example contains a report with details about elements with a description of threats and theirs mitigation.
99 |
100 | [](./Flow%20Diagram/webapp-threat-dragon)
101 |
102 |
103 | ## 3-Tier-Web-App
104 | This fictitious application exposes a Web UI on the internet and has a Web API and Database hosted on a public cloud provider. This is a full example using the IriusRisk threat modeling tool from ContinuumSecurity.
105 |
106 | [](./IriusRisk/3-Tier-Web-App)
107 |
108 |
--------------------------------------------------------------------------------
/IriusRisk/3-Tier-Web-App/3 Tier Web App - Threat Model and Risk Report.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/IriusRisk/3-Tier-Web-App/3 Tier Web App - Threat Model and Risk Report.pdf
--------------------------------------------------------------------------------
/IriusRisk/3-Tier-Web-App/Countermeasure-as-jira-ticket- Example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/IriusRisk/3-Tier-Web-App/Countermeasure-as-jira-ticket- Example.png
--------------------------------------------------------------------------------
/IriusRisk/3-Tier-Web-App/Dataflow Diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/IriusRisk/3-Tier-Web-App/Dataflow Diagram.png
--------------------------------------------------------------------------------
/IriusRisk/3-Tier-Web-App/README.md:
--------------------------------------------------------------------------------
1 | # Example of a Threat Model of a fictitious 3 Tier Web Application
2 |
3 | This fictitious application exposes a Web UI on the internet and has a Web API and Database hosted on a public cloud provider.
4 |
5 | ## Contents
6 | ### What are we building?
7 | - See the Dataflow Diagram.png
8 | - The first few pages of the Threat Model and Risk Report PDF file contain the answers to questions that define how the individual components behave and are configured.
9 |
10 | ### What can go wrong?
11 | - See the Table of Threats
12 | - The last section of the PDF report contains a table of threats, the planned mitigation and the status of the countermeasure progress
13 |
14 | ### What are we going to do about it?
15 | - The last section of the PDF report contains a table that describes how each of the threats are going to be mitigated (if at all).
16 | - In the same PDF report, the "Risks Accepted" table describes risks that are not going to be mitigated.
17 |
18 | ### Did we do a good job?
19 | - This is not answered by an output from this threat modeling tool.
--------------------------------------------------------------------------------
/IriusRisk/3-Tier-Web-App/Table of Countermeasures_3-tier-web-app.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/IriusRisk/3-Tier-Web-App/Table of Countermeasures_3-tier-web-app.xls
--------------------------------------------------------------------------------
/IriusRisk/3-Tier-Web-App/Table of Threats_3-tier-web-app.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/IriusRisk/3-Tier-Web-App/Table of Threats_3-tier-web-app.xls
--------------------------------------------------------------------------------
/IriusRisk/README.md:
--------------------------------------------------------------------------------
1 | Examples using the IriusRisk threat modeling tool from ContinuumSecurity.
2 |
3 | https://continuumsecurity.net/threat-modeling-tool/
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OWASP Threat Model Cookbook Project
2 |
3 | This project is about creating and publishing threat model examples. They can be in the form of code, graphical or textual representations. The models will use diverse technologies, methodologies and techniques.
4 |
5 | You can learn from those models, use them a base to start your own, or contribute to and expand some of the models. Thus making this a collaborative cookbook of threat models.
6 |
7 | https://owasp.org/www-project-threat-model-cookbook/
8 |
9 | https://twitter.com/OWASP_tmcb
10 |
11 | ## Disclaimer
12 | Examples provided in this repository are not representations of secure systems, but rather insecure systems that are easy to model. Most of them are made up systems that don't exist in reality. Any resemblance to real life systems is purely coincidental.
13 |
14 | ## Contributing
15 | We are welcoming PRs containing examples to add to the cookbook. If you want to add new threat models, create more versions based of existing drafts, feel free to directly submit a PR.
16 |
17 | Here's some guidelines on how our file structure works:
18 | * [INDEX.md](INDEX.md) contains all systems that are modeled with embeded pictures and short descriptions.
19 | * Top-level directories are the type of threat models. Example: `Flow Diagram`.
20 | * If your threat model has 1 or 2 files, you can put the files directly in that directory. If they have more, please create a folder with the name of your system to be modeled.
21 | * The name of the system needs to be using dashes and alphanumeric characters only. No spaces.
22 | * A file needs to have a specific extension depending on the format: `system-name.tool` and `system-name.tool.exportfiletype`. As examples, we have the code file `cryptowallet.plantuml` and the output to an image file generated from that code as `cryptowallet.plantuml.svg`. Refer to the README.md in each top-level folder for a list of tools and their file extension matches.
23 | * If you have multiple representation of the same system using the same tool, we suggest you add `altN-` at the start of the file where `N` is a number.
24 |
25 | If this sounds complicated and you just want to contribute, you can still submit a PR and we'll refactor it for you. We might have more automation and outside references in the future so we want to keep a strict file structure.
26 |
27 | If you'd like to discuss about the structure of the project, feel free to join the discussion on [OWASP Slack](https://owasp.slack.com/messages/threatmodel-cookbook/).
28 |
29 | ## Licenses
30 |
31 | All models in form of textual or graphical representations are under CC-BY 4.0
32 |
33 | All models as code are under Apache License 2.0
34 |
35 |
--------------------------------------------------------------------------------
/Template/BLANK/BLANK-draw.io.onepager.xml:
--------------------------------------------------------------------------------
1 | 7Vzfc6O2E/9rPNM+pGMMwcljHCft3cx1OpdM+6yAbOgB4ivIJbm//lawAoHkXwGnzjfygw0rWEn72V9ahCfudfr8Oyd59IWFNJnMpuHzxF1OZjPHcz34EZSXmjL3kbDmcYgXtYS7+AdF4hSpj3FIi86FJWNJGeddYsCyjAZlh0Y4Z0/dy1Ys6faak7XssSXcBSTRqf/EYRkh1fEv24Y/aLyOsOuLmV83PJDg25qzxwz7m8zcVfWpm1MieeFEi4iE7EkhuTcgV84YMBZH6fM1TYRspdjq+243tOK4v5PkEWeyaAdUd1i+yEnKqXCa4TS2M5/JSSrsNaZVV1Tc4UzcxVMUl/QuJ4FofQJdAVpUpgk2N7MXJ+uEFAK2KRwHLI0DPC5Kzr7Ra5YwXnXhTqtP0yIBAtktVnGSKFei6IHOsvKWpHEi9PGeRCwlSEXdc308N/VDknidAY3XgC8ID/A2AdhCl6OEgfKSSptowAWjoSylJX+BS7B1do76gPbioKSfWuW7hKFUtEjRO0/qPOr7uuHc4ggHCOUmWOcarPcRp6QEGpp2D2SYlZCDgqQUUQAyoCC/hZh7DAZ1hQ1pHIbidqNKMLh6lVSaEMF1FG5odUMgsAU/HJUYRMR4/ANoRI5KARgm2VWPjGViOF3tQuIQRCWC6CkUBGeeAUH3fDiCjsHur/I8AfmXMcug4U+SAv1qDyCN8jDITQKe0JXgMB7cErftcAul2Aa3441kmPOdhumYYJX+fZhhXmiw3kG0E5BaLIdjCT6/j6V/NCjRHShQfv70FUCc/sXZv1UKYxE9GFH/Yo+weSREXd3n/k15YY1zHChNxomhcmwofT2tXbBnWH4MTpilPm5LmA9JkdW0uE20xZmaPOvDbGa4NxwX0m6kZbmuns8YvaV0soOMy9Ej3zsRnFTILXI7l6quys2fYxY+TG56mFnewvf0lyUpCfzeCm8wmy5jsuYk/fX/x0/tzP/HAtjtA4znCsCedH+dpdooaQRqk2oX0gpP3jR8Wd1B0XnSVlTbcNHyO2sk6YyGyQ5diLbM1R29tYKdWPb8nAlLxxQfRjEDR69YXBUFtUi+AsmmrrQlYjnG2tMYSJ6/2wyp783eOEM6101gMvMToaph/L0jQP9/j6KcvBC2cIZqLVaelWY3rXC0xt+KS5ETUTnS2SRxRs/khAQf5zfRdY/NTQYzylmcCaOsOcKcaqbdjoBcjVhSrQUfrIkYM7dZsKlINYoFz/WU832m6tIsVak12Z0qNlmrHyQ2uQY4mv0+cGtoW0sUr1CYrp3NDWbmOKj94+c8+ARVUZgvtCRhta47sC4hHxtZ5fuvlK+Fc/+FZ78k85aPIjzDwtNqzIlrzFyqw+aa6vE0RlZrrca8J43xe6nkm2qMaS1oNebEo1KvHvq2PkZfe9yTh0Q+ujkgI5qbHjjUOlIKjmJrF+Oh2NqiqB+IptU1ZcpNu6ibgB9ULtJ1GG+rVtJ4fb3CaeRlaKoHcxawJCF5Ue/tgN1weLbRAsoHBlvy+kTNLErYLDaVKtxyw809h9mX4KUT9S5PdxCWv+X/MfgLoslDCHrtBfcOlEoQE+FRK+Z0tvftt/Wzs2Nv065PGZJ3bfiEdfruDZ8YvQ2Bsok8r6+zXxjqxcZIKQvNg0Llpf70ywY4G+CsA7T8bYCzAc4Yy4wxb+8tAW8d4PZ4kixehMk3ThZfJqr0QH1HZ4gQPB+Zq3tc5Hw7e1w8HO4wIWwu0wpV2PN5rnjA1QnqPZP8oPnC7vLTztAtCXf3Xz8tbxTv07RYn2/5W/6Wv+X/8XLOhl7HapuKbkxF62RPz8J2vMo1UpKl78SwSdYJJllLWgQ8zutXYH2Simdr2UMhfmzmZflb/pa/5W8zL5t5jZF5yfqXvom62bd4hExs8x4zm4mdUCb2Oebi5VNQPpt4Wf6Wv+Vv+dvEyyZeIyZennwr7QglMDht/5GwalP+9tG9+Qk=
--------------------------------------------------------------------------------
/Template/BLANK/BLANK-draw.io.onepager.xml.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP/threat-model-cookbook/83f391f4ed6e463030524fc315e7fe3577a377c1/Template/BLANK/BLANK-draw.io.onepager.xml.pdf
--------------------------------------------------------------------------------
/Template/README.md:
--------------------------------------------------------------------------------
1 | Examples using different techniques to create threat model templates.
2 |
3 | Tool | File match |
4 | :--- | :---
5 | | www.draw.io | `*draw.io*.xml` |
6 |
7 |
--------------------------------------------------------------------------------