> For the complete documentation index, see [llms.txt](https://wongkenny240.gitbook.io/computerforensics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wongkenny240.gitbook.io/computerforensics/incident-response-artifacts/prefetch.md).

# Prefetch

Prefetch file path

```
%SystemRoot%\Prefetch
```

File name

* Boot Prefetch: NTOSBOOT-B00DFAAD.pf
* Application prefetch: - .pf

Example: CALC.EXE-AC08706A.pf

The hash is a hash of the file’s path. In this example, CALC.EXE is located in C:\Windows\System32. If it were copied to another location (like the Desktop) and executed, a new .pf file would be created reflecting a hash of the new path

## Boot prefetching vs. application prefetching

### Boot Prefetching

* Boot related files are scattered or fragmented on storage&#x20;
* Slow boot&#x20;
* Monitors up to 120 seconds at system boot time by Prefetcher&#x20;
* Monitor the file you use for booting and save the results to a file&#x20;
* Speed up booting with prefetched files&#x20;

### Application Prefetching

* Cache manager monitors the first 10 seconds of application initial launch&#x20;
* Monitor the file used for 10 seconds and save the result as a file&#x20;
* Faster initial execution speed with prefetch files when rerunning prefetched applications&#x20;
* The maximum number of files is 128.&#x20;
* Automatically delete unused files when the limit is exceeded

## Information that can be obtained from the prefetch file

* Application name&#x20;
* Application Execution Count&#x20;
* Application's last run time (FILETIME, 64-Bit Timestmamp)&#x20;
* Reference list (path to DLL, SDB, NLS, INI, etc. required for execution)&#x20;
* Integrated analysis using file system time information (creation, modification, access time)&#x20;
* Automatic prefetch file generation when malicious code is executed&#x20;
* Boot-prefetch file detects malware loaded at boot&#x20;
* List of loaded libraries and files can be checked from the reference list

## Prefetch File Analysis Tool

### WinPrefetchView – Nirsoft

{% embed url="<http://www.nirsoft.net/utils/win_prefetch_view.html>" %}

![](/files/-M56BD4aqHfgNkpQ8Qs5)

![](/files/-MFH3eRtoCl0-KVGBmZo)

* Analyze Prefetch file through Nirsoft WinPrefetchView
* Select the folder with the Prefetch files in the Advanced Options

![](/files/-MehIP15kUK8StwVnSXB)

### PrefetchForensics – Mark Woan

{% embed url="<https://github.com/woanware/woanware.github.io/blob/master/forensics/prefetchforensics.md>" %}

### APFA(Advanced Prefetch File Analyzer) – ASH368

{% embed url="<http://www.ash368.com/>" %}

### Windows Prefetch Parser – TZWorks

{% embed url="<https://www.tzworks.net/prototype_page.php?proto_id=1>" %}

## Prefetch Registry Key

```
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters
```

EnablePrefetcher Key:

```
0 = Disabled
1 = Application prefetching enabled
2 = Boot prefetching enabled (default on Windows 2003 only)
3 = Application and Boot prefetching enabled (default)
```

* Task Scheduler calls Windows Disk Defragmenter every three (3) days&#x20;
* When idle, lists of files and directories referenced during boot process and application startups is processed
* The processed result is stored in ***Layout.ini*** in the Prefetch directory, and is subsequently passed to the Disk Defragmenter, instructing it to re-order those files into sequential positions on the physical hard drive


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wongkenny240.gitbook.io/computerforensics/incident-response-artifacts/prefetch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
