Skip to main content

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: Examples:

--functions / -f

Specify individual NT function names. Syntax: --functions FUNC[,FUNC,...] Type: String (comma-separated list) Examples:
You can combine --preset and --functions to add extra functions to a preset:

Target Configuration

--arch / -a

Target processor architecture. Syntax: --arch ARCH Type: Choice Default: x64 Choices:
  • x64 - 64-bit Windows (most common)
  • x86 - 32-bit Windows
  • wow64 - 32-bit process on 64-bit Windows
  • arm64 - ARM64 Windows
Examples:

--compiler / -c

Target compiler toolchain. Syntax: --compiler COMPILER Type: Choice Default: msvc Choices:
  • msvc - Microsoft Visual C++ with MASM assembler (generates .asm file)
  • mingw - MinGW with GAS inline assembly
  • clang - Clang with GAS inline assembly
Examples:
MSVC generates a separate .asm file that requires MASM to be enabled in your project.MinGW/Clang use inline assembly in C files. Compile with -masm=intel flag.

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 ntdll
  • randomized - Jump to random syscall;ret gadget per call
  • egg - Egg marker replaced at runtime (no static syscall bytes)
Examples:

--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 time
  • hells_gate - Read SSN from ntdll stub (fails if hooked)
  • halos_gate - Hell’s Gate + neighbor scan for hooked functions
  • tartarus - Handles near JMP and far JMP hooks
  • from_disk - Load clean ntdll from KnownDlls (bypasses all hooks)
  • recycled - FreshyCalls + opcode validation (most resilient)
  • hw_breakpoint - Hardware breakpoints + VEH to extract SSN
Examples:

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:
ETW bypass is for authorized testing only. Use responsibly.

--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:
Sample output:

--list-presets

Print all available presets and exit. Type: Boolean flag Examples:
Sample output:

Complete Examples

Basic Usage

Stealth Configuration

Custom Function Set

Cross-Platform

Custom Output

Quick Reference Table

See Also