Microsoft Defender protection disabled via Set-MpPreference (T1685)
XQLhighconfidence 75/100generated 2026-10-19
Set-MpPreference switching off Defender real-time, behaviour, IOAV or script scanning — commonly done right before payload delivery. Observed for: APT2, APT35, APT41, APT5, Aquatic Panda, blackbyte and 27 more.
- Correlation
- set the rule's MITRE tactic to TA0112 and technique to T1685
- Linked actors
- APT2 · APT35 · APT41 · APT5 · Aquatic Panda · blackbyte · Contagious Interview · FIN6 · Gamaredon Group · GhostEmperor · incransom · INDRIK SPIDER · Kimsuky · Lazarus Group · Medusa Group · MirrorFace · MuddyWater · Pink Sandstorm · play · Rocke · SaintBear · Scattered Spider · STARDUST CHOLLIMA · Storm-1567 · TA2541 · TA505 · TeamTNT · The Gorgon Group · Tick · Turla · UNC3886 · Velvet Ant · WIZARD SPIDER
- False positives
- Requires Set-MpPreference together with a Disable* protection switch; exclusion management alone does not match. The value is not parsed — a re-enable ($false) also matches, so review before auto-response.
XQL query
skopnix-cortex-ttp-t1685-2f7fdfea.xqldownload .xql ↓dataset = xdr_data
| filter event_type = ENUM.PROCESS and event_sub_type = ENUM.PROCESS_START
| filter lowercase(action_process_image_command_line) contains "set-mppreference" and (lowercase(action_process_image_command_line) contains "disablerealtimemonitoring" or lowercase(action_process_image_command_line) contains "disablebehaviormonitoring" or lowercase(action_process_image_command_line) contains "disableioavprotection" or lowercase(action_process_image_command_line) contains "disablescriptscanning")
| fields _time, agent_hostname, actor_effective_username, action_process_image_name, action_process_image_command_line, actor_process_image_name, causality_actor_process_image_name
| sort desc _time
How to deploy on Cortex XDR
- 1.Paste the XQL into Incident Response > Investigation > Query Builder > XQL Search.
- 2.To alert, save it as a Correlation Rule and set the MITRE tactic and technique printed with the rule.
- 3.Schedule it on the interval you hunt at; keep the fields stage for the alert's columns.
Check · CVE rules read PAN-OS URL logs (panw_ngfw_url_raw), which need the NGFW integration and, for HTTPS, decryption.
References
- attack.mitre.org/techniques/T1685/ ↗
- skopnix.com/actors/apt2 ↗
- skopnix.com/actors/apt35 ↗
- skopnix.com/actors/apt41 ↗
- skopnix.com/actors/apt5 ↗
- skopnix.com/actors/aquatic-panda ↗
- skopnix.com/actors/blackbyte ↗
- skopnix.com/actors/contagious-interview ↗
- skopnix.com/actors/fin6 ↗
- skopnix.com/actors/gamaredon-group ↗
- skopnix.com/actors/ghostemperor ↗