← Lab /Security & privacy

Elastic Defend 9.5.0 detects DLL hijacking with a single-field rule

Elastic Defend 9.5.0 can detect DLL search-order hijacking using a single enrichment field, eliminating the need for complex multi-line rules.

Security & privacy Elastic Security Labs 28 Aug 2026 Defense Deployed evidence

Published as “From 88 lines to 1: Detecting DLL hijacking with Elastic Defend”

Why it matters

The new enrichment dramatically simplifies writing reliable DLL hijacking detections, reducing rule maintenance effort and potential for errors.

Summary

The authors rebuilt a malicious mscoree.dll as a NativeAOT library and placed it beside a signed Microsoft binary, triggering Elastic Defend 9.5.0 to flag the load as DLL Hijack: Masquerading. They compare the new detection field to the previous approach that required ~88 rule lines covering 2,600 libraries and multiple exclusions. The evidence is based on a single emulated attack and shows the rule now consists of one line, simplifying detection creation. They also discuss tuning considerations and false-positive mitigation.

What they found 1

  1. Elastic Defend 9.5.0 detects DLL search-order hijacking with a single enrichment field

    “Elastic Defend 9.5.0 detects dynamic link library (DLL) search-order hijacking [1] in a single field.”

Caveats 5

  • The authors note that detection still requires tuning to avoid false positives from legitimate software that ships private copies of system-named DLLs.
  • They state that the enrichment removes much of the rule-side complexity, but local prevalence should still be validated and exclusions may be needed.
  • Detection may generate false positives for legitimate applications that load private copies of system-named DLLs.
  • Tuning is required to combine signature, path, and timing signals for high fidelity.
  • Evaluation is based on a single reconstructed campaign, not a broad telemetry set.

What’s new here 4

  • Elastic Defend 9.5.0 adds a dll.Ext.defense_evasions enrichment field for DLL hijacking.
  • Detection rule size reduced from ~88 lines to a single expression.
  • The field automatically handles library name, path exclusions, signature checks, and timing.
  • Provides a concrete example using a rebuilt NativeAOT DLL to validate the detection.