T1564.012 IBM QRadar · QRadar

Detect File/Path Exclusions in IBM QRadar

Adversaries may attempt to hide their file-based artifacts by writing them to specific folders or file names excluded from antivirus (AV) scanning and other defensive capabilities. AV and other file-based scanners often include exclusions to optimize performance as well as ease installation and legitimate use of applications. These exclusions may be contextual or hardcoded strings referencing specific folders and files assumed to be trusted. Adversaries typically perform a discovery phase first — enumerating existing exclusion paths via registry queries or Get-MpPreference — then stage payloads precisely in those excluded locations to bypass real-time scanning. Turla has been documented placing LunarWeb implant files in AV-excluded directories as part of long-term persistence operations against diplomatic targets.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1564 Hide Artifacts
Sub-technique
T1564.012 File/Path Exclusions
Canonical reference
https://attack.mitre.org/techniques/T1564/012/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') as EventTime,
  logsourcename(logsourceid) as LogSource, username as User,
  "TargetObject" as RegistryKey, "Image" as ProcessImage,
  "CommandLine" as CommandLine,
  CASE WHEN "TargetObject" ILIKE '%Windows Defender%Exclusions%Paths%' THEN 10
       WHEN "CommandLine" ILIKE '%Add-MpPreference%' THEN 9
       WHEN "TargetObject" ILIKE '%DisableRealtimeMonitoring%' THEN 9
       ELSE 6 END as RiskScore
FROM events
WHERE (
  (eventid IN (13,14) AND (
    "TargetObject" ILIKE '%Windows Defender%Exclusions%' OR
    "TargetObject" ILIKE '%DisableRealtimeMonitoring%' OR
    "TargetObject" ILIKE '%DisableAntiSpyware%'))
  OR (eventid IN (1, 4688) AND (
    "CommandLine" ILIKE '%Add-MpPreference%' AND
    ("CommandLine" ILIKE '%-ExclusionPath%' OR "CommandLine" ILIKE '%-ExclusionExtension%'
     OR "CommandLine" ILIKE '%-ExclusionProcess%')))
)
ORDER BY RiskScore DESC, EventTime DESC
high severity medium confidence

Detects AV/EDR exclusion additions via registry and PowerShell commands in QRadar.

Data Sources

Windows SysmonWindows Security Event Log

Required Tables

events

False Positives & Tuning

  • Windows Update agent (wuauclt.exe, WUDFHost.exe) legitimately writes executables and packages to SoftwareDistribution during patch download cycles
  • Software installers (msiexec.exe) extracting temporary payload files to %TEMP% or %LOCALAPPDATA%\Temp during installation sequences
  • Security vendors and EDR agents writing their own components to directories they have self-excluded for performance — especially during product updates
  • Developer CI/CD pipelines and build tools that output compiled binaries to %TEMP% directories configured as AV exclusions to speed up builds
  • SCCM or Intune distribution agents staging software packages in excluded directories before deployment execution
Download portable Sigma rule (.yml)

Other platforms for T1564.012


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 1Enumerate Windows Defender Exclusion Paths via Registry Query

    Expected signal: Security Event ID 4657 (if SACL auditing is configured on Defender exclusion keys): ObjectName matching 'Windows Defender\Exclusions', ProcessName=reg.exe. DeviceRegistryEvents in MDE: ActionType=RegistryKeyQueried, RegistryKey containing 'Windows Defender\Exclusions', InitiatingProcessFileName=reg.exe. Sysmon Event ID 1: Process Create with Image=reg.exe and CommandLine containing 'Windows Defender\Exclusions\Paths'.

  2. Test 2Enumerate Defender Exclusions via PowerShell Get-MpPreference and Stage Payload

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe and CommandLine containing 'Get-MpPreference'. PowerShell ScriptBlock Log Event ID 4104: Full script captured including Get-MpPreference call and Set-Content file write. DeviceRegistryEvents in MDE: RegistryValueRead on Defender exclusion paths by powershell.exe. Sysmon Event ID 11: FileCreate for argus-t1564012-test.ps1 in the exclusion path with Image=powershell.exe.

  3. Test 3Stage Executable Payload in Windows SoftwareDistribution (Default AV Exclusion)

    Expected signal: Sysmon Event ID 11: FileCreate with TargetFilename=C:\Windows\SoftwareDistribution\argus-t1564012-payload.exe and Image=cmd.exe. DeviceFileEvents in MDE: ActionType=FileCreated, FolderPath containing 'SoftwareDistribution', FileName=argus-t1564012-payload.exe, InitiatingProcessFileName=cmd.exe. SHA256 will match notepad.exe (benign hash) but the location is anomalous — demonstrates why path-based detection is essential for this technique.

  4. Test 4Execute Staged Payload from Exclusion Path (Full Attack Chain Validation)

    Expected signal: Sysmon Event ID 11: FileCreate for argus-t1564012-exec.ps1 in C:\Windows\Temp with Image=cmd.exe. Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine referencing C:\Windows\Temp\argus-t1564012-exec.ps1, ParentImage=cmd.exe. PowerShell ScriptBlock Log Event ID 4104: Captures the script content. DeviceProcessEvents in MDE: FolderPath=C:\Windows\Temp, FileName=powershell.exe, ProcessCommandLine containing 'argus-t1564012-exec.ps1'.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections