|
1 | | -**⚠️ Important:** You must have MinGW installed on your Sliver server to get some staged (e.g., Windows DLLs) payloads to work. |
| 1 | +**⚠️ Important:** Some staged payloads require a working cross-compiler toolchain on the Sliver server (especially shared libraries and non-native targets). Sliver bundles a Zig toolchain for many Windows/Linux targets, but macOS shared library/shellcode builds require osxcross. |
2 | 2 |
|
3 | 3 | ## Overview |
4 | 4 |
|
@@ -33,23 +33,35 @@ Name Platform Command & Control Debug Format |
33 | 33 | win-shellcode windows/amd64 [1] mtls://192.168.122.1:8888 false SHELLCODE enabled |
34 | 34 | ``` |
35 | 35 |
|
36 | | -You can tune shellcode options for shellcode profiles (Windows: Donut): |
| 36 | +Shellcode generation varies by platform: |
37 | 37 |
|
38 | | -- `--shellcode-entropy`: 1=none, 2=random names, 3=random+encrypt |
39 | | -- `--shellcode-compress`: enable/disable aPLib compression (boolean) |
40 | | -- `--shellcode-exitopt`: 1=exit thread, 2=exit process, 3=block |
41 | | -- `--shellcode-bypass`: 1=none, 2=abort on failure, 3=continue |
42 | | -- `--shellcode-headers`: 1=overwrite, 2=keep |
43 | | -- `--shellcode-thread`: run unmanaged EXE entrypoint as a new thread (boolean) |
44 | | -- `--shellcode-unicode`: pass Unicode command line to unmanaged DLL entrypoints (boolean) |
45 | | -- `--shellcode-oep`: override original entry point (uint32, 0=default) |
| 38 | +- Windows shellcode uses Donut and supports all shellcode tuning flags below. |
| 39 | +- macOS (darwin/arm64) and Linux (amd64/arm64) shellcode currently only support `--shellcode-compress`; other `--shellcode-*` options are Windows-only. |
| 40 | + |
| 41 | +Shellcode options: |
| 42 | + |
| 43 | +- `--shellcode-encoder`: apply an optional shellcode encoder (see: `shellcode-encoders`) |
| 44 | +- `--shellcode-compress`: enable/disable aPLib compression (boolean) (Windows, macOS, Linux) |
| 45 | +- `--shellcode-entropy`: 1=none, 2=random names, 3=random+encrypt (Windows only) |
| 46 | +- `--shellcode-exitopt`: 1=exit thread, 2=exit process, 3=block (Windows only) |
| 47 | +- `--shellcode-bypass`: 1=none, 2=abort on failure, 3=continue (Windows only) |
| 48 | +- `--shellcode-headers`: 1=overwrite, 2=keep (Windows only) |
| 49 | +- `--shellcode-thread`: run unmanaged EXE entrypoint as a new thread (boolean) (Windows only) |
| 50 | +- `--shellcode-unicode`: pass Unicode command line to unmanaged DLL entrypoints (boolean) (Windows only) |
| 51 | +- `--shellcode-oep`: override original entry point (uint32, 0=default) (Windows only) |
46 | 52 |
|
47 | 53 | Example: |
48 | 54 |
|
49 | 55 | ``` |
50 | 56 | sliver > profiles new --mtls 192.168.122.1 --format shellcode --shellcode-entropy 2 --shellcode-compress --shellcode-exitopt 3 win-shellcode |
51 | 57 | ``` |
52 | 58 |
|
| 59 | +Linux example (compression only): |
| 60 | + |
| 61 | +``` |
| 62 | +sliver > profiles new --os linux --arch amd64 --mtls 192.168.122.1 --format shellcode --shellcode-compress linux-shellcode |
| 63 | +``` |
| 64 | + |
53 | 65 | We can now create a staging listener and link it to the profile: |
54 | 66 |
|
55 | 67 | ``` |
|
0 commit comments