Understand Syscall Invocation Methods
mainSysWhispers4 supports different ways to execute the actual syscall instruction to evade detection:
- Embedded (Direct Syscall): The
syscallinstruction is located within your own stub. At kernel entry, the Instruction Pointer (RIP) points to your PE, which can be detected by EDRs. - Indirect: The stub jumps to a
syscall;retgadget located insidentdll.dll. At kernel entry, RIP appears to be insidentdll, mimicking a legitimate API call. - Randomized Indirect: Similar to Indirect, but selects a random gadget from a pool of up to 64 gadgets in
ntdllon every call usingRDTSCfor entropy. This defeats EDR heuristics that whitelist specific gadget addresses. - Egg Hunt: The stubs contain an 8-byte random marker instead of a
syscallopcode. At startup,SW4_HatchEggs()scans the.textsection and replaces these markers with the actual0F 05opcode. This ensures nosyscallopcode exists in the binary on disk.