T1562 Splunk · SPL

Detect Impair Defenses in Splunk

Adversaries may maliciously modify components of a victim environment in order to hinder or disable defensive mechanisms. This not only involves impairing preventative defenses, such as firewalls and anti-virus, but also detection capabilities that defenders can use to audit activity and identify malicious behavior. This may span both native defenses as well as supplemental capabilities installed by users and administrators. Adversaries may also impair routine operations that contribute to defensive hygiene, such as blocking users from logging out, preventing a system from shutting down, or disabling or modifying the update process.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1562 Impair Defenses
Canonical reference
https://attack.mitre.org/techniques/T1562/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1) OR (sourcetype="WinEventLog:System" EventCode IN (7036, 7040, 7045)) OR (sourcetype="WinEventLog:Security" EventCode IN (1102, 4719))
| eval action=case(
    EventCode==1 AND match(CommandLine, "(?i)(sc\s+(stop|config)|net\s+stop|taskkill).*(WinDefend|Sense|MsMpSvc|SecurityHealth|EventLog|MpsSvc)"), "service_tampering",
    EventCode==1 AND match(CommandLine, "(?i)(auditpol\s+/(clear|set)|wevtutil\s+cl)"), "log_tampering",
    EventCode==1 AND match(CommandLine, "(?i)(Set-MpPreference|DisableRealtimeMonitoring|DisableBehaviorMonitoring)"), "defender_modification",
    EventCode==1 AND match(CommandLine, "(?i)(bcdedit\s+/set\s+.*safeboot|netsh\s+advfirewall)"), "boot_or_firewall",
    EventCode==1102, "log_cleared",
    EventCode==4719, "audit_policy_changed",
    EventCode==7036 OR EventCode==7040, "service_state_change",
    true(), null())
| where isnotnull(action)
| table _time, host, User, EventCode, action, CommandLine, Message
| sort - _time
high severity medium confidence

Comprehensive defense impairment detection using Sysmon process creation, System service events, and Security audit events. Categorizes impairment actions into service tampering, log tampering, Defender modification, boot/firewall changes, log clearing (1102), and audit policy changes (4719).

Data Sources

Process: Process CreationWindows Event Log: SystemWindows Event Log: SecuritySysmon Event ID 1

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/OperationalWinEventLog:SystemWinEventLog:Security

False Positives & Tuning

  • IT administrators performing legitimate maintenance or reconfiguration of security tools during planned change windows
  • Endpoint management tools (SCCM, Intune, GPO) updating Defender exclusions or policies
  • Security tool upgrades that temporarily stop and restart services
Download portable Sigma rule (.yml)

Other platforms for T1562


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Stop Windows Defender Service

    Expected signal: Sysmon Event ID 1: Process Create with CommandLine 'sc stop WinDefend'. System Event ID 7036: Windows Defender Antivirus Service entered the stopped state. Security Event ID 4688 if command line auditing enabled.

  2. Test 2Clear Security Event Log

    Expected signal: Security Event ID 1102: The audit log was cleared. Sysmon Event ID 1: Process Create with CommandLine 'wevtutil cl Security'.

  3. Test 3Disable Audit Policy

    Expected signal: Security Event ID 4719: System audit policy was changed. Sysmon Event ID 1: Process Create with CommandLine 'auditpol /clear /y'.

Unlock Pro Content

Get the full detection package for T1562 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections