-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmds.json
More file actions
616 lines (566 loc) · 22.1 KB
/
Copy pathcmds.json
File metadata and controls
616 lines (566 loc) · 22.1 KB
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
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
{
"binary_list":"nmap\\|perl\\|awk\\|find\\|bash\\|sh\\|man\\|more\\|less\\|vi\\|emacs\\|vim\\|nc\\|netcat\\|python\\|ruby\\|lua\\|irb\\|tar\\|zip\\|gdb\\|pico\\|scp\\|git\\|rvim\\|script\\|ash\\|csh\\|curl\\|dash\\|ed\\|env\\|expect\\|ftp\\|sftp\\|node\\|php\\|rpm\\|rpmquery\\|socat\\|strace\\|taskset\\|tclsh\\|telnet\\|tftp\\|wget\\|wish\\|zsh\\|ssh$\\|ip$\\|arp\\|mtr",
"cmds": [
{
"type": "systeminfo",
"print": "### SYSTEM ##############################################",
"cmds": [
{
"print": "[-] Kernel information:",
"cmd": "uname -a 2>/dev/null"
},
{
"print": "[-] Kernel Information continue:",
"cmd": "cat /proc/version 2>/dev/null"
},
{
"print": "[-] version info",
"cmd": "cat /etc/*-release 2>/dev/null"
},
{
"print": "[-] hostname info",
"cmd": "hostname 2>/dev/null"
}
]
},
{
"type": "user_info",
"print": "### USER/GROUP ##########################################",
"cmds": [
{
"print": "[-] Current user/group info:",
"cmd": "id 2>/dev/null"
},
{
"print": "[-] Users that have previously logged onto the system:",
"cmd": "lastlog 2>/dev/null |grep -v 'Never' 2>/dev/null"
},
{
"print": "[-] Who else is logged on:",
"cmd": "w 2>/dev/null"
},
{
"print": "[-] Group memberships:",
"cmd": "for i in $(cut -d':' -f1 /etc/passwd 2>/dev/null);do id $i;done 2>/dev/null"
},
{
"print":"[-] It looks like we have some admin users:",
"cmd": "$(echo -e \"$grpinfo\" | grep \"(adm)\")"
},
{
"print":"[-] It looks like we have password hashes in /etc/passwd!",
"cmd": "grep -v '^[^:]*:[x]' /etc/passwd 2>/dev/null"
},
{
"print":"[-] Contents of /etc/passwd:",
"cmd": "cat /etc/passwd 2>/dev/null"
},
{
"print":"[-] We can read the shadow file!",
"cmd": "cat /etc/shadow 2>/dev/null"
},
{
"print":"[-] We can read the master.passwd file!",
"cmd": "cat /etc/master.passwd 2>/dev/null"
},
{
"print":"[-] Super user account(s):",
"cmd": "grep -v -E \"^#\" /etc/passwd 2>/dev/null| awk -F: '$3 == 0 { print $1}' 2>/dev/null"
},
{
"print":"[-] Sudoers configuration (condensed):",
"cmd": "grep -v -e '^$' /etc/sudoers 2>/dev/null |grep -v \"#\" 2>/dev/null"
},
{
"print":"[-] We can sudo without supplying a password!",
"cmd": "echo '' | sudo -S -l -k 2>/dev/null"
},
{
"print":"[-] Possible sudo pwnage!",
"cmd":"echo '' | sudo -S -l -k 2>/dev/null | xargs -n 1 2>/dev/null | sed 's/,*$//g' 2>/dev/null | grep -w $binarylist 2>/dev/null"
},
{
"print":"[-] Accounts that have recently used sudo",
"cmd":"find /home -name .sudo_as_admin_successful 2>/dev/null"
},
{
"print":"[-] We can read root's home directory!",
"cmd":"ls -ahl /root/ 2>/dev/null"
},
{
"print":"[-] Are permissions on /home directories lax:",
"cmd": "ls -ahl /home/ 2>/dev/null"
},
{
"print":"[-] Files not owned by user but writable by group:",
"cmd":"find \/ -writable ! -user \\`whoami\\` -type f ! -path \"\/proc\/*\" ! -path \"\/sys\/*\" -exec ls -al {} \\; 2>\/dev\/null",
"require":"thorough"
},
{
"print":"[-] hidden files:",
"cmd": "find \/ -user \\`whoami\\` -type f ! -path \"/proc/*\" ! -path \"/sys/*\" -exec ls -al {} \\; 2>\/dev\/null",
"require":"thorough"
},
{
"print":"[-] world-readable files within /home:",
"cmd": "find \/home\/ -perm -4 -type f -exec ls -al {} \\; 2>\/dev\/null",
"require":"thorough"
},
{
"print":"[-] Home directory contents:",
"cmd": "ls -ahl ~ 2>/dev/null",
"require":"thorough"
},
{
"print":"[-] SSH keys/host information found in the following locations:",
"cmd": "find \/ \\( -name \"id_dsa*\" -o -name \"id_rsa*\" -o -name \"known_hosts\" -o -name \"authorized_hosts\" -o -name \"authorized_keys\" \\) -exec ls -la {} 2>\/dev\/null \\;",
"require":"thorough"
},
{
"print":" Root is allowed to login via SSH:",
"cmd":"grep \"PermitRootLogin \" \/etc\/ssh\/sshd_config 2>\/dev\/null | grep -v \"#\" | awk '{print $2}'"
}
]
},
{
"type":"environmental_info",
"print":"### ENVIRONMENTAL #######################################",
"cmds":[
{
"print":"[-] Environment information:",
"cmd": "env 2>/dev/null | grep -v 'LS_COLORS' 2>/dev/null"
},
{
"print":"[-] SELinux seems to be present:",
"cmd": "sestatus 2>/dev/null"
},
{
"print":"[-] Path information:",
"cmd": "echo $PATH 2>/dev/null"
},
{
"print":"[-] Available shells:",
"cmd": "cat /etc/shells 2>/dev/null"
},
{
"print":"[-] Current umask value:",
"cmd": "umask -S 2>/dev/null & umask 2>/dev/null"
},
{
"print":"[-] umask value as specified in /etc/login.defs:",
"cmd": "grep -i \"^UMASK\" \/etc\/login.defs 2>\/dev\/null"
},
{
"print":"[-] Password and storage information:",
"cmd": "grep \"^PASS_MAX_DAYS\\|^PASS_MIN_DAYS\\|^PASS_WARN_AGE\\|^ENCRYPT_METHOD\" \/etc\/login.defs 2>\/dev\/null"
}
]
},
{
"type":"job_info",
"print":"### JOBS/TASKS ##########################################",
"cmds":[
{
"print":"[-]Cron jobs:",
"cmd":"ls -la /etc/cron* 2>/dev/null"
},
{
"print":"[-] World-writable cron jobs and file contents:",
"cmd":"find \/etc\/cron* -perm -0002 -type f -exec ls -la {} \\; -exec cat {} 2>\/dev\/null \\;"
},
{
"print":"[-] Crontab contents:",
"cmd":"cat /etc/crontab 2>/dev/null"
},
{
"print":"[-] Anything interesting in /var/spool/cron/crontabs:",
"cmd":"ls -la /var/spool/cron/crontabs 2>/dev/null"
},
{
"print":"[-] Anacron jobs and associated file permissions:",
"cmd":"ls -la /etc/anacrontab 2>/dev/null; cat /etc/anacrontab 2>/dev/null"
},
{
"print":"[-] When were jobs last executed (/var/spool/anacron contents):",
"cmd":"cut -d \":\" -f 1 \/etc\/passwd | xargs -n1 crontab -l -u 2>\/dev\/null"
},
{
"print":"[-]Enable thorough tests to see inactive timers",
"cmd":"systemctl list-timers 2>\/dev\/null |head -n -1 2>\/dev\/null"
}
]
},
{
"type":"networking_info",
"print":"### NETWORKING ##########################################",
"cmds":[
{
"print":"[-] Network and IP info",
"cmd":"/sbin/ifconfig -a 2>/dev/null"
},
{
"print":"[-] Network and IP info:",
"cmd":"/sbin/ip a 2>/dev/null"
},
{
"print":"[-] ARP history:",
"cmd":"arp -a 2>/dev/null"
},
{
"print":"[-] ARP history:",
"cmd":"ip n 2>/dev/null"
},
{
"print":"[-] Nameserver(s):",
"cmd":"grep \"nameserver\" /etc/resolv.conf 2>/dev/null"
},
{
"print":"[-] Nameserver(s):",
"cmd":"systemd-resolve --status 2>/dev/null"
},
{
"print":"[-]Default route:",
"cmd":"route 2>/dev/null | grep default"
},
{
"print":"[-] Default route:",
"cmd":"ip r 2>/dev/null | grep default"
},
{
"print":"[-] Listening TCP",
"cmd":"netstat -nupl 2>/dev/null"
},
{
"print":"[-] Listening UDP:",
"cmd":"ss -u -l -n 2>/dev/null"
}
]
},
{
"type":"services_info",
"print":"### SERVICES #############################################",
"cmds":[
{
"print":"[-]Running processes:",
"cmd":"ps aux 2>/dev/null"
},
{
"print":"[-] Process binaries and associated permissions (from above list)",
"cmd":"ps aux 2>\/dev\/null | awk '{print $11}'|xargs -r ls -la 2>\/dev\/null |awk '!x[$0]++' 2>\/dev\/null"
},
{
"print":"[-] Contents of /etc/inetd.conf:",
"cmd":"cat /etc/inetd.conf 2>/dev/null"
},
{
"print":"[-] The related inetd binary permissions:",
"cmd":"awk '{print $7}' \/etc\/inetd.conf 2>\/dev\/null |xargs -r ls -la 2>\/dev\/null"
},
{
"print":"[-] Contents of /etc/xinetd.conf:",
"cmd":"cat /etc/xinetd.conf 2>/dev/null"
},
{
"print":"[-] /etc/xinetd.d is included in /etc/xinetd.conf - associated binary permissions are listed below",
"cmd":"grep \"\/etc\/xinetd.d\" \/etc\/xinetd.conf 2>\/dev\/null"
},
{
"print":"[-] The related xinetd binary permissions:",
"cmd":"awk '{print $7}' /etc/xinetd.conf 2>/dev/null |xargs -r ls -la 2>/dev/null"
},
{
"print":"[-] /etc/init.d/ binary permissions:",
"cmd":"ls -la /etc/init.d 2>/dev/null"
},
{
"print":"[-] /etc/init.d/ files not belonging to root:",
"cmd":"find \/etc\/init.d\/ \\! -uid 0 -type f 2>\/dev\/null |xargs -r ls -la 2>\/dev\/null"
},
{
"print":"[-] /etc/rc.d/init.d binary permissions:",
"cmd":"ls -la /etc/rc.d/init.d 2>/dev/null"
},
{
"print":"[-] /etc/rc.d/init.d files not belonging to root:",
"cmd":"find \/etc\/rc.d\/init.d \\! -uid 0 -type f 2>\/dev\/null |xargs -r ls -la 2>\/dev\/null"
},
{
"print":"[-] /usr/local/etc/rc.d binary permissions:",
"cmd":"ls -la /usr/local/etc/rc.d 2>/dev/null"
},
{
"print":"[-] /usr/local/etc/rc.d files not belonging to root:",
"cmd":"find \/usr\/local\/etc\/rc.d \\! -uid 0 -type f 2>\/dev\/null |xargs -r ls -la 2>\/dev\/null"
},
{
"print":"[-] /etc/init/ config file permissions:",
"cmd":"ls -la /etc/init/ 2>/dev/null"
},
{
"print":"[-] /etc/init/ config files not belonging to root:",
"cmd":"find \/etc\/init \\! -uid 0 -type f 2>\/dev\/null |xargs -r ls -la 2>\/dev\/null"
},
{
"print":"[-] /lib/systemd/* config file permissions:",
"cmd":"ls -lthR /lib/systemd/ 2>/dev/null"
},
{
"print":"[-] /lib/systemd/* config files not belonging to root:",
"cmd":"find \/lib\/systemd\/ \\! -uid 0 -type f 2>\/dev\/null |xargs -r ls -la 2>\/dev\/null"
}
]
},
{
"type": "softoware_config",
"print": "### SOFTWARE #############################################",
"cmds": [
{
"print":"[-] Sudo version:",
"cmd":"sudo -V 2>/dev/null| grep \"Sudo version\" 2>/dev/null"
},
{
"print":"[-]MYSQL version:",
"cmd":"mysql --version 2>/dev/null"
},
{
"print":"[-] We can connect to the local MYSQL service with default root/root credentials!",
"cmd":"mysqladmin -uroot -proot version 2>/dev/null"
},
{
"print":"[-] We can connect to the local MYSQL service as 'root' and without a password!",
"cmd":"mysqladmin -uroot version 2>/dev/null"
},
{
"print":"[-] Postgres version:",
"cmd":"psql -V 2>/dev/null"
},
{
"print":"[-] We can connect to Postgres DB 'template0' as user 'postgres' with no password!:",
"cmd":"psql -U postgres template0 -c 'select version()' 2>/dev/null | grep version"
},
{
"print":"[-] We can connect to Postgres DB 'template1' as user 'postgres' with no password!:",
"cmd":"psql -U postgres template1 -c 'select version()' 2>/dev/null | grep version"
},
{
"print":"[-] We can connect to Postgres DB 'template0' as user 'psql' with no password!: ",
"cmd":"psql -U pgsql template0 -c 'select version()' 2>/dev/null | grep version"
},
{
"print":"[-] We can connect to Postgres DB 'template1' as user 'psql' with no password!:",
"cmd":"psql -U pgsql template1 -c 'select version()' 2>/dev/null | grep version"
},
{
"print":"[-] Apache version:",
"cmd":"apache2 -v 2>/dev/null; httpd -v 2>/dev/null"
},
{
"print":"[-] Apache user configuration:",
"cmd":"grep -i 'user\\|group' \/etc\/apache2\/envvars 2>\/dev\/null |awk '{sub(\/.*\\export \/,\"\")}1' 2>\/dev\/null"
},
{
"print":"[-] Installed Apache modules:",
"cmd":"apache2ctl -M 2>/dev/null; httpd -M 2>/dev/null"
},
{
"print":"[-] htpasswd found - could contain passwords:",
"cmd":"find \/ -name .htpasswd -print -exec cat {} \\; 2>\/dev\/null"
},
{
"print":"[-] www home dir contents:",
"cmd":"ls -alhR \/var\/www\/ 2>\/dev\/null; ls -alhR \/srv\/www\/htdocs\/ 2>\/dev\/null; ls -alhR \/usr\/local\/www\/apache2\/data\/ 2>\/dev\/null; ls -alhR \/opt\/lampp\/htdocs\/ 2>\/dev\/null"
}
]
},
{
"type":"interesting_files",
"print":"### INTERESTING FILES ####################################",
"cmds":[
{
"print":"[-] Useful file locations:",
"cmd":"which nc 2>/dev/null ; which netcat 2>/dev/null ; which wget 2>/dev/null ; which nmap 2>/dev/null ; which gcc 2>/dev/null; which curl 2>/dev/null "
},
{
"print":"[-] Installed compilers:",
"cmd":"dpkg --list 2>/dev/null| grep compiler |grep -v decompiler 2>/dev/null && yum list installed 'gcc*' 2>/dev/null| grep gcc 2>/dev/null"
},
{
"print":"[-] Can we read/write sensitive files:",
"cmd":"ls -la /etc/passwd 2>/dev/null ; ls -la /etc/group 2>/dev/null ; ls -la /etc/profile 2>/dev/null; ls -la /etc/shadow 2>/dev/null ; ls -la /etc/master.passwd 2>/dev/null "
},
{
"print":"[-] SUID files:",
"cmd":"find \/ -perm -4000 -type f -exec ls -la {} 2>\/dev\/null \\;"
},
{
"print":"[-] Possibly interesting SUID files:",
"cmd":"find \/ -perm -4000 -type f -exec ls -la {} \\; 2>\/dev\/null | grep -w $binarylist 2>\/dev\/null"
},
{
"print":"[-] World-writable SUID files owned by root:",
"cmd":"find \/ -uid 0 -perm -4002 -type f -exec ls -la {} 2>\/dev\/null \\;"
},
{
"print":"[-] SGID files:",
"cmd":"find \/ -perm -2000 -type f -exec ls -la {} 2>\/dev\/null \\;"
},
{
"print":"[-] Possibly interesting SGID files:",
"cmd":"find \/ -perm -2000 -type f -exec ls -la {} \\; 2>\/dev\/null | grep -w $binarylist 2>\/dev\/null"
},
{
"print":"[-] World-writable SGID files:",
"cmd":"find \/ -perm -2002 -type f -exec ls -la {} 2>\/dev\/null \\;"
},
{
"print":"[-] World-writable SGID files owned by root",
"cmd":"find \/ -uid 0 -perm -2002 -type f -exec ls -la {} 2>\/dev\/null \\;"
},
{
"print":"[-] Files with POSIX capabilities set",
"cmd":"getcap -r \/ 2>\/dev\/null || \/sbin\/getcap -r \/ 2>\/dev\/null"
},
{
"print":"[-] Users with specific POSIX capabilities:",
"cmd":"grep -v '^#\\|none\\|^$' \/etc\/security\/capability.conf 2>\/dev\/null"
},
{
"print":"[-] Private SSH keys found!",
"cmd":"grep -rl \"PRIVATE KEY-----\" \/home 2>\/dev\/null",
"require":"thorough"
},
{
"print":"[-] AWS secret keys found!",
"cmd":"grep -rli \"aws_secret_access_key\" \/home 2>\/dev\/null",
"require":"thorough"
},
{
"print":"[-] Git credentials saved on the machine!",
"cmd":"find \/ -name \".git-credentials\" 2>\/dev\/null",
"require":"thorough"
},
{
"print":"[-] World-writable files (excluding /proc and /sys):",
"cmd":"find \/ ! -path \"*\/proc\/*\" ! -path \"\/sys\/*\" -perm -2 -type f -exec ls -la {} 2>\/dev\/null \\;",
"require":"thorough"
},
{
"print":"[-] Plan file permissions and contents:",
"cmd":"find /home -iname *.plan -exec ls -la {} \\; -exec cat {} 2>/dev/null \\;"
},
{
"print":"[-] Plan file permissions and contents:",
"cmd":"find /usr/home -iname *.plan -exec ls -la {} \\; -exec cat {} 2>/dev/null \\;"
},
{
"print":"[-] rhost config file(s) and file contents:",
"cmd":"find /home -iname *.rhosts -exec ls -la {} 2>/dev/null \\; -exec cat {} 2>/dev/null \\;"
},
{
"print":"[-] rhost config file(s) and file contents:",
"cmd":"find /usr/home -iname *.rhosts -exec ls -la {} 2>/dev/null \\; -exec cat {} 2>/dev/null \\;"
},
{
"print":"[-] Hosts.equiv file and contents:",
"cmd":"find /etc -iname hosts.equiv -exec ls -la {} 2>/dev/null \\; -exec cat {} 2>/dev/null \\;"
},
{
"print":"[-] NFS config details: ",
"cmd":"ls -la /etc/exports 2>/dev/null; cat /etc/exports 2>/dev/null"
},
{
"print":"[-] NFS displaying partitions and filesystems - you need to check if exotic filesystems",
"cmd":"cat /etc/fstab 2>/dev/null",
"require":"thorough"
},
{
"print":"[-] Looks like there are credentials in /etc/fstab!",
"cmd": "grep username \/etc\/fstab 2>\/dev\/null |awk '{sub(\/.*\\username=\/,\"\");sub(\/\\,.*\/,\"\")}1' 2>\/dev\/null| xargs -r echo username: 2>\/dev\/null; grep password \/etc\/fstab 2>\/dev\/null |awk '{sub(\/.*\\password=\/,\"\");sub(\/\\,.*\/,\"\")}1' 2>\/dev\/null| xargs -r echo password: 2>\/dev\/null; grep domain \/etc\/fstab 2>\/dev\/null |awk '{sub(\/.*\\domain=\/,\"\");sub(\/\\,.*\/,\"\")}1' 2>\/dev\/null| xargs -r echo domain: 2>\/dev\/null"
},
{
"print":"[-] /etc/fstab contains a credentials file!",
"cmd": "grep cred \/etc\/fstab 2>\/dev\/null |awk '{sub(\/.*\\credentials=\/,\"\");sub(\/\\,.*\/,\"\")}1' 2>\/dev\/null | xargs -I{} sh -c 'ls -la {}; cat {}' 2>\/dev\/null"
},
{
"print":"[-] Find keyword ($keyword) in .conf files (recursive 4 levels - output format filepath:identified line number where keyword appears):",
"cmd": "find / -maxdepth 4 -name *.conf -type f -exec grep -Hn $keyword {} \\; 2>/dev/null",
"require":"keyword"
},
{
"print":"[-] Find keyword ($keyword) in .log files (recursive 4 levels - output format filepath:identified line number where keyword appears):",
"cmd": "find / -maxdepth 4 -name *.log -type f -exec grep -Hn $keyword {} \\; 2>/dev/null",
"require":"keyword"
},
{
"print":"[-] Find keyword ($keyword) in .ini files (recursive 4 levels - output format filepath:identified line number where keyword appears):",
"cmd": "find / -maxdepth 4 -name *.ini -type f -exec grep -Hn $keyword {} \\; 2>/dev/null",
"require":"keyword"
},
{
"print":"[-] All *.conf files in /etc (recursive 1 level):",
"cmd": "find /etc/ -maxdepth 1 -name *.conf -type f -exec ls -la {} \\; 2>/dev/null"
},
{
"print":"[-] Current user's history files:",
"cmd": "ls -la ~/.*_history 2>/dev/null"
},
{
"print":"[-] Root's history files are accessible!",
"cmd": "ls -la /root/.*_history 2>/dev/null"
},
{
"print":"[-] Location and contents (if accessible) of .bash_history file",
"cmd": "find /home -name .bash_history -print -exec cat {} 2>/dev/null \\;"
},
{
"print":"[-] Any interesting mail in /var/mail:",
"cmd": "ls -la /var/mail 2>/dev/null"
},
{
"print":"[-] We can read /var/mail/root!",
"cmd": "head /var/mail/root 2>/dev/null"
}
]
},
{
"type":"docker_checks",
"print":"### docker checks ####################################",
"cmds":[
{
"print":"[-] Looks like we're in a Docker container:",
"cmd":"grep -i docker /proc/self/cgroup 2>/dev/null; find / -name \"*dockerenv*\" -exec ls -la {} \\; 2>/dev/null"
},
{
"print":"[-] Looks like we're hosting Docker",
"cmd":"docker --version 2>/dev/null; docker ps -a 2>/dev/null"
},
{
"print":"[-] We're a member of the (docker) group - could possibly misuse these rights!",
"cmd":"id | grep -i docker 2>/dev/null;"
},
{
"print":"[-] Anything juicy in the Dockerfile:",
"cmd":"find / -name Dockerfile -exec ls -l {} 2>/dev/null \\;"
},
{
"print":"[-] Anything juicy in docker-compose.yml",
"cmd":"find / -name docker-compose.yml -exec ls -l {} 2>/dev/null \\;"
}
]
},
{
"type":"lxc_container_check",
"print":"### lxc_container_check ####################################",
"cmds":[
{
"print":"[-] Looks like we're in a lxc container:",
"cmd": "grep -qa container=lxc /proc/1/environ 2>/dev/null"
},
{
"print":"[-] We're a member of the (lxd) group - could possibly misuse these rights!",
"cmd": "id | grep -i lxd 2>/dev/null"
}
]
}
]
}