Elastic Defend Enriches Call Stacks to Expose Malware Execution Evasion
Attack Tradecraft · 3 sources · Updated 3mo ago · First seen Jun 12, 2025

Elastic detailed enhanced Windows user-mode call-stack telemetry in Elastic Defend that attributes dual-use behavior to the code that initiated it. The telemetry enriches stack addresses with module exports and identifies the final user module’s path, SHA-256 hash, signature state, memory protections, and provenance, helping analysts identify direct syscalls, proxy execution, shellcode, ROP-like activity, unbacked RWX memory, and truncated or manipulated stacks. Dispatcher functions in captured stacks can also reveal early-thread execution, exception-handler abuse, APC-based execution, and GUI-thread hijacking.
The approach addresses a longstanding control-flow defense problem: ordinary stack walking reconstructs return addresses but can be misled by tail calls, trampolines, and stack manipulation. Earlier hardware-assisted CFI research, including Endgame’s HA-CFI, used Intel PMU branch-misprediction traps and Last Branch Record data to validate indirect-call targets and reported detection of ROP and ROPless exploit techniques across tested exploit samples. Elastic’s telemetry-focused implementation makes suspicious control-flow context available in endpoint alerts by default; organizations can also enable it for routine events, balancing additional visibility against increased telemetry volume.
Why it matters
Impact assessment
Elastic Defend customers running Windows endpoints gain materially better visibility into malware that conceals its execution origin through call-stack spoofing, direct syscalls, proxy execution, shellcode, ROP-like control flow, and injected or writable executable memory. This is a detection and triage enhancement rather than a newly disclosed vulnerability; no active exploitation campaign, victim set, or breach is reported.
Affected scope and consequences
- Affected environment: Windows endpoints monitored by Elastic Defend, particularly organizations relying on behavioral alerts to distinguish legitimate dual-use APIs from malicious invocation.
- Primary benefit: analysts can attribute a monitored system call or sensitive API behavior to the final user-mode module that initiated it, including executable-memory regions that lack a backing file.
- Operational consideration: call stacks are included in Elastic alerts by default. Enabling
events.callstacks.emit_in_eventsfor ordinary collected events can significantly increase endpoint telemetry and storage volume. - Coverage limitations: enriched stacks do not include kernel stack frames. Accuracy and availability of deeper execution-tracing features depend on x64 CPU support for capabilities such as Intel LBR, BTS, AET, IPT, or Architectural LBR.
- Hardware Stack Protection remains incomplete as a broad control: it requires compatible CPUs, does not support WOW64, and may not be enabled in all eligible processes. Adversaries can preferentially target unprotected processes.
Technical details
Elastic Defend enriches Windows user-mode call-stack telemetry with module-relative offsets, exported API names, and properties of the final user module. The telemetry identifies suspicious control-flow and memory-execution patterns that are commonly used to evade API-origin attribution and behavioral detections.
Entities and affected technology
- Product: Elastic Defend.
- Platform: Windows x64 endpoints.
- Optional configuration:
events.callstacks.emit_in_eventsemits call stacks in routine events. - Hardware/OS protection: Windows user-mode Hardware Stack Protection (HSP), based on Intel CET and AMD Shadow Stack support.
- HSP availability: Windows 10 20H1 onward; requires at least 11th-generation Intel CPUs or AMD Ryzen 5000-series CPUs according to the cited research; unsupported under WOW64.
Call-stack enrichment and observables
- Elastic records the final user module's:
- File path
- SHA-256 hash
- Code-signature state
- Memory protections
- Memory provenance
allocation_private_bytes
Unbackedfinal user module: private executable memory without a backing module; investigate as probable injected code or shellcode.Undeterminedfinal user module: anomalous or suspicious call-stack condition.- Nonzero
allocation_private_bytes: can indicate code hooking, patching, process hollowing, or other private-memory modifications. Unbackedprotection provenance: indicates the most recent protection change originated from unbacked memory; investigate for shellcode staging and execution.- Expected normal system-call stack termination commonly includes:
kernel32.dll!BaseThreadInitThunkntdll.dll!RtlUserThreadStart
Elastic behavior tags
native_api: direct Native API use rather than the Win32 API layer.direct_syscall: asyscallinstruction executed outside the Native API layer.proxy_call: potentially proxied API invocation obscuring the actual caller, such as a timer callback invokingVirtualProtectfrom another thread.shellcode: execution attributed to shellcode-like memory.image_indirect_call: suspicious indirect control-flow transfer from an image.image_rop: a stack entry without a precedingCALL, consistent with ROP-like execution.image_rwx: writable and executable image-backed memory.unbacked_rwx: writable and executable non-image memory.truncated_stack: incomplete or manipulated call stack.call_stack_summary_original: emitted when Elastic identifies discrepancies between stack-recovery approaches, including less reliable conventional reconstruction.
Dispatcher-function patterns
ntdll.dll!LdrInitializeThunk: execution at the start of a process or thread before normal transfer throughNtContinue; may reflect legitimate compatibility shims or security hooks, but also pre-entrypoint malware execution.ntdll.dll!KiUserExceptionDispatcher: user-mode structured exception handling. Malware can use exception dispatching as a pseudo-breakpoint to alter page protections and rehide shellcode after system calls.ntdll.dll!KiUserApcDispatcher: user APC delivery; a common execution mechanism with limited native Microsoft visibility.ntdll.dll!KiUserCallbackDispatcher: window-manager callback into user-mode functionality. A nonstandard module following this dispatcher can indicate GUI-thread hijacking throughKernelCallbackTablemanipulation.RtlUserThreadStartandRtlUserFiberStart: normal entry points expected at the bottom of a stack; unexpected placement warrants investigation.
Relevant MITRE ATT&CK techniques
- T1055, Process Injection: private executable memory, process hollowing indicators, and unbacked code execution.
- T1055.012, Process Hollowing: nonzero private allocation characteristics and altered executable-memory provenance.
- T1055.004, Asynchronous Procedure Call:
KiUserApcDispatcher-associated execution. - T1106, Native API:
native_apibehavior. - T1218, System Binary Proxy Execution: proxied invocation patterns, where relevant to the observed caller/callee chain.
- T1620, Reflective Code Loading: unbacked executable memory and shellcode-like execution.
- T1059 / T1105 are not directly established by this story and should not be inferred solely from a call-stack tag.
- T1574.013, KernelCallbackTable: GUI-thread hijacking indicated by anomalous modules after
KiUserCallbackDispatcher.
CVEs and historical research references
- No new CVE is disclosed.
- CVE-2015-2419: historical jscript9 double-free exploit case used in HA-CFI testing.
- CVE-2014-0515: historical Adobe Flash heap-overflow exploit case used in HA-CFI testing.
- No CVSS scores are provided.
- These CVEs are historical examples supporting the efficacy claims of Endgame's HA-CFI research; they are not evidence of current exposure.
Recommended response
Use enriched Elastic call-stack fields to prioritize execution originating from unbacked memory, RWX regions, direct syscalls, anomalous dispatcher paths, and inconsistent stack reconstruction. Keep call stacks enabled in alerts, deploy expanded routine-event collection selectively, and validate capacity before enabling events.callstacks.emit_in_events fleet-wide.
Priority actions
- Confirm that Elastic Defend alert ingestion retains complete call-stack enrichment, including final-user-module path, SHA-256, signature state, memory protections, provenance, and behavior tags.
- Triage
unbacked_rwx,shellcode,image_rop,direct_syscall, andtruncated_stackevents as high-priority execution-evasion signals, especially when the initiating process is a browser, Office application, document reader, scripting host, or internet-facing client. - Investigate
UnbackedorUndeterminedfinal user modules. Correlate the process, thread, memory allocation/protection changes, loaded modules, parent process, network connections, and file/hash reputation. - Enable
events.callstacks.emit_in_eventsonly for high-risk endpoint groups, investigative pilots, or time-bounded hunts. Measure endpoint, pipeline, SIEM, and retention impact before wider deployment. - Review Windows HSP deployment on compatible systems and enable it for supported high-risk applications where operationally viable. Do not treat HSP as a replacement for EDR detection because it lacks WOW64 support and may not protect every process.
Detection and hunting guidance
- Hunt for Elastic events where any of the following tags are present:
direct_syscallproxy_callshellcodeimage_ropimage_rwxunbacked_rwxtruncated_stack
- Prioritize combinations of:
final_user_module.name: "Unbacked"- Nonzero
allocation_private_bytes - Writable-executable protection on a private or unbacked region
protection_provenance: "Unbacked"- Unsigned or untrusted final user module
call_stack_summary_originalpresent
- Hunt for system calls or memory-protection changes where
proxy_callis present and the observed callback path invokesVirtualProtect,VirtualAlloc,NtProtectVirtualMemory, or equivalent memory-management APIs. - Review events containing
KiUserExceptionDispatcherfollowed by protection changes or execution from private memory; this combination is consistent with exception-mediated shellcode re-protection. - Review events containing
KiUserApcDispatcherfor user APC-based execution, particularly when the subsequent module is unbacked, unsigned, or inconsistent with the process baseline. - Investigate
KiUserCallbackDispatcherfollowed by a nonstandard module for potentialKernelCallbackTablemanipulation and GUI-thread hijacking. - Baseline expected final-user-module hashes and signer states for high-value applications. Alert when sensitive actions originate from a previously unseen, unsigned, unbacked, or RWX module.
Longer-term hardening
- Reduce exposure to executable writable memory through application-control policies, exploit-protection baselines, and review of software that legitimately creates JIT or dynamically generated code.
- Maintain an exception process for approved JIT engines and security products that may generate benign
image_rwx, callback, hook, or early-thread patterns. - Test call-stack detection fidelity across physical hardware and virtualized endpoint populations, since hardware-assisted tracing and HSP availability vary by CPU and virtualization support.


