Detect Exploitation for Defense Evasion in CrowdStrike LogScale
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/
LogScale Detection Query
// Signal 1: Security software spawning suspicious child process
#event_simpleName=ProcessRollup2
| ParentBaseFileName = /(?i)(MsMpEng|MsSense|SenseCncProxy|SenseIR|csagent|CSFalconService|CSFalconContainer|SentinelAgent|SentinelServiceHost|SentinelStaticEngine|CylanceSvc|CylanceUI|cb\.exe|CbDefense|CbDefenseService|mbam|MBAMService|sophosssp|SophosSafestore|SAVService|avp\.exe|avpui|avgnt|avguard|aswBoot|AvastSvc)\.exe/i
| FileName = /(?i)(cmd|powershell|pwsh|wscript|cscript|mshta|rundll32|regsvr32|certutil|bitsadmin|msiexec|csc|msbuild|wmic|net|net1|sc)\.exe/i
| groupBy([ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, ParentCommandLine], function=count(aid, as=EventCount))
| eval DetectionSignal = "SecuritySoftwareSpawnedSuspiciousChild"
| sort(EventCount, order=desc)
// Signal 2: Non-system process accessing security process with PROCESS_ALL_ACCESS (ProcessAccess Sysmon-like)
// Requires Falcon ProcessAccessEvent or UserIdentity correlation
// Uncomment and run separately if ProcessAccess events are ingested:
// #event_simpleName=ProcessAccess
// | TargetImageFileName = /(?i)(MsMpEng|MsSense|SenseCncProxy|csagent|CSFalconService|SentinelAgent|CylanceSvc|cb\.exe|CbDefense|mbam|sophosssp|SAVService|avp\.exe|avgnt|AvastSvc)\.exe/i
// | SourceImageFileName != /(?i)(System|svchost|lsass|csrss|wininit|services|smss|WerFault)\.exe/i
// | GrantedAccess in ("0x1F0FFF","0x1F1FFF","0x1fffff","0x143A","0x1410")
// | groupBy([ComputerName, SourceImageFileName, TargetImageFileName, GrantedAccess], function=count(aid, as=EventCount))
// | eval DetectionSignal = "SuspiciousAccessToSecurityProcess"
// Signal 3: Security service termination via ServiceControl events
// #event_simpleName=ServiceActivityEvent OR #event_simpleName=ServiceStopRequest
// | ServiceDisplayName = /(?i)(sense|windefend|falcon|sentinelagent|cylancesvc|cbdefense|mbam|avast|sophosssp)/i
// | groupBy([ComputerName, ServiceDisplayName, ServiceState, UserName], function=count(aid, as=EventCount))
// | eval DetectionSignal = "SecurityServiceModifiedOrStopped" CrowdStrike LogScale (CQL) query detecting T1211 defense evasion exploitation. Primary signal uses ProcessRollup2 events to identify known AV/EDR parent processes spawning LOLBin or interpreter children. Additional signals (commented) cover ProcessAccess events with elevated access masks against security processes, and ServiceActivityEvent/ServiceStopRequest events matching known security service names. Run as three separate saved searches or a union dashboard panel.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate AV engine updates may spawn msiexec.exe or cmd.exe as part of signature package installation workflows
- CrowdStrike RTR (Real Time Response) sessions may spawn cmd.exe or powershell.exe from sensor-related processes during analyst-initiated investigations
- Vendor-provided health check or diagnostic utilities may temporarily access AV/EDR processes during troubleshooting
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.
- 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.
- 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.
- 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.
- 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.
References (9)
- https://attack.mitre.org/techniques/T1211/
- https://www.bleepingcomputer.com/news/security/hackers-exploited-salesforce-zero-day-in-facebook-phishing-attack/
- https://securitylabs.datadoghq.com/articles/bypass-cloudtrail-aws-service-catalog-and-other/
- https://www.bleepingcomputer.com/news/security/ghosttoken-gcp-flaw-let-attackers-backdoor-google-accounts/
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceevents-table
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1211/T1211.md
- https://www.bitdefender.com/blog/labs/apt28-targets-ongoing-conflict-ukraine/
- https://learn.microsoft.com/en-us/windows/win32/procthread/process-security-and-access-rights
Unlock Pro Content
Get the full detection package for T1211 including response playbook, investigation guide, and atomic red team tests.