T1211 Splunk · SPL

Detect Exploitation for Defense Evasion in Splunk

Adversaries may exploit a system or application vulnerability to bypass security features. Exploitation of a vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. Vulnerabilities may exist in defensive security software that can be used to disable or circumvent them. Adversaries may have prior knowledge through reconnaissance that security software exists within an environment or they may perform checks during or shortly after the system is compromised for Security Software Discovery. There have also been examples of vulnerabilities in public cloud infrastructure and SaaS applications that may bypass defense boundaries, evade security logs, or deploy hidden infrastructure.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1211 Exploitation for Defense Evasion
Canonical reference
https://attack.mitre.org/techniques/T1211/

SPL Detection Query

Splunk (SPL)
spl
| union
(
  search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  | eval SecurityParent=if(match(ParentImage, "(?i)(MsMpEng|MsSense|SenseCncProxy|csagent|CSFalconService|SentinelAgent|CylanceSvc|cb\.exe|CbDefense|mbam|sophosssp|SAVService|avp\.exe|avgnt|AvastSvc)"), 1, 0)
  | eval SuspiciousChild=if(match(Image, "(?i)(cmd\.exe|powershell\.exe|pwsh\.exe|wscript\.exe|cscript\.exe|mshta\.exe|rundll32\.exe|regsvr32\.exe|certutil\.exe|bitsadmin\.exe|msiexec\.exe|csc\.exe|msbuild\.exe|wmic\.exe)"), 1, 0)
  | where SecurityParent=1 AND SuspiciousChild=1
  | eval DetectionSignal="SecuritySoftwareSpawnedSuspiciousChild"
  | table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, DetectionSignal
)
(
  search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=10
  | eval TargetIsSecurity=if(match(TargetImage, "(?i)(MsMpEng|MsSense|SenseCncProxy|csagent|CSFalconService|SentinelAgent|CylanceSvc|cb\.exe|CbDefense|mbam|sophosssp|SAVService|avp\.exe|avgnt|AvastSvc)"), 1, 0)
  | eval SourceIsSystem=if(match(SourceImage, "(?i)(System|svchost\.exe|lsass\.exe|csrss\.exe|wininit\.exe|services\.exe|smss\.exe|WerFault\.exe)"), 1, 0)
  | where TargetIsSecurity=1 AND SourceIsSystem=0
  | eval HighPrivilegeAccess=if(match(GrantedAccess, "(0x1F0FFF|0x1F1FFF|0x143A|0x1410|0x1fffff)"), 1, 0)
  | eval DetectionSignal="SuspiciousAccessToSecurityProcess"
  | table _time, host, SourceImage, SourceCommandLine, TargetImage, GrantedAccess, HighPrivilegeAccess, DetectionSignal
)
(
  search index=wineventlog sourcetype="WinEventLog:System" (EventCode=7034 OR EventCode=7035 OR EventCode=7036 OR EventCode=7045)
  | eval ServiceNameLower=lower(ServiceName)
  | eval IsSecurityService=if(match(ServiceNameLower, "(sense|windefend|falcon|sentinelagent|cylancesvc|cbdefense|mbam|sophosssp|kaspersky|avast|avgnt)"), 1, 0)
  | where IsSecurityService=1
  | eval DetectionSignal="SecurityServiceModifiedOrStopped"
  | table _time, host, ServiceName, EventCode, Message, DetectionSignal
)
| sort - _time
critical severity medium confidence

Detects exploitation of defensive security software using three Sysmon and Windows event signals: (1) Sysmon Event ID 1 (Process Create) where security software is the parent process and spawned child is a known LOLBin or script interpreter; (2) Sysmon Event ID 10 (Process Access) where non-system processes open handles to security software processes, particularly with high-privilege access rights; (3) Windows System Event IDs 7034/7035/7036/7045 indicating security service crashes, state changes, or unexpected new service installations. The union of these signals provides layered coverage.

Data Sources

Process: Process CreationProcess: Process AccessService: Service ModificationSysmon Event ID 1Sysmon Event ID 10Windows System Event Log

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/OperationalWinEventLog:System

False Positives & Tuning

  • Security software self-update processes legitimately spawn cmd.exe or msiexec.exe during patch installation
  • IT management and RMM tools (ConnectWise, Kaseya, TeamViewer) may access security processes during managed operations
  • Antivirus vendors' own diagnostic and support utilities trigger process access events against their parent service
  • Windows Error Reporting (WerFault.exe) opens handles to any crashed process — security software included — during crash dump collection
  • Service Control Manager legitimate service state transitions (7035/7036) during normal startup/shutdown sequences
Download portable Sigma rule (.yml)

Other platforms for T1211


Testing Methodology

Validate this detection against 4 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 1Simulate Security Process Spawning Command Shell

    Expected signal: Sysmon Event ID 1: Process Create with Image=cmd.exe, ParentImage=powershell.exe (or the process running the test). Security Event ID 4688 if command line auditing is enabled. The detection signal 'SecuritySoftwareSpawnedSuspiciousChild' may not fire unless the initiating process name matches the security process list — use this test to validate the detection logic by temporarily adding 'powershell.exe' to the SecurityProcesses list in a test environment.

  2. Test 2Open Handle to Windows Defender Process (ProcessAccess Simulation)

    Expected signal: Sysmon Event ID 10 (ProcessAccess): SourceImage=powershell.exe, TargetImage=C:\ProgramData\Microsoft\Windows Defender\Platform\<version>\MsMpEng.exe, GrantedAccess=0x0400. Note: Windows Defender is Protected Process Light (PPL) — the OpenProcess call may be denied, but Sysmon still logs the attempt with CallTrace data showing the call stack.

  3. Test 3Security Service State Query and Stop Simulation (Non-Destructive)

    Expected signal: Sysmon Event ID 1: Process Create for cmd.exe with CommandLine containing 'sc query WinDefend' and 'sc query Sense'. Security Event ID 4688 (if enabled). Sysmon Event ID 1 for wmic.exe with CommandLine containing 'service where name'. These are the same reconnaissance commands used by threat actors (including APT28 tooling) to identify security software before exploitation.

  4. Test 4Exploit Artifact Simulation — Security Service Crash via WerFault

    Expected signal: Sysmon Event ID 1: Process Create for werfault.exe with command line containing '-p 0'. Application Event Log queries via wevtutil generate additional Sysmon Event ID 1 entries for wevtutil.exe. The WerFault invocation with PID 0 will fail but the process creation telemetry is generated and matches patterns seen when security software is exploited and crashes.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections