Skip to content

Commit c5f48bb

Browse files
committed
adding generic-cms from OSS19
this one needs a lot of work! use it as a contribution case example!
1 parent 4ae4401 commit c5f48bb

File tree

5 files changed

+180
-0
lines changed

5 files changed

+180
-0
lines changed

Attack Tree/generic-cms.plantuml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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

+43
Loading
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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<br/>mysql<br/>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()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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 = <<i>Internet</i>>;
27+
]
28+
29+
aaedcfceefeffbdc [
30+
shape = circle
31+
color = black
32+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><b>Web Server</b></td></tr></table>>;
33+
]
34+
acbfeaddadeceddbbbbca [
35+
shape = none;
36+
color = black;
37+
label = <<table sides="TB" cellborder="0" cellpadding="2"><tr><td><font color="black"><b>db</b></font></td></tr></table>>;
38+
]
39+
40+
}
41+
42+
abbfadcbfacaebcdefda [
43+
shape = square;
44+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><b>Generic/Privilege User</b></td></tr></table>>;
45+
]
46+
abbfadcbfacaebcdefda -> aaedcfceefeffbdc [
47+
color = black;
48+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><font color ="black"><b>HTTPS</b></font></td></tr></table>>;
49+
]
50+
aaedcfceefeffbdc -> acbfeaddadeceddbbbbca [
51+
color = black;
52+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><font color ="black"><b> </b></font></td></tr></table>>;
53+
]
54+
cafbfbfeedbdeecbccebfdf [
55+
shape = square;
56+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><b> admin </b></td></tr></table>>;
57+
]
58+
cafbfbfeedbdeecbccebfdf -> acbfeaddadeceddbbbbca [
59+
color = black;
60+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><font color ="black"><b>unsecure<br/>mysql<br/>connection</b></font></td></tr></table>>;
61+
]
62+
bebdddeabdfbacdceded [
63+
shape = doublecircle;
64+
color = black;
65+
66+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><font color="black"><b>CDN network</b></font></td></tr></table>>;
67+
]
68+
abbfadcbfacaebcdefda -> bebdddeabdfbacdceded [
69+
color = black;
70+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><font color ="black"><b>HTTP</b></font></td></tr></table>>;
71+
]
72+
aaedcfceefeffbdc -> bebdddeabdfbacdceded [
73+
color = black;
74+
label = <<table border="0" cellborder="0" cellpadding="2"><tr><td><font color ="black"><b>Push to Bucket</b></font></td></tr></table>>;
75+
]
76+
}
33.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)