| ID | Technique | Tactic |
|---|---|---|
| T1005 | Data from Local System | Collection |
| T1027.006 | HTML Smuggling | Stealth |
| T1105 | Ingress Tool Transfer | Command and Control |
Detection: Windows Non Browser Process Access Browser Cache Dir
Description
This analytic detects non-browser processes accessing files in local browser cache directories using Windows Security EventCode 4663. A script or utility reading Firefox, Chrome, Edge, Brave, or Chromium cache entries may be extracting web-delivered content for staging or execution.
Search
1`wineventlog_security`
2EventCode=4663
3ObjectType="File"
4ObjectName IN (
5 "*\\Mozilla\\Firefox\\Profiles\\*\\cache2\\entries\\*",
6 "*\\User Data\\*\\Cache\\Cache_Data\\*"
7)
8NOT ProcessName IN (
9 "*:\\Program Files (x86)\\*",
10 "*:\\Program Files\\*",
11 "*:\\Users\\*\\AppData\\Local\\*",
12)
13NOT ProcessName IN (
14 "*\\360se.exe",
15 "*\\arc.exe",
16 "*\\atlas.exe",
17 "*\\avastbrowser.exe",
18 "*\\avgbrowser.exe",
19 "*\\blpbrowser.exe",
20 "*\\brave.exe",
21 "*\\braveupdate.exe",
22 "*\\browser.exe",
23 "*\\chrome.exe",
24 "*\\chromium.exe",
25 "*\\coccoc.exe",
26 "*\\comet.exe",
27 "*\\dragon.exe",
28 "*\\duckduckgo.exe",
29 "*\\firefox.exe",
30 "*\\ghost.exe",
31 "*\\iexplore.exe",
32 "*\\iridium.exe",
33 "*\\iron.exe",
34 "*\\maxthon.exe",
35 "*\\microsoftedge.exe",
36 "*\\microsoftedgeupdate.exe",
37 "*\\msedge.exe",
38 "*\\msedgewebview2.exe",
39 "*\\opera_autoupdate.exe",
40 "*\\opera.exe",
41 "*\\perplexity.exe",
42 "*\\rave.exe",
43 "*\\safari.exe",
44 "*\\shift.exe",
45 "*\\sidekick.exe",
46 "*\\thorium.exe",
47 "*\\torch.exe",
48 "*\\vivaldi.exe",
49 "*\\waterfox.exe",
50 "*\\wavebrowser.exe",
51 "*\\whale.exe",
52 "*\\zen.exe"
53 )
54
55
56| eval cache_path=lower(ObjectName)
57
58
59| eval cache_family=case(
60 like(cache_path, "%\\mozilla\\firefox\\profiles\\%\\cache2\\entries\\%"), "Firefox",
61 like(cache_path, "%\\google\\chrome\\user data\\%\\cache\\cache_data\\%"), "Chrome",
62 like(cache_path, "%\\microsoft\\edge\\user data\\%\\cache\\cache_data\\%"), "Edge",
63 like(cache_path, "%\\bravesoftware\\brave-browser\\user data\\%\\cache\\cache_data\\%"), "Brave",
64 like(cache_path, "%\\user data\\%\\cache\\cache_data\\%"), "Chromium"
65)
66
67
68| stats count min(_time) as firstTime
69 max(_time) as lastTime
70 values(cache_family) as cache_family
71 values(AccessMask) as AccessMask
72
73 by ObjectName ObjectType ProcessName EventCode dest
74
75
76| `security_content_ctime(firstTime)`
77
78| `security_content_ctime(lastTime)`
79
80| `windows_non_browser_process_access_browser_cache_dir_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Windows Event Log Security 4663 | 'XmlWinEventLog' |
'XmlWinEventLog:Security' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| windows_non_browser_process_access_browser_cache_dir_filter | search * |
windows_non_browser_process_access_browser_cache_dir_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Finding (Notable) | No |
| Creates Intermediate Finding (Risk Event) | Yes |
Implementation
To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663. For 4663, enable "Audit Object Access" in Group Policy. Then check the two boxes listed for both "Success" and "Failure." and configure a System Access Control List (SACL) on each monitored directory.
Known False Positives
Endpoint security products, backup utilities, forensic tools, and browser cleanup utilities may access cache files. Review the process path, user, access mask, and nearby process or file events; tune known maintenance tools as needed.
Associated Analytic Story
Intermediate Findings
| Message | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| Non-browser process [$ProcessName$] accessed the [$cache_family$] browser cache path [$ObjectName$] on [$dest$]. | dest | system | 20 |
Threat Objects
| Field | Type |
|---|---|
| ProcessName | process |
References
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | XmlWinEventLog:Security |
XmlWinEventLog |
| Integration | ✅ Passing | Dataset | XmlWinEventLog:Security |
XmlWinEventLog |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 1