← All articles
Blog

ShimCache vs Amcache vs Prefetch: what each proves about execution on Windows

ShimCache vs Amcache vs Prefetch, BAM, UserAssist, SRUM and 4688: which Windows artifacts prove a program ran, what the timestamps mean, and caveats.

2 December 2026 10 min read

"Did it run?" is one of the most common questions in a Windows investigation, and one of the easiest to answer wrongly. A tool found on disk may never have run. A program listed in ShimCache or Amcache may only have been looked at. A timestamp may be the file's modification time, not the moment it ran. Forensic analysts call the artifacts that answer the question evidence of execution, and they differ a great deal in what they actually prove.

This article compares the main ones, Prefetch, Amcache, ShimCache, BAM, UserAssist, SRUM and process creation events, side by side: where each lives, what it records, whether it proves execution, what its timestamps mean and where it misleads. It ends with how to combine them, and how our own lab investigation used them.

The short answer: ShimCache vs Amcache vs Prefetch

  • Prefetch proves a program ran, with a run count and up to eight run times. It is on by default on Windows workstations and off on servers.
  • Amcache proves a file existed at a path, with its SHA-1 hash. On current Windows it does not prove the file ran on its own.
  • ShimCache proves a file existed at a path, in a rough order of when Windows saw it. On Windows 10 and 11 it does not prove execution, and its timestamp is the file's last-modified time.
  • BAM proves a program ran in a user's session, with the last run time, for about a week.
  • Process creation events (4688, Sysmon 1) prove execution with the exact time, user and command line, when they were enabled.

The safest statement in a report rests on two independent sources, for example Prefetch plus a 4688, or Amcache plus BAM.

The comparison table

ArtifactLocationRecordsProves execution?TimestampsMain caveat
PrefetchC:\Windows\Prefetch\*.pfExecutable name, run count, files and folders loaded in the first secondsYesLast eight run times (Windows 8 and later); file created ≈ first runOff by default on Windows Server; 1,024-file limit; easy to delete
AmcacheC:\Windows\AppCompat\Programs\Amcache.hvePath, SHA-1, size, publisher, product, link dateNot on its ownKey last-write time, often the inventory scan, not the runEntries are created by inventory tasks for files that never ran
ShimCache (AppCompatCache)SYSTEM hive, ...\Session Manager\AppCompatCachePath, file last-modified time, order of insertionNo (Windows 10 and 11)File's last-modified time, not execution timeWritten to the registry only at shutdown; entries can come from browsing a folder
BAMSYSTEM hive, ...\Services\bam\State\UserSettings\<SID>Full path per userYesLast run timeEntries older than about a week are removed; Windows 10 1709 and later
UserAssistNTUSER.DAT, ...\Explorer\UserAssist\{GUID}\CountPrograms and shortcuts launched from Explorer, ROT13-encodedYes, for GUI launchesLast run time, run count, focus timeNothing launched from a command line or a script
SRUMC:\Windows\System32\sru\SRUDB.datPer application and user: CPU time, bytes read and written, network bytesYes, within an hourHourly rowsCoarse timing; about 30 to 60 days retained
4688Security logProcess, parent, user, Logon ID, command line (if enabled)YesExactOff by default; log roll-over
Sysmon 1Sysmon logProcess, parent, hashes, command lines, user, Logon IDYesExactOnly where Sysmon is deployed and configured

Prefetch

Windows' Cache Manager watches each program for about its first ten seconds and records what it loaded, so the next launch is faster. The result is a .pf file per program and path, named like CURL.EXE-0A1B2C3D.pf, where the hash comes from the executable's path. On Windows 8 and later each file holds a run count and the last eight run times; on Windows 10 and 11 the files are compressed.

That makes Prefetch the strongest file-system evidence of execution there is: a .pf file exists only because the program ran. Its limits are practical. Prefetching is off by default on Windows Server, so file servers and domain controllers usually have none. The folder keeps at most 1,024 files, so busy machines lose old entries. And the files are easy to delete, although the deletion itself shows in the USN Journal.

The list of files each program loaded is underused. It often names the documents a tool opened, the DLLs it pulled from an unusual folder, or a second executable it started, all with the volume path.

Amcache

