[Osquery_manager] AppCompatCache artifact saved query #15895
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.
AppCompatCache Artifact
The AppCompatCache (ShimCache) is a Windows forensic artifact that maintains a record of program execution history. This query extracts ShimCache entries to identify recently executed programs, providing critical visibility into execution patterns, suspicious program locations, and code signing status for threat detection and incident response investigations.
Read: https://p.elstc.co/paste/u51PK8CZ#P5lLF72f+bM4vFxzenX22CD6ShzNYcgdD8pDh0YY8nR
Core Forensic Artifacts Coverage Table
Queries by Platform
🪟 Windows - AppCompatCache Execution Tracking with Risk Scoring
Description
Extracts Application Compatibility Cache (ShimCache) entries to track program execution history on Windows systems. The ShimCache records metadata about executables that have been launched, providing forensic evidence of program execution even when programs are no longer running or have been deleted from disk.
Results
Risk Scoring Methodology:
Detection Focus:
Result
Query returns up to 500 ShimCache entries sorted by risk score and entry order, with each entry including file path, modification time, execution flag, file hashes (MD5/SHA256), code signature details, and computed risk assessment.
Platform
windowsInterval
7200seconds (2 hours)Query ID
appcompatcache_shimcache_windows_elasticECS Field Mappings
event.category→["process"]event.type→["info"]file.path→pathfile.mtime→modified_timefile.hash.md5→md5file.hash.sha256→sha256file.code_signature.subject_name→subject_namefile.code_signature.status→signature_statusevent.risk_score→risk_scoreevent.severity→risk_leveltags→["execution_tracking", "appcompatcache", "shimcache", "forensics", "code_signing", "risk_scoring", "windows"]SQL Query