What's a .pf file vs an Amcache entry?

A .pf file proves execution. An Amcache entry records presence. Same binary can appear in both, in only one, or in neither — and which combination you observe is itself investigative information.

Side by side#

.pf file (Prefetch) Amcache entry
Where it lives C:\Windows\Prefetch\NAME.EXE-1A2B3C4D.pf Sub-key inside Amcache.hve
Created when First time the binary runs First time the appraiser inventories the binary
Maintained by Prefetcher subsystem Compatibility Appraiser scheduled task
Proves execution? Yes No
Proves presence? Yes (implicit — must have existed to run) Yes
Has SHA-1 hash? No (path hash only) Yes (SHA-1 of first 31 MiB)
Has publisher / version? No Yes
Run timestamps? Yes, up to 8 (10 on Win 11) No
Inventory timestamps? No Yes (KeyLastWriteTimestamp)
Survives binary deletion? Yes (file deletion only) Yes (registry persistence)
Default-on Windows desktops? Yes Yes
Default-on Servers? Often disabled Enabled (slower cadence)

The four states#

For any given binary on a host, you observe one of four states. Each carries a different reading:

Both present#

The binary ran, and the appraiser inventoried it. You have execution proof (Prefetch run times) and identity proof (Amcache hash + metadata). Typical case for normal software.

Prefetch only#

The binary ran, but Amcache hasn't recorded it. Two likely reasons:

  1. The binary was deleted before the next appraiser run. Common for stagers / droppers that self-delete after running.
  2. The binary lives in a path the appraiser doesn't scan.

This is a strong signal for deliberate cleanup — the classic Cobalt Strike / Sliver / Metasploit stager pattern.

Amcache only#

The binary is present but never executed (or executed only as a DLL loaded by another EXE, which updates the other EXE's .pf). Reasons:

  1. Staged tool waiting for trigger.
  2. Loaded only via rundll32.exe / regsvr32.exe / LoadLibrary from another process.
  3. Prefetch disabled on this host.

A "present but never ran" finding is very different from "executed". Useful for detecting staged but unused tools.

Both absent#

The binary never executed and the appraiser never inventoried it. Closest you get to "this never happened on this host" — but not conclusive. Both artefacts can be wiped, both have coverage gaps, and intra-appraiser-pass transient binaries can leave no trace.

The combined workflow#

  1. Parse Amcache with AmcacheParser.
  2. Parse Prefetch with PECmd.
  3. Load both CSVs into Timeline Explorer.
  4. Filter Amcache to "unsigned PE in user-writable path".
  5. For each Amcache hit, check whether a .pf exists for the same Name. Present → execution confirmed. Absent → presence-only.
  6. For each .pf, take the executable name and check Amcache for hash and metadata.

For full coverage, see Amcache vs Prefetch.

Related posts

  • Amcache vs Prefetch: what each one really proves

    Amcache records presence; Prefetch records execution. A practical reference for when to use each, what they overlap on, and how to combine them in a DFIR timeline.

  • Why is my Amcache.hve empty?

    Three common causes: the Compatibility Appraiser is disabled, the host is freshly imaged, or you're collecting from a Server / Server Core where the appraiser runs much less often.

  • Where is the Amcache registry key?

    Amcache is its own hive file at C:\Windows\AppCompat\Programs\Amcache.hve — not a key under HKLM. When loaded by tools or by Windows itself it mounts as HKLM\Amcache.

  • What does Amcache.hve contain?

    Amcache.hve contains inventory records for every PE binary, driver, and connected device the Windows Compatibility Appraiser has seen — with SHA-1 hashes, paths, publishers, and timestamps.

Back to all posts