
Summary
Detects Windows PowerShell Script Block Logging (EventCode 4104) usage that enumerates or reads browser cache directories to identify browser cache smuggling attempts. The analyst looks for ScriptBlockText containing common PowerShell data-access patterns (Copy-Item, Get-ChildItem, Get-Content, ReadAllBytes/ReadAllText/ReadBytes, Select-String, WriteAllBytes) alongside cache-specific indicators (Cache_Data, cache2entries). The rule derives a cache_family (Firefox, Chrome, Edge, Brave, Chromium) from the script content and associated cache path patterns, and only triggers when a known browser cache family is identified. It normalizes destination and user fields, then aggregates by ScriptBlockId, ProcessID, and signature, outputting first/last seen times and contextual details for investigation. The goal is to detect cache-based techniques used to exfiltrate or stage malicious content (e.g., cache smuggling) via PowerShell Script Block logging, without relying on static payload names. The analytic supports incident response by surfacing the involved host, user, and PowerShell block details for rapid triage. Known false positives include legitimate administrative or troubleshooting activity that inspects browser caches. Implementation requires enabling PowerShell Script Block Logging on endpoints. MITRE mappings include T1059.001 (PowerShell), and related techniques T1105 and T1027.006.}
Categories
- Endpoint
Data Sources
- Script
ATT&CK Techniques
- T1059
- T1105
- T1027
- T1059.001
- T1027.006
Created: 2026-11-16