Skip to content

Prefetch Files

Evidence: Prefetch Files
Description: Collect Prefetch Files and Parse
Category: System
Platform: windows
Short Name: pf
Is Parsed: Yes
Sent to Investigation Hub: Yes
Collect File(s): Yes

Windows Prefetch is a memory management feature that speeds up application loading by caching information about programs and their dependencies. When a program is executed, Windows creates a .pf file in C:\Windows\Prefetch that tracks the files and directories accessed during the program’s startup.

Prefetch files are valuable forensic artifacts because they provide evidence of program execution, even after the program has been deleted. Each prefetch file contains execution timestamps, run counts, and lists of files accessed by the application.

This collector gathers structured data about prefetch files.

FieldDescriptionExample
FilePathPath to prefetch filePrefetch/CHROME.EXE-12345678.pf
FileSizeSize of prefetch file45678
FileModifiedLast modified timestamp2023-10-15T14:30:00
FileAccessedLast accessed timestamp2023-10-15T15:45:00
FileCreatedCreation timestamp2023-10-01T10:00:00
PrefetchRowIDForeign key to prefetch file1
FileNameOriginal executable nameCHROME.EXE
FilePathFull path to executableC:\Program Files\Google\Chrome\Application\chrome.exe
RunCountNumber of times executed42
PrefetchHashPrefetch hash value12345678
VersionPrefetch file format version30
LastRunTimeArray of last run timestamps (JSON)[“2023-10-15T14:30:00Z”,“2023-10-14T09:15:00Z”…]
PrefetchRowIDForeign key to prefetch file1
VolumeNameVolume device name\Device\HarddiskVolume3
SerialVolume serial number123456789
CreationTimeVolume creation timestamp2023-01-01T00:00:00
PrefetchRowIDForeign key to prefetch file1
PathPath to referenced fileC:\Windows\System32\kernel32.dll

This collector:

  • Collects all .pf files from C:\Windows\Prefetch
  • Parses each prefetch file using libscca library
  • Extracts execution timestamps, run counts, and file references
  • Resolves volume information from embedded volume serials
  • Maps prefetch hashes to executable paths

Prefetch files are essential for establishing program execution timelines and detecting malware execution. Investigators use this data to prove program execution, establish execution timelines, identify deleted malware, track portable executable usage, detect lateral movement tools, identify reconnaissance utilities, and correlate file access patterns with malicious activity.