# From 88 lines to 1: Detecting DLL hijacking with Elastic Defend

DevFeed: [From 88 lines to 1: Detecting DLL hijacking with Elastic Defend](<https://devfeed.tech/articles/from-88-lines-to-1-detecting-dll-hijacking-with-elastic-defend-49019.md>)

Original publisher: [Read original article](<https://www.elastic.co/security-labs/threat-command/dll-search-order-hijacking-elastic-defend>)

Author: Ian Garratt,Tamás Péter

Published: 2026-08-28T00:00:00Z

Content type: article

Language: en

Sources: [Elastic Security Labs](<https://devfeed.tech/sources/elastic-security-labs.md>)

Topics: [DLL hijacking](<https://devfeed.tech/topics/dll-hijacking.md>), [ClickFix](<https://devfeed.tech/topics/clickfix.md>), [Endpoint Security & XDR](<https://devfeed.tech/topics/endpoint-security-xdr.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [Microsoft](<https://devfeed.tech/topics/microsoft.md>), [native aot](<https://devfeed.tech/topics/native-aot.md>), [.NET](<https://devfeed.tech/topics/net.md>)

Tags: [clickfix](<https://devfeed.tech/tags/clickfix.md>), [detection-engineering](<https://devfeed.tech/tags/detection-engineering.md>), [dll](<https://devfeed.tech/tags/dll.md>), [dll-hijacking](<https://devfeed.tech/tags/dll-hijacking.md>), [edr](<https://devfeed.tech/tags/edr.md>), [nativeaot](<https://devfeed.tech/tags/nativeaot.md>), [net](<https://devfeed.tech/tags/net.md>), [privilege-escalation](<https://devfeed.tech/tags/privilege-escalation.md>), [windows](<https://devfeed.tech/tags/windows.md>)

## AI overview

Elastic describes how Elastic Defend 9.5.0 detects DLL search-order hijacking, including a ClickFix campaign that sideloaded a malicious mscoree.dll beside a signed Microsoft binary. The team recreated the attack with a NativeAOT .NET library and observed the load being flagged.

## Source excerpt

The ClickFix campaign that sideloads a malicious mscoree.dll also ships a driver to kill Elastic Endpoint. We rebuilt that DLL as a NativeAOT library, dropped it beside a signed Microsoft binary, and Elastic Defend 9.5.0 flagged the load.