← Back to SOC feed Coverage →

shimcache-flushed

kql MEDIUM Azure-Sentinel
T1112
DeviceProcessEvents
evasionhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-08T11:00:00Z · Confidence: medium

Hunt Hypothesis

Attackers may attempt to flush Shimcache to remove forensic artifacts and evade detection, indicating defense evasion tactics. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential adversarial activity and prevent persistence.

KQL Query

DeviceProcessEvents
| where FileName has "Rundll32.exe"
| where ((ProcessCommandLine has_any("ShimFlushCache","BaseFlushAppcompatCache"))
or (ProcessCommandLine has_any (@"#250",@"#46") and ProcessCommandLine has_any ("apphelp.dll","kernel32.dll"))) // checking for ordinals as well

Analytic Rule Definition

id: cd90d859-0d8f-458e-9d96-7f2945fe87a6
name: shimcache-flushed
description: |
  This query searches for attempts to flush Shimcache, which may indicate anti-forensic or defense evasion activity by an attacker.
  Author: Vaasudev_Kala
  Ref: https://blueteamops.medium.com/shimcache-flush-89daff28d15e
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Defense evasion
relevantTechniques:
  - T1112
query: |
  DeviceProcessEvents
  | where FileName has "Rundll32.exe"
  | where ((ProcessCommandLine has_any("ShimFlushCache","BaseFlushAppcompatCache"))
  or (ProcessCommandLine has_any (@"#250",@"#46") and ProcessCommandLine has_any ("apphelp.dll","kernel32.dll"))) // checking for ordinals as well

Required Data Sources

Sentinel TableNotes
DeviceProcessEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Defense evasion/shimcache-flushed.yaml