Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Prefetch files are a Windows performance feature that incidentally records which programs ran, when they last ran, how often, and which files they loaded on first execution.

What Are Prefetch Files?
Prefetch files exist to make Windows feel faster. When a program starts, the Cache Manager watches which files and libraries it reads during the first ten seconds and writes a map to C:\Windows\Prefetch so the next launch can load them in bulk. Nobody designed this as an evidence source, which is precisely why it is such a good one.
Each file is named after the executable, an eight-character hexadecimal hash of its full path, and the .pf extension: POWERSHELL.EXE-AE8EDC9B.pf. On Windows 8 and later the content is compressed with the Xpress Huffman algorithm, so the raw file is unreadable without a parser.
That resource list is the part analysts underuse. A prefetch entry for 7Z.EXE listing paths under a finance share gives you both the tool and its target, which is often enough to characterise a staging step before data exfiltration.
Eric Zimmerman’s PECmd is the standard parser, producing CSV output ready for review in Timeline Explorer:
PECmd.exe -d C:\Cases\Prefetch --csv C:\Cases\out
PECmd.exe -f POWERSHELL.EXE-AE8EDC9B.pf
Plaso also ingests prefetch into a super timeline, and most commercial suites parse it automatically. The directory is small, typically under 20 MB, which makes it an obvious inclusion in any triage collection alongside the registry hives and event logs.
Prefetch is strong evidence of execution, but it is bounded in ways that an opposing expert will know:
EnablePrefetcher value under the Memory Management key controls it, and Windows Server disables application prefetching by default. Many investigations of server compromise find no prefetch at all.svchost.exe in two directories produce two different .pf files, which is helpful; but a renamed copy of a known tool produces a .pf under its new name, which is not.Treat prefetch as one of several execution artefacts rather than a conclusion. The strongest execution argument combines it with ShimCache and Amcache entries from the registry, Security event ID 4688 process creation records where command line logging is enabled, Sysmon event ID 1, and Shellbags or UserAssist entries showing the user interactively reached the directory beforehand.
Where these disagree, the disagreement is itself informative. A ShimCache entry with no corresponding prefetch file on a client workstation suggests the binary was present but perhaps never executed, or that the Prefetch directory was cleared afterwards. A prefetch file with eight run times clustered inside one night tells a story that a single registry entry cannot.
Collecting and parsing these artefacts consistently across hundreds of hosts is routine work during Investigation and Incident Response Services, and it is usually how the scope of an intrusion is established quickly rather than guessed at.
It is strong evidence of execution on client versions of Windows, since the file is created by the Cache Manager during a program’s first ten seconds of runtime. It proves that an executable with that name, in a directory with that path hash, ran at the recorded times. It does not identify which specific binary ran, because no file hash is stored.
Windows 8 and later store the last eight execution timestamps within each .pf file, along with a cumulative run count. Windows 7 and earlier store only the most recent execution time. The run count continues to increase beyond eight, so you can tell a program was used fifty times even though only the last eight occasions carry a timestamp.
Application prefetching is disabled by default on Windows Server editions, and it can also be switched off through the EnablePrefetcher registry value or by group policy. Check that value before concluding anything from an empty directory. On servers, examiners usually fall back to ShimCache, Amcache, Sysmon logging, and process creation events for execution evidence.
Partly. Deleting the Prefetch directory removes the records, but the deletions leave traces in the NTFS Master File Table and the USN change journal, which makes the clearing itself detectable and suspicious. Disabling the prefetcher requires a registry change that is also logged. Running tools from memory without creating a process on disk avoids the artefact more cleanly.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.