Amcache.hve is a registry hive maintained by Windows' application compatibility and inventory components. On Windows 10 and 11 its InventoryApplicationFile entries record a file's full path, its SHA-1 hash (of the first 30 MB or so), size, publisher, product name and the compile time in the PE header.

The hash is what makes Amcache valuable: even after an attacker deletes a tool, the SHA-1 can be checked against threat intelligence. But presence is not proof of execution. Inventory tasks create entries for files that are installed or simply present in certain locations, and research by France's ANSSI on the Amcache format concluded that an entry alone does not show a program ran. The timestamp on the key is when the entry was last written, which is often the time of an inventory scan.

Treat an Amcache entry as "this exact file was on this machine", then look for execution elsewhere.

ShimCache

ShimCache, also called AppCompatCache, is the application compatibility cache in the SYSTEM hive. It records executable paths that Windows checked for compatibility shims, with the file's last-modified time, in insertion order with the most recent first.

Two properties cause most of the misreadings. First, on Windows 10 and 11 an entry does not mean the program ran: Windows adds files it has evaluated, which can happen when a folder is browsed. Second, the timestamp is the file's own last-modified time from the file system, not the time of any execution. A tool modified in 2019 and run yesterday shows 2019.

There is also a timing trap. Windows keeps the cache in memory and writes it to the registry when the system shuts down, so a collection from a running machine that has not rebooted since the intrusion may not contain the attacker's entries at all.

What ShimCache does well is survive. Entries persist long after the file is gone, and the order of entries gives a relative sequence that can place an unknown tool between two known ones.

BAM

The Background Activity Moderator, a Windows 10 component introduced in version 1709, keeps a per-user list of programs that ran, with the full path and the last execution time, under each user's SID in the SYSTEM hive. It is direct evidence of execution with a user attached, which few artifacts offer.

Its weakness is retention: entries older than about seven days are removed, typically at boot. Collect early, and expect to find only recent activity.

UserAssist

UserAssist, in each user's NTUSER.DAT, records programs and shortcuts launched through Explorer: the Start menu, the desktop, double-clicks in a folder. Names are ROT13-encoded; each entry has a run count, the last run time and how long the program had focus.

It is good evidence of what a person did interactively, and it shows nothing of command-line or scripted execution. An attacker working in a command prompt leaves almost nothing here, which is itself informative when a GUI tool does appear.

SRUM

The System Resource Usage Monitor database records, roughly every hour, how much CPU time, disk I/O and network traffic each application used, per user. A row for an executable in a given hour means it ran during that hour and consumed resources.

SRUM's timing is coarse, but it adds something no other execution artifact has: volume. Bytes sent by curl.exe or rclone.exe in the hour of a suspected exfiltration are evidence of what the program did, not only that it ran.

Process creation events

Where process creation auditing (4688) is enabled with command lines, or Sysmon is deployed, the question is answered directly: the exact time, the account and Logon ID, the parent process and the full command line. These are the best evidence of execution Windows produces, and the reason to switch them on before an incident. Their weakness is that they are often off, and the Security log rolls over in days on a busy machine.

Other sources worth checking

  • MUICache: GUI programs a user ran, by path, in UsrClass.dat.
  • RunMRU: commands typed in the Run dialog.
  • PowerShell history and 4104: commands and scripts run in PowerShell.
  • Jump lists and LNK files: files opened by programs, which implies the program ran.
  • Scheduled tasks and services: configuration, not execution, but their own logs (4698, 7045) show when they were set up.
  • On Windows 11 22H2 and later, the Program Compatibility Assistant's C:\Windows\appcompat\pca\PcaAppLaunchDic.txt, which lists executables with a last launch time.

Where the artifacts disagree

A common situation: an attacker copies a credential-dumping tool to C:\Users\Public\m.exe and Microsoft Defender quarantines it. Afterwards, ShimCache lists the path, Amcache has an entry with the SHA-1 of a known tool, and Defender's detection history names it. A quick read says "mimikatz ran". But there is no Prefetch file, no BAM entry, no 4688 and no SRUM row. The honest finding is that the tool was present and was blocked, and there is no evidence it executed.

The reverse also happens. A tool run from a USB stick and removed leaves no file to find, but its Prefetch file, BAM entry and SRUM rows remain. "Not on disk" never means "never ran".

