forked from SecGen/SecGen
-
Notifications
You must be signed in to change notification settings - Fork 318
/
Copy pathbrief_case.xml
523 lines (482 loc) · 17.9 KB
/
brief_case.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
<?xml version="1.0"?>
<scenario xmlns="http://www.github/cliffe/SecGen/scenario"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.github/cliffe/SecGen/scenario">
<name>A Brief Case (of murder)</name>
<author>Thomas Shaw</author>
<description>Single system CLI narrative-based CTF challenge.
The murder was solved quickly. It was a briefcase.
</description>
<type>ctf</type>
<type>attack-ctf</type>
<type>web-hints</type>
<difficulty>intermediate</difficulty>
<CyBOK KA="AAA" topic="Authorisation">
<keyword>access control</keyword>
<keyword>Elevated privileges</keyword>
<keyword>Real and effective identity</keyword>
<keyword>Vulnerabilities and attacks on access control misconfigurations</keyword>
</CyBOK>
<CyBOK KA="OSV" topic="Primitives for Isolation and Mediation">
<keyword>Access controls and operating systems</keyword>
<keyword>Linux security model</keyword>
<keyword>Unix File Permissions</keyword>
<keyword>setuid/setgid</keyword>
</CyBOK>
<CyBOK KA="WAM" topic="Fundamental Concepts and Approaches">
<keyword>authentication</keyword>
<keyword>cookies</keyword>
<keyword>passwords and alternatives</keyword>
<keyword>JAVASCRIPT / HYPERTEXT MARKUP LANGUAGE (HTML) / CASCADING STYLE SHEETS (CSS) / HYPERTEXT TRANSFER PROTOCOL (HTTP)
COOKIES</keyword>
<keyword>Broken Access Control / Insecure Direct Object References</keyword>
</CyBOK>
<CyBOK KA="WAM" topic="Server-Side Vulnerabilities and Mitigations">
<keyword>injection vulnerabilities</keyword>
<keyword>server-side misconfiguration and vulnerable components</keyword>
<keyword>CROSS-SITE SCRIPTING (XSS)</keyword>
<keyword>COMMAND INJECTION</keyword>
<keyword>SQL-INJECTION</keyword>
</CyBOK>
<CyBOK KA="SS" topic="Categories of Vulnerabilities">
<keyword>Web vulnerabilities / OWASP Top 10</keyword>
</CyBOK>
<system>
<system_name>target_server</system_name>
<base distro="Debian 9" platform="linux" type="server"/>
<input into_datastore="IP_addresses">
<value>172.10.0.2</value>
<value>172.10.0.3</value>
</input>
<input into_datastore="accounts">
<!-- [0]: Entry account -->
<generator type="account">
<input into="leaked_filenames">
<value>missing_persons_report</value>
</input>
<input into="strings_to_leak">
<value>*** Missing Persons Report ***</value>
<value>Two individuals are missing. No names or dates attached to the report.</value>
<value>If you can find out who has gone missing and when, you will be rewarded for your efforts.</value>
<value>Enter their names in the format flag{Firstname Lastname YYYY-MM-DD HH:MM:SS}</value>
<value>If you find any more evidence, such as the name of a suspect, use the format flag{Firstname Lastname}</value>
</input>
<input into="password">
<generator type="medium_password_generator"/>
</input>
</generator>
<!-- [1]: Passwordless account -->
<generator type="account">
<input into="password">
<value/>
</input>
<input into="strings_to_leak">
<generator type="flag_generator"/>
</input>
</generator>
<!-- [2]: Third account accessible through vulnerability exploitation -->
<generator type="account">
<input into="strings_to_leak">
<value/>
</input>
</generator>
</input>
<!-- Create @person's for user2 and user3 and the 3 other store_person db entries -->
<input into_datastore="people">
<!-- [0]: User 2-->
<generator type="person">
<input into="account">
<datastore access="1">accounts</datastore>
</input>
</generator>
<!-- [1]: User 3 -->
<generator type="person">
<input into="account">
<datastore access="2">accounts</datastore>
</input>
</generator>
<!-- [2]: Store User 1 -->
<generator type="person"/>
<!-- [3]: Store User 2 -->
<generator type="person"/>
<!-- [4]: Store User 3 -->
<generator type="person"/>
</input>
<!-- Web Store data: dealer, murderer, victims and timestamps -->
<input into_datastore="store_domain">
<value>dangerous_store.co.uk</value>
</input>
<input into_datastore="dealer_id">
<encoder type="string_selector">
<input into="strings_to_encode">
<value>3</value>
<value>4</value>
<value>5</value>
</input>
</encoder>
</input>
<input into_datastore="murderer_id">
<encoder type="string_selector">
<input into="strings_to_encode">
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
</input>
</encoder>
</input>
<input into_datastore="murderer">
<encoder type="string_selector">
<input into="strings_to_encode">
<datastore access="0">people</datastore>
<datastore access="1">people</datastore>
<datastore access="2">people</datastore>
<datastore access="3">people</datastore>
<datastore access="4">people</datastore>
</input>
<input into="position">
<datastore>murderer_id</datastore>
</input>
</encoder>
</input>
<input into_datastore="murdered_ids">
<encoder type="string_selector_with_exclusions">
<input into="exclusion_list">
<datastore>murderer_id</datastore>
<datastore>dealer_id</datastore>
</input>
<input into="strings_to_encode">
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
</input>
</encoder>
<encoder type="string_selector_with_exclusions">
<input into="exclusion_list">
<datastore>murderer_id</datastore>
<datastore>dealer_id</datastore>
<datastore>murdered_ids</datastore>
</input>
<input into="strings_to_encode">
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
</input>
</encoder>
</input>
<input into_datastore="murdered_names">
<encoder type="string_selector">
<input into="strings_to_encode">
<datastore access="0" access_json="['name']">people</datastore>
<datastore access="1" access_json="['name']">people</datastore>
<datastore access="2" access_json="['name']">people</datastore>
<datastore access="3" access_json="['name']">people</datastore>
<datastore access="4" access_json="['name']">people</datastore>
</input>
<input into="position">
<datastore access="0">murdered_ids</datastore>
</input>
</encoder>
<encoder type="string_selector">
<input into="strings_to_encode">
<datastore access="0" access_json="['name']">people</datastore>
<datastore access="1" access_json="['name']">people</datastore>
<datastore access="2" access_json="['name']">people</datastore>
<datastore access="3" access_json="['name']">people</datastore>
<datastore access="4" access_json="['name']">people</datastore>
</input>
<input into="position">
<datastore access="1">murdered_ids</datastore>
</input>
</encoder>
</input>
<input into_datastore="murder_timestamps">
<generator type="date_generator">
<input into="format">
<value>mysql_datetime</value>
</input>
</generator>
<generator type="date_generator">
<input into="format">
<value>mysql_datetime</value>
</input>
</generator>
</input>
<!-- Murder flags: 1x murderer, 2x murdered w/ timestamp -->
<input into="murderer_flag">
<generator type="concat_flag.*">
<input into="strings_to_join">
<datastore access_json="['name']">murderer</datastore>
</input>
</generator>
</input>
<input into="murdered_flags">
<generator type="concat_flag.*">
<input into="strings_to_join">
<datastore access="0">murdered_names</datastore>
<datastore access="0">murder_timestamps</datastore>
</input>
</generator>
<generator type="concat_flag.*">
<input into="strings_to_join">
<datastore access="1">murdered_names</datastore>
<datastore access="1">murder_timestamps</datastore>
</input>
</generator>
</input>
<!-- Scenario Modules -->
<utility module_path=".*/parameterised_accounts">
<input into="accounts">
<datastore access="0">accounts</datastore>
</input>
</utility>
<vulnerability module_path=".*/hidden_file">
<input into="account">
<datastore access="0">accounts</datastore>
</input>
<input into="strings_to_leak">
<generator type="flag_generator"/>
<value>Make a note of the technique used to solve this challenge as it will come in handy again soon.</value>
</input>
</vulnerability>
<vulnerability module_path=".*/passwordless_user_account.*">
<input into="accounts">
<datastore access="1">accounts</datastore>
</input>
</vulnerability>
<service name="Random Parameterised Website">
<input into="theme">
<value>journal.min.css</value>
</input>
<input into="main_page_paragraph_content">
<generator type="html_snippet_generator">
<input into="heading">
<value>We need your help!</value>
</input>
<input into="paragraphs" unique_module_list="unique_encoders">
<value>You have received a strange message. Can you decode it to read the contents?</value>
<!--<encoder type="string_encoder">-->
<encoder type="caesar_cipher">
<input into="strings_to_encode">
<value>Log into the server and check your mail.</value>
<value>Here's a flag for your efforts.</value>
<generator type="flag_generator"/>
<generator type="concat_paragraph">
<input into="data">
<value>Username:</value>
<datastore access="0" access_json="['username']">accounts</datastore>
</input>
</generator>
<generator type="concat_paragraph">
<input into="data">
<value>Password:</value>
<datastore access="0" access_json="['password']">accounts</datastore>
</input>
</generator>
</input>
</encoder>
</input>
</generator>
</input>
<input into="strings_to_leak">
<generator type="flag_generator"/>
<value><a href="oops.html"/></value>
</input>
<input into="additional_page_filenames">
<value>oops.html</value>
</input>
<input into="additional_pages">
<generator type="html_snippet_generator">
<input into="heading">
<value/>
</input>
<input into="paragraphs">
<generator type="flag_generator"/>
</input>
</generator>
</input>
<input into="white_text">
<generator type="flag_generator"/>
</input>
<input into="visible_tabs">
<value/>
</input>
<input into="images_to_leak">
<value/>
</input>
<input into="organisation">
<value/>
</input>
</service>
<utility module_path=".*/system/mail.*">
<input into="mail">
<generator type="mail_message">
<input into="sender_user">
<value>detective_jones</value>
</input>
<input into="sender_domain">
<value>police.gov.uk</value>
</input>
<input into="recipient_user">
<datastore access="0" access_json="['username']">accounts</datastore>
</input>
<input into="subject">
<value>Investigation Information</value>
</input>
<input into="content">
<value>To whom this may concern,</value>
<value>Now that you're on the server, we need your help with our investigation.</value>
<value>We've managed to hide this account on the server for you. Criminal activity has been taking place, particularly over port 1337.</value>
<value>Our initial examinations lead us to believe that the perpetrators use poor security practices.</value>
<value>Find out if the suspects have user accounts on this server and see if you can break in.</value>
<value>We need all the evidence we can get. In the form of flags. The more you collect the stronger our case will be.</value>
<value>Godspeed,</value>
<value>Detective Jones.</value>
</input>
<input into="sent_datetime">
<generator type="date_generator">
<input into="date">
<value>12/06/2017 14:51:03</value>
</input>
<input into="format">
<value>mail</value>
</input>
</generator>
</input>
</generator>
<generator type="mail_message">
<input into="sender_user">
<datastore access="2" access_json="['username']">accounts</datastore>
</input>
<input into="sender_domain">
<datastore>store_domain</datastore>
</input>
<input into="recipient_user">
<datastore access="1" access_json="['username']">accounts</datastore>
</input>
<input into="subject">
<value>New order required</value>
</input>
<input into="content">
<value>Good news, I've been getting rid of loads of gear lately. The customers are mad for it.</value>
<value>We're going to need a new order ASAP!</value>
</input>
<input into="sent_datetime">
<generator type="date_generator">
<input into="date">
<value>17/06/2017 20:12:35</value>
</input>
<input into="format">
<value>mail</value>
</input>
</generator>
</input>
</generator>
<generator type="mail_message">
<input into="sender_user">
<datastore access="0" access_json="['username']">murderer</datastore>
</input>
<input into="sender_domain">
<datastore>store_domain</datastore>
</input>
<input into="recipient_user">
<datastore access="2" access_json="['username']">accounts</datastore>
</input>
<input into="subject">
<value>Offed the last one</value>
</input>
<input into="content">
<value>Job done! The last one on the list is now swimming with the fishes.</value>
<value>It wasn't clean though, I think I saw someone watching in the distance.</value>
<value>Not that it matters. They'll never catch us!</value>
</input>
<input into="sent_datetime">
<generator type="date_generator">
<input into="date">
<value>19/06/2017 23:58:12</value>
</input>
<input into="format">
<value>mail</value>
</input>
</generator>
</input>
</generator>
</input>
</utility>
<!-- Account 3 vulnerability-->
<vulnerability module_path=".*/ssh_leaked_keys">
<input into="accounts">
<datastore access="2">accounts</datastore>
</input>
</vulnerability>
<vulnerability module_path=".*/onlinestore.*">
<input into="port">
<value>1337</value>
</input>
<input into="domain">
<datastore>store_domain</datastore>
</input>
<input into="accounts">
<datastore>people</datastore>
</input>
<input into="dealer_id">
<datastore>dealer_id</datastore>
</input>
<input into="murderer_id">
<datastore>murderer_id</datastore>
</input>
<input into="murdered_on">
<datastore>murder_timestamps</datastore>
</input>
<input into="murdered_ids">
<datastore>murdered_ids</datastore>
</input>
</vulnerability>
<network type="private_network">
<input into="IP_address">
<datastore access="0">IP_addresses</datastore>
</input>
</network>
<input into_datastore="spoiler_admin_pass">
<generator type="strong_password_generator"/>
</input>
<build type="cleanup">
<input into="root_password">
<datastore>spoiler_admin_pass</datastore>
</input>
</build>
</system>
<system>
<system_name>attack_vm</system_name>
<base distro="Kali" name="MSF"/>
<utility module_path=".*/parameterised_accounts">
<input into="accounts">
<value>{"username":"kali","password":"kali","super_user":"true","strings_to_leak":[],"leaked_filenames":[]}</value>
</input>
</utility>
<utility module_path=".*/iceweasel">
<input into="accounts">
<value>{"username":"kali","password":"kali","super_user":"true","strings_to_leak":[],"leaked_filenames":[]}</value>
</input>
<input into="autostart">
<value>true</value>
</input>
<input into="start_page">
<datastore access="0">IP_addresses</datastore>
</input>
</utility>
<utility module_path=".*/kali_top10"/>
<network type="private_network">
<input into="IP_address">
<datastore access="1">IP_addresses</datastore>
</input>
</network>
<build type="cleanup">
<input into="root_password">
<datastore>spoiler_admin_pass</datastore>
</input>
</build>
</system>
</scenario>