T1211 Google Chronicle · YARA-L

Detect Exploitation for Defense Evasion in Google Chronicle

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/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule T1211_exploitation_for_defense_evasion {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects exploitation of security software for defense evasion (T1211) via three signals: security process spawning suspicious child, non-system process accessing security process with elevated rights, and security service modification."
    mitre_attack_tactic = "Defense Evasion"
    mitre_attack_technique = "T1211"
    severity = "CRITICAL"
    priority = "HIGH"

  events:
    // Signal 1: Security software spawning suspicious child process
    (
      $e1.metadata.event_type = "PROCESS_LAUNCH"
      and (
        re.regex($e1.principal.process.file.full_path, `(?i)(MsMpEng|MsSense|SenseCncProxy|SenseIR|csagent|CSFalconService|CSFalconContainer|SentinelAgent|SentinelServiceHost|SentinelStaticEngine|CylanceSvc|CylanceUI|CbDefense|CbDefenseService|MBAMService|sophosssp|SophosSafestore|SAVService|avpui|avguard|aswBoot|AvastSvc)\.exe`)
        or re.regex($e1.principal.process.file.full_path, `(?i)(cb\.exe|avp\.exe|mbam\.exe|avgnt\.exe)`)
      )
      and (
        re.regex($e1.target.process.file.full_path, `(?i)(cmd|powershell|pwsh|wscript|cscript|mshta|rundll32|regsvr32|certutil|bitsadmin|msiexec|csc|msbuild|wmic|net|net1|sc)\.exe`)
      )
    )
    or
    // Signal 2: Non-system process accessing security process with PROCESS_ALL_ACCESS
    (
      $e1.metadata.event_type = "PROCESS_OPEN"
      and (
        re.regex($e1.target.process.file.full_path, `(?i)(MsMpEng|MsSense|SenseCncProxy|csagent|CSFalconService|SentinelAgent|CylanceSvc|cb\.exe|CbDefense|mbam|sophosssp|SAVService|avp\.exe|avgnt|AvastSvc)\.exe`)
      )
      and not (
        re.regex($e1.principal.process.file.full_path, `(?i)(System|svchost|lsass|csrss|wininit|services|smss|WerFault)\.exe`)
      )
      and (
        $e1.target.process.access_mask = "0x1F0FFF"
        or $e1.target.process.access_mask = "0x1F1FFF"
        or $e1.target.process.access_mask = "0x1fffff"
        or $e1.target.process.access_mask = "0x143A"
        or $e1.target.process.access_mask = "0x1410"
      )
    )
    or
    // Signal 3: Security service modified or stopped
    (
      $e1.metadata.event_type = "SERVICE_MODIFICATION"
      and (
        re.regex($e1.target.resource.name, `(?i)(sense|windefend|falcon|sentinelagent|cylancesvc|cbdefense|mbam|sophosssp|kaspersky|avast|avgnt)`)
      )
    )

  condition:
    $e1
}
critical severity high confidence

Chronicle YARA-L 2.0 rule detecting T1211 exploitation for defense evasion. Covers three detection signals using UDM event types: PROCESS_LAUNCH for security software spawning LOLBin or interpreter children, PROCESS_OPEN with elevated access masks against known security agent executables from non-system processes, and SERVICE_MODIFICATION for security service state changes. Uses regex matching against UDM principal/target process file paths and resource names.

Data Sources

Google Chronicle UDM (Unified Data Model)Windows Sysmon events forwarded to ChronicleWindows Security Event Logs via Chronicle ingestionEndpoint telemetry (CrowdStrike, Carbon Black, Defender for Endpoint) via Chronicle parsers

Required Tables

UDM events (process, service log types)

False Positives & Tuning

  • Security product self-update routines may spawn msiexec.exe or cmd.exe as part of package installation
  • Security orchestration or MDM platforms may open AV/EDR processes with elevated handles during health checks
  • Patch management tools restarting security services during maintenance windows will generate SERVICE_MODIFICATION events
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