Corroborating execution

  1. Start with the strongest source available. Process creation events, then Prefetch and BAM.
  2. Add an independent one. A second artifact maintained by a different Windows component, so one deletion or one misreading cannot undo the finding.
  3. Read each timestamp for what it is. Run time (Prefetch, BAM, 4688), file modification (ShimCache), inventory time (Amcache), hourly window (SRUM).
  4. Check coverage before claiming absence. Was Prefetch enabled? Had the machine rebooted since? How far back does the Security log go?
  5. Tie execution to a user and a session. BAM and UserAssist give the user; 4688 and Sysmon give the Logon ID, which leads to the logon and its source address.

In our lab investigation

In the Halden Freight case, process creation auditing with command lines was on, so the Security log recorded the attacker's commands directly: curl.exe downloading the script at 22:08:48 UTC, reg.exe adding the Run key at 22:09:03, net user creating svc_backup at 22:09:39, sc.exe creating the service at 22:10:02, then cmdkey and mstsc for the move to the second host. The case held 239 Prefetch, 182 ShimCache and 153 Amcache records across the two workstations. The investigation used them for corroboration and to look for anything the logs missed, but did not depend on them: the AI investigator closed its Prefetch tasks on both hosts with a note that execution was already established from the event logs.

That is the order of preference in practice. Where the logs are complete, the artifacts confirm. Where the logs are gone, as they often are, Prefetch, BAM, Amcache, ShimCache and SRUM become the main evidence, and the distinctions in this article decide what can be claimed.

Evidence of execution in Arcsentry

Arcsentry parses Prefetch, Amcache, ShimCache, BAM, UserAssist, SRUM, MUICache, jump lists and the event logs from every collected host into one timeline, so the sources for one program can be read side by side. The AI investigator works the same way an analyst would: it looks for execution evidence for each suspicious file, cites each artifact it relies on, and says when an artifact shows presence rather than execution. To collect these artifacts, Arcsentry Collector gathers them in its Windows triage profiles.

Frequently asked questions

What is the difference between ShimCache and Amcache?

ShimCache, in the SYSTEM hive, lists executable paths Windows checked for compatibility, with each file's last-modified time and in insertion order. Amcache, a separate hive, records each file's path, SHA-1 hash, size and publisher. Neither proves execution on its own on Windows 10 and 11. Amcache adds the hash; ShimCache adds a relative order.

Does Prefetch prove execution?

Yes. A Prefetch file is created only when a program runs, and on Windows 8 and later it records a run count and the last eight run times. Prefetching is off by default on Windows Server.

Does ShimCache prove execution?

Not on Windows 10 and 11. An entry shows the file existed at that path and was evaluated by Windows, which can happen without running it. The timestamp is the file's last-modified time, not the execution time.

What is BAM in forensics?

The Background Activity Moderator records, per user, the full path and last execution time of programs that ran, in the SYSTEM hive. It proves execution and names the user, but keeps only about a week of history.

Which Windows artifacts prove a program was executed?

Process creation events (4688 and Sysmon 1), Prefetch, BAM, UserAssist for programs launched from Explorer, and SRUM for programs that used resources in a given hour. Amcache and ShimCache show a file was present and should be corroborated.

How we wrote this

Drafted with AI from evidence in our own lab, with Laura Pompeu responsible for the article. The evidence comes from Halden Freight office intrusion (Windows, two hosts), built and investigated in our lab, so every example can be checked against real records.

Sources

  1. ANSSI: Analysis of the AmCache v2 (Blanche Lagny, 2019), ANSSI
  2. Microsoft Learn: 4688(S) A new process has been created, Microsoft
  3. SANS DFIR poster: Windows Forensic Analysis (evidence of execution), SANS Institute
  4. libyal libscca: Windows Prefetch File (PF) format documentation, libyal
Photo of Laura Pompeu
Laura Pompeu
Marketing Manager & Cybersecurity Content Strategist, Proven Data

Laura Pompeu is a Marketing Manager and Cybersecurity Content Strategist with 10+ years of experience across journalism, SEO, and digital marketing. She produces expert-level content on ransomware, incident response, and data recovery for technical and business audiences, and has led multinational content teams across global markets.

LinkedIn

See it on your own evidence. Free for 7 days.

Tell us what you want to investigate. A person replies within one business day with the download and a trial licence.

Request a trial