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
Cobalt Strike uses a technique known as fork & run for many of its post-ex capabilities, including the screenshot command. While this behaviour provides stability, it is now well known and heavily monitored for. This BOF is meant to provide a more OPSEC safe version of the screenshot capability.
43
47
44
48
## Credits
45
-
- Made using https://github.com/securifybv/Visual-Studio-BOF-template
46
49
- Save BMP to file from https://stackoverflow.com/a/60667564
47
50
- in memory download from https://github.com/anthemtotheego/CredBandit
48
-
-@BinaryFaultline for BMP rendering in aggressorscript, and screenshot callback branch
51
+
-@BinaryFaultline for (deprecated) BMP rendering in aggressorscript, and screenshot callback function
52
+
- bitmap to jpeg from https://github.com/WKL-Sec/HiddenDesktop
49
53
50
54
## Disclaimer
51
55
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.
show_error("Image is not a Bitmap. It should render in Screenshots tab.");
160
-
}
161
-
}
162
-
}
163
1
164
2
#Register command
165
3
beacon_command_register(
166
4
"screenshot_bof",
167
5
"Alternative screenshot capability that does not do fork n run",
168
-
"Use: screenshot_bof [filename] [save method]\nSave methods:\n\t0: drop file to disk\n\t1: download over beacon\n\nTake a screenshot inline using a BOF. Screenshot is saved as BMP on disk or downloaded over beacon."
6
+
"Use: screenshot_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 as a screenshot\n\nTake a screenshot inline using a BOF. Screenshot is saved as JPEG on disk or downloaded over beacon."
169
7
);
170
8
171
9
alias screenshot_bof {
@@ -175,7 +13,7 @@ alias screenshot_bof {
175
13
$barch = barch($bid);
176
14
if (size(@_) != 4)
177
15
{
178
-
berror($1, "Syntax: screenshot_bof [filename] [save method 0/1] e.g. screenshot_bof file.bmp 1 1234\nNote: set PID to 0 to capture full screen.");
16
+
berror($1, "Syntax: screenshot_bof [filename] [save method 0/1/2] e.g. screenshot_bof file.JPEG 1 1234\nNote: set PID to 0 to capture full screen.");
0 commit comments