OPSEC by architecture

Compile-time hardening, per-build polymorphism, clean image-backed stacks across every execution path.

Evasion is not a plugin or a kit bolted onto a standard agent. In ApeX it is resolved at build time from a per-build polymorphism seed. There is no runtime initialization overhead, and no two binaries share byte-level patterns. Every feature below is a build-time flag; stealth profiles compose from them.

One seed, one unique binary

$ apex build --target win-x64 --profile stealth
   agent         zig-build
   seed          7a2c4d8e9f1b5a3e2d7f8c6b4a9e1d5c
   strings       526 encrypted, keys derived per site
   syscalls      36 stubs generated
   mba depth     variable, seed-driven
   rwx pages     0
   output        apex-win-x64-7a2c4d8e.exe
   entropy       within bounds
compiled 2.14s   1.2M

The evasion suite

CapabilityDescription
Indirect Syscalls36+ NT APIs resolved at runtime. Hook detection and recovery.
Compile-Time String EncryptionAll string literals encrypted at build time with per-string derived keys. 526+ instances. Wide string (UTF-16) support.
Mixed Boolean-Arithmetic ObfuscationConstants and arithmetic transformed into algebraically equivalent expressions. Variable depth per call site. Optimizer-resistant.
API HashingAll API resolution via compile-time hashing. No plaintext function names in the binary.
RWX-less Code ExecutionCode loading paths never create pages with simultaneous write+execute permissions. No VirtualProtect on the primary BOF path.
Sleep EncryptionCode sections and heap allocations encrypted during sleep. Metadata self-protected.
Spoofed SleepSleep call stack indistinguishable from normal thread synchronization. No timers or callbacks.
BOF API ProxyingSensitive Win32 APIs called from BOFs are intercepted and executed with clean, image-backed call stacks.
CET CompatibilityAll execution paths produce clean call stacks by architecture, not bolted on with gadgets or frame fabrication.
Threadpool ExecutionArbitrary function calls routed through OS thread pool workers for clean stack traces.
Anti-DebugMultiple indirect detection techniques that avoid the most signatured anti-debug APIs.
Anti-VMHypervisor and timing-based VM detection.
Anti-ForensicsSecure self-deletion while running.
Environmental GuardrailsDomain, username, hostname, hardware id keying. Temporal keying (activation date, working hours, days). Network keying (CIDR). Kill date. Failure triggers self-destruct.
PE Metadata SpoofingConfigurable version info fields. Randomized compilation timestamp.
SNI SpoofingTLS ClientHello hostname independent of actual C2 server.
Drip LoadingPage-by-page memory writes with configurable delays.
.rdata Entropy ManagementPrevents statistical anomalies that automated scanners flag.
AMSI BypassArchitectural. The CLR loading technique avoids the AMSI scanning path entirely. No runtime patching.
ETW EvasionPrimary code execution path generates zero NtProtectVirtualMemory EtwTI events.

Malleable communications profiles

Shape every byte that leaves the agent. ApeX profiles compose request and response payloads from chained transforms: base64, hex, rot13, prepend, append, AES-256-GCM, in any order. SNI, headers, and routes are templated in the same profile file, with a live rendered preview so you can see the wire bytes before you ship.

ApeX profile editor showing an HTTPS JSON transport profile with a chained payload transform (prepend v1, base64, append .dat) and a rendered request preview on the right

Why CET compatibility matters

CET-enabled hardware shadow-stacks every return address. Spoofing stacks with synthetic frames or gadget chains trips the shadow stack and triggers a user-mode crash. ApeX produces real image-backed stacks on every execution path, so CET is a feature it works with, not around.

Environmental guardrails

Keying options cover domain, username, hostname, hardware id, time windows, network CIDR, and kill date. Failure trigger: secure self-destruct. The agent does not run outside its box.