Shim Cache (App Compat Cache)
Executables Windows checked for compatibility, with full path and file modified time.
Use it to show a file was on the system at that path, even after it was deleted, and when it was last changed.
- SYSTEM
- Program Execution
What It Is
ShimCache, also called AppCompatCache, is a list Windows keeps of executable files it has checked for compatibility with the running version of Windows. Each record holds the file's full path and its last modified time, and the list is in order, newest first. It is useful because it keeps a file's path even after the file has been deleted. It sits in the SYSTEM hive as one large binary value.
What It Proves
A file existed at that path, with that modified time, before the cache was last written. Its place in the list gives the order, newest first.
What It Does Not Prove
Being listed does not prove the file ran, and the time is the file's modified time, not a run time. Windows writes the cache to the hive only at shutdown, so the newest entries on a running machine are still in memory.
Where It Lives
ShimCache (AppCompatCache) lives in the SYSTEM hive, which holds settings for the whole machine. Offline Hive shows the path inside the hive file, as Registry Explorer opens it, and Live System shows the same key as regedit shows it on a running machine. The line under the path is where the hive file sits on disk.
SYSTEM\ ControlSet001\ Control\ Session Manager\ AppCompatCacheC:\ Windows\ System32\ config\ SYSTEMWhat It Looks Like
These are three values from this key on ws-042, the fictional machine the wiki follows, decoded into plain English. Each row shows the value as Windows stores it, its name, type and data, then what it tells you.
| Registry Value | What It Tells You |
|---|---|
| procdump64 |
| updsvc64 |
| psexec |
How to Read It
Parse the single AppCompatCache value with a tool, because it is one block of a header followed by one record per file, newest first. Read each record's path and modified time. On Windows 10 and 11 an executed flag of 1 is a hint that the file ran, not proof. Compare the list with ShutdownTime, because the cache in the hive dates from that shutdown.
- When Windows Writes It
- Windows keeps it in memory while it runs and writes it to the hive at shutdown or restart.
- Which Windows Versions
- Windows XP to 11 keep it. The layout changes with the version, and since Windows 7 it holds up to 1024 entries.
- Tools That Parse It
- AppCompatCacheParser, Registry Explorer, RegRipper (appcompatcache)
Hunt It
ShimCache is a Registry value that is not in any event log, so the live tools can only test a cached path for a real start in process creation records. A hit there proves the file ran, and no hit does not rule it out. Velociraptor parses the cache from the live key on each endpoint.
Reads the DeviceProcessEvents table in Defender XDR advanced hunting, from devices onboarded to Defender for Endpoint. A hit proves the cached path ran, and no hit does not rule it out, because the run may be older than your retention. The cache itself is not in Defender data.
// Did a path from ShimCache actually run? Look for process startsDeviceProcessEvents| where Timestamp > ago( 30d)| where DeviceName startswith "ws-042"| where FileName =~ "psexec.exe" and FolderPath startswith @"C:\ Users\ alice\ Downloads"| project Timestamp, AccountName, FolderPath, ProcessCommandLine, SHA1Confirm It With
One artefact can mislead on its own. These other records show the same activity, or pin down when it happened, so use them to back up what ShimCache (AppCompatCache) shows.
- AmcacheIt adds the file's SHA-1 and publisher, so you can check the file even after it has gone.
- Last Shutdown TimeIt dates when this cache was written, so every entry was on disk before then.
- Prefetch FilesNot in the RegistryThey show whether the file actually ran, which ShimCache cannot prove.
Sources
The facts on this page come from these public pages, which say more on each point.