Skip to main content
Mallory
← Back to News
endpoint-security-bypassdetection-content-updatedefense-evasion-methodpayload-delivery-evasion

Elastic Defend Enriches Call Stacks to Expose Malware Execution Evasion

Attack Tradecraft · 3 sources · Updated 3mo ago · First seen Jun 12, 2025

Elastic Defend Enriches Call Stacks to Expose Malware Execution Evasion

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_events for 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_events emits 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
  • Unbacked final user module: private executable memory without a backing module; investigate as probable injected code or shellcode.
  • Undetermined final user module: anomalous or suspicious call-stack condition.
  • Nonzero allocation_private_bytes: can indicate code hooking, patching, process hollowing, or other private-memory modifications.
  • Unbacked protection 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!BaseThreadInitThunk
    • ntdll.dll!RtlUserThreadStart

Elastic behavior tags

  • native_api: direct Native API use rather than the Win32 API layer.
  • direct_syscall: a syscall instruction executed outside the Native API layer.
  • proxy_call: potentially proxied API invocation obscuring the actual caller, such as a timer callback invoking VirtualProtect from 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 preceding CALL, 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 through NtContinue; 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 through KernelCallbackTable manipulation.
  • RtlUserThreadStart and RtlUserFiberStart: 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_api behavior.
  • 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

  1. 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.
  2. Triage unbacked_rwx, shellcode, image_rop, direct_syscall, and truncated_stack events as high-priority execution-evasion signals, especially when the initiating process is a browser, Office application, document reader, scripting host, or internet-facing client.
  3. Investigate Unbacked or Undetermined final user modules. Correlate the process, thread, memory allocation/protection changes, loaded modules, parent process, network connections, and file/hash reputation.
  4. Enable events.callstacks.emit_in_events only for high-risk endpoint groups, investigative pilots, or time-bounded hunts. Measure endpoint, pipeline, SIEM, and retention impact before wider deployment.
  5. 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_syscall
    • proxy_call
    • shellcode
    • image_rop
    • image_rwx
    • unbacked_rwx
    • truncated_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_original present
  • Hunt for system calls or memory-protection changes where proxy_call is present and the observed callback path invokes VirtualProtect, VirtualAlloc, NtProtectVirtualMemory, or equivalent memory-management APIs.
  • Review events containing KiUserExceptionDispatcher followed by protection changes or execution from private memory; this combination is consistent with exception-mediated shellcode re-protection.
  • Review events containing KiUserApcDispatcher for user APC-based execution, particularly when the subsequent module is unbacked, unsigned, or inconsistent with the process baseline.
  • Investigate KiUserCallbackDispatcher followed by a nonstandard module for potential KernelCallbackTable manipulation 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.
Who uses this technique?Get the actors, campaigns, and ATT&CK mapping behind it.
Get the tradecraft
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

2 events
  1. Reported Jun 12, 20251y ago

    Elastic details enriched Windows call-stack telemetry in Elastic Defend

    Elastic described Elastic Defend's use of enriched user-mode Windows call stacks to identify the originating module behind dual-use and malicious behavior. The telemetry flags patterns such as direct syscalls, proxied calls, shellcode, ROP-like execution, writable executable memory, and stack-reconstruction discrepancies.

    Call Stacks: No More Free Passes For Malware
  2. Date unknown

    Endgame researchers develop and test HA-CFI exploit prevention

    Endgame researchers Cody Pierce, Matthew Spisak, and Kenneth Fitch presented HA-CFI, a hardware-assisted control-flow-integrity system using Intel PMU events and Last Branch Record data to detect and prevent control-flow hijacking on Windows and Linux. They reported testing against Metasploit modules and exploit-kit samples, including exploits for CVE-2015-2419 and CVE-2014-0515.

    Blackhat
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.

Open in app →

Affected products

1 linked
Elastic Defend

Organizations

1 linked
Elastic

Observables

3 linked

Indicator values are masked on this page. See the values in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.

Do you run this?Get the adversaries, campaigns, and ATT&CK mapping behind this technique, with detections ready to deploy.
See Who Uses This Technique
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.