Overview
SysWhispers4 is a command-line tool that generates NT syscall stubs with advanced EDR evasion capabilities. This reference documents all available command-line options and their usage.Basic Syntax
At least one of
--preset or --functions is required.Function Selection
You must specify which NT functions to include in the generated output using one or both of these options:--preset / -p
Use predefined function sets optimized for common scenarios.
Syntax: --preset PRESET[,PRESET,...]
Type: String (comma-separated list)
Available Presets:
| Preset | Functions | Description |
|---|---|---|
common | 25 | General process/thread/memory operations |
injection | 20 | Process/shellcode injection via APC, threads, sections |
evasion | 15 | AV/EDR evasion queries and operations |
token | 6 | Token manipulation |
stealth | 32 | Maximum evasion: injection + evasion + unhooking |
file_ops | 7 | File I/O via NT syscalls |
transaction | 7 | Process doppelganging / transaction rollback |
all | 64 | All supported functions |
--functions / -f
Specify individual NT function names.
Syntax: --functions FUNC[,FUNC,...]
Type: String (comma-separated list)
Examples:
Target Configuration
--arch / -a
Target processor architecture.
Syntax: --arch ARCH
Type: Choice
Default: x64
Choices:
x64- 64-bit Windows (most common)x86- 32-bit Windowswow64- 32-bit process on 64-bit Windowsarm64- ARM64 Windows
--compiler / -c
Target compiler toolchain.
Syntax: --compiler COMPILER
Type: Choice
Default: msvc
Choices:
msvc- Microsoft Visual C++ with MASM assembler (generates.asmfile)mingw- MinGW with GAS inline assemblyclang- Clang with GAS inline assembly
Techniques
--method / -m
Syscall invocation method. See Invocation Methods for detailed explanations.
Syntax: --method METHOD
Type: Choice
Default: embedded
Choices:
embedded- Direct syscall (syscall instruction in your stub)indirect- Jump to syscall;ret gadget in ntdllrandomized- Jump to random syscall;ret gadget per callegg- Egg marker replaced at runtime (no static syscall bytes)
--resolve / -r
SSN (System Service Number) resolution method. See SSN Resolution Methods for detailed explanations.
Syntax: --resolve RESOLVE
Type: Choice
Default: freshycalls
Choices:
freshycalls- Sort ntdll exports by address (hook-resistant, default)static- Embed SSNs from j00ru table at generation timehells_gate- Read SSN from ntdll stub (fails if hooked)halos_gate- Hell’s Gate + neighbor scan for hooked functionstartarus- Handles near JMP and far JMP hooksfrom_disk- Load clean ntdll from KnownDlls (bypasses all hooks)recycled- FreshyCalls + opcode validation (most resilient)hw_breakpoint- Hardware breakpoints + VEH to extract SSN
Evasion Options
See Evasion Options for detailed explanations of each technique.--obfuscate
Randomize stub ordering and inject junk instructions.
Type: Boolean flag
Default: false
Effect: Makes static analysis and signature detection harder.
Example:
--encrypt-ssn
XOR-encrypt SSN values at rest (decrypted at runtime).
Type: Boolean flag
Default: false
Effect: SSNs are encrypted in the binary and only decrypted when needed.
Example:
--stack-spoof
Include synthetic call stack frame helper.
Type: Boolean flag
Default: false
Effect: Reduces call stack anomalies that EDRs might detect.
Example:
--etw-bypass
Include user-mode ETW writer patch.
Type: Boolean flag
Default: false
Effect: Generates SW4PatchEtw() function to disable ETW event logging.
Example:
--amsi-bypass
Include AMSI bypass (patches AmsiScanBuffer).
Type: Boolean flag
Default: false
Effect: Generates SW4PatchAmsi() function to bypass AMSI scanning.
Example:
--unhook-ntdll
Include ntdll unhooking (remaps clean .text from KnownDlls).
Type: Boolean flag
Default: false
Effect: Generates SW4UnhookNtdll() function to remove userland hooks.
Example:
Call
SW4UnhookNtdll() before SW4Initialize() for best results.--anti-debug
Include anti-debugging checks.
Type: Boolean flag
Default: false
Effect: Generates SW4AntiDebugCheck() function that detects debuggers using PEB, timing, heap flags, and debug port checks.
Example:
--sleep-encrypt
Include sleep encryption (Ekko-style XOR .text during sleep).
Type: Boolean flag
Default: false
Effect: Generates SW4SleepEncrypt(ms) function that encrypts memory during sleep.
Example:
Output Options
--prefix
Prefix for all generated identifiers.
Syntax: --prefix PREFIX
Type: String
Default: SW4
Effect: All function names, types, and macros use this prefix.
Examples:
--out-file / -o
Output filename base (without extension).
Syntax: --out-file OUTFILE
Type: String
Default: <PREFIX>Syscalls (e.g., SW4Syscalls)
Examples:
--out-dir
Output directory for generated files.
Syntax: --out-dir OUTDIR
Type: Path
Default: . (current directory)
Examples:
--syscall-table
Path to custom syscall table JSON (for --resolve static).
Syntax: --syscall-table PATH
Type: Path
Default: data/syscalls_nt_x64.json (bundled)
Examples:
This option only affects
--resolve static. Run scripts/update_syscall_table.py to update the bundled table from j00ru’s repository.Utility Options
--verbose / -v
Enable verbose output.
Type: Boolean flag
Default: false
Effect: Prints detailed information during generation, including stack traces on errors.
Example:
--list-functions
Print all available function names and exit.
Type: Boolean flag
Examples:
--list-presets
Print all available presets and exit.
Type: Boolean flag
Examples:
Complete Examples
Basic Usage
Stealth Configuration
Custom Function Set
Cross-Platform
Custom Output
Quick Reference Table
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--preset | -p | String | None | Preset function set |
--functions | -f | String | None | Comma-separated function list |
--arch | -a | Choice | x64 | Target architecture |
--compiler | -c | Choice | msvc | Compiler toolchain |
--method | -m | Choice | embedded | Invocation method |
--resolve | -r | Choice | freshycalls | SSN resolution method |
--obfuscate | Flag | false | Randomize and obfuscate | |
--encrypt-ssn | Flag | false | XOR-encrypt SSNs | |
--stack-spoof | Flag | false | Spoof call stack | |
--etw-bypass | Flag | false | Include ETW bypass | |
--amsi-bypass | Flag | false | Include AMSI bypass | |
--unhook-ntdll | Flag | false | Include ntdll unhooking | |
--anti-debug | Flag | false | Include anti-debug checks | |
--sleep-encrypt | Flag | false | Include sleep encryption | |
--syscall-table | Path | data/... | Custom syscall table | |
--prefix | String | SW4 | Identifier prefix | |
--out-file | -o | String | <PREFIX>Syscalls | Output basename |
--out-dir | Path | . | Output directory | |
--verbose | -v | Flag | false | Verbose output |
--list-functions | Flag | false | List functions and exit | |
--list-presets | Flag | false | List presets and exit |
See Also
- SSN Resolution Methods - Detailed explanation of each resolution method
- Invocation Methods - Detailed explanation of each invocation method
- Evasion Options - In-depth guide to evasion techniques
- Quick Start Guide - Step-by-step tutorial
- Configuration Guide - Choosing the right options
