Detection: Windows Defender MpClient.dll Loaded by Non-Defender Process

Description

The following analytic detects mpclient.dll, the Windows Defender client API library, being loaded by a process that is not part of the Windows Defender platform. mpclient.dll exposes the API surface used to drive on-demand Defender scans (IOAV, MpScan). In the ShieldBreak exploit, the attacker binary loads mpclient.dll directly and calls its scan APIs against an object-manager path in order to trigger a Defender scan against attacker-controlled content as part of a race condition targeting Defender's placeholder-hydration behavior. If confirmed malicious, this activity indicates an attempt to weaponize Windows Defender's own scanning pipeline for local privilege escalation.

 1
 2| tstats `security_content_summariesonly`
 3  count min(_time) as firstTime
 4        max(_time) as lastTime
 5from datamodel=Endpoint.Processes where
 6
 7Processes.loaded_file="mpclient.dll"
 8NOT Processes.user IN ("* SERVICE", "SYSTEM")
 9NOT Processes.process_path="*\MpCmdRun.exe"
10Processes.process_path IN (
11    "*:\\AppData\\Local\\Temp\\*",
12    "*:\\Perflogs\\*",
13    "*:\\ProgramData\\*",
14    "*:\\Temp\\*",
15    "*:\\Users\\*",
16    "*:\\Windows\\Tasks\\*"
17)
18by Processes.action Processes.dest Processes.original_file_name Processes.parent_process
19   Processes.parent_process_exec Processes.parent_process_guid Processes.parent_process_id
20   Processes.parent_process_name Processes.parent_process_path Processes.loaded_file Processes.process
21   Processes.process_exec Processes.process_guid Processes.process_hash Processes.process_id
22   Processes.process_integrity_level Processes.process_name Processes.process_path
23   Processes.user Processes.user_id Processes.vendor_product
24
25
26| `drop_dm_object_name(Processes)`
27
28| `security_content_ctime(firstTime)`
29
30| `security_content_ctime(lastTime)`
31
32| `windows_defender_mpclient_dll_loaded_by_non_defender_process_filter`

Data Source

Name Platform Sourcetype Source
Sysmon EventID 7 Windows icon Windows 'XmlWinEventLog' 'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational'

Macros Used

Name Value
security_content_ctime convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$)
windows_defender_mpclient_dll_loaded_by_non_defender_process_filter search *
windows_defender_mpclient_dll_loaded_by_non_defender_process_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1068 Exploitation for Privilege Escalation Privilege Escalation
Exploitation
DE.AE
CIS 10

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Finding (Notable) No
Creates Intermediate Finding (Risk Event) Yes
Anomaly detections generate Intermediate Findings (Risk Events). They do not generate a Finding (Notable) directly.

Implementation

To successfully implement this search, you need to be ingesting logs with the driver/module loaded from your endpoints. If you are using Sysmon, configuration must explicitly include image loading events targeting mpclient.dll.

Known False Positives

Third-party security products or custom AV-integration tooling that legitimately calls into the Defender client API may load mpclient.dll outside the Defender platform directories. Filter as necessary for your environment.

Associated Analytic Story

Intermediate Findings

Message Entity Field Entity Type Risk Score
The [$loaded_file$] DLL was loaded by a suspicious process [$process_path$] on [$dest$] dest system 20

Threat Objects

Field Type
process_path file_path

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset XmlWinEventLog:Microsoft-Windows-Sysmon/Operational XmlWinEventLog
Integration ✅ Passing Dataset XmlWinEventLog:Microsoft-Windows-Sysmon/Operational XmlWinEventLog

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub |

Version: 1