[Osquery_manager] Shellbags artifact saved query #16066
Open
+66
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Windows Shellbags Artifact
Windows Shellbags provide critical forensic evidence of user directory access patterns through Windows Explorer. This artifact tracks folder browsing history, including directories accessed via mapped network drives, USB devices, and local folders. Shellbags persist even after files or folders are deleted, making them invaluable for investigating user behavior, lateral movement, and data exfiltration activities.
Read https://p.elstc.co/paste/8mcHsmyg#Ab4Xl7T57kn-7xX9HdNGxhcjVojZGF4zD7Td9PxebNy
Core Forensic Artifacts Coverage
Queries by Platform
🪟 Windows - Shellbags User Activity Analysis
Description
Collects Windows Shellbags data to identify directories accessed via Windows Explorer, providing visibility into user folder browsing patterns. This query extracts critical forensic artifacts including user SIDs, registry hive sources, directory paths, file system timestamps, and MFT references for comprehensive user activity investigation.
Result
Query results provide a chronologically ordered view of all directories accessed by users on the system. Each entry includes the user SID, registry source location, full path, three timestamps (modified, created, accessed), and MFT reference numbers. Results are sorted by most recent modification time, enabling rapid identification of current user activity and historical browsing patterns.
Platform
windowsInterval
3600seconds (1 hour)Query ID
shellbags_windows_elasticECS Field Mappings
user.id→sidregistry.hive→sourcefile.path→pathfile.mtime→modified_timefile.created→created_timefile.accessed→accessed_timeSQL Query
Forensic Context
Registry Locations Monitored:
HKCU\Software\Microsoft\Windows\Shell\BagMRUHKCU\Software\Microsoft\Windows\Shell\BagsHKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRUHKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagsThis query provides essential Windows forensic capability for investigating user activity patterns, lateral movement, and data access behaviors through persistent shell artifacts.