Prefetch(프리페치)?
- 어플리케이션의 시작 과정를 빠르게 하기 위해서 고안된 파일입니다
- 시작 과정에서 필요한 정보들이 Prefetch에 담겨있습니다
- 저장 위치 : %SystemRoot%\Prefetch\*.pf (Window 10 버전 이후에는 최대 1024개의 파일이 저장)
- 포렌식에서는 어플리케이션이 어떻게 동작하는지, 어떤 어플리케이션이 자동으로 실행되는지 등을 분석하는데에 프리페치 파일을 사용할 수 있습니다
Prefetch in Forensic
포렌식에서는 어플리케이션이 어떻게 동작하는지, 어떤 어플리케이션이 자동으로 실행되는지 등을 분석하는데에 프리페치 파일을 사용할 수 있습니다
포렌식 분석에 있어서 유의미한 정보들로는
- 실행 횟수
- 마지막으로 실행된 timestamps
- Volume
- 참조된 정보 리스트 (required DLLs)
- 참조된 파일 리스트 (recently used files
Prefetch 파일 타입
- Boot Prefetching
- 부팅시에 이용할 수 있는 자원들을 말합니다 → NTOSBOOT-B00DFAAD.pf
- 시스템의 시작 과정을 빠르게 하기 위해서 사용합니다
- Application Prefetching
- 실행 중에 어플리케이션에 의해서 참조되는 자원들을 말합니다
- → [executable filename]-[prefetch-hash(filepath)].pf
- 어플리케이션의 시작 과정을 빠르게 하기 위해서 사용합니다
Prefetch 설정
EnablePrefetcher에서 설정을 통해 Prefetch의 설정을 바꿀 수 있습니다
0 : Disabled
1 : Application prefetching enabled
2 : Boot prefetching enabled
3 : Application and Boot prefetching enabled
3번이 기본 값으로 설정되어 있습니다
Prefetch 파일 구조

프리페치 파일은 Xpress 알고리즘을 통해 압축되어 있습니다 (File Signature :MAM\x04)
압축을 풀면 SCCA라는 시그니처가 나타납니다
Prefetch 파일 분석 방법
프리페치 파일은 여러 포렌식 툴을 이용해서 분석할 수 있는데 대표적으로는
- PECmd
- WinPrefetchView
WinPrefetchView
https://www.nirsoft.net/utils/win_prefetch_view.html#google_vignette
WinPrefetchView is a small utility that reads the Prefetch files stored in your system and displays the information stored in them.
사용법
파일을 다운받은 후 WinPrefetchView.exe 파일을 실행합니다.

이렇게 여러 pf 파일을 확인할 수 있습니다
사용법 1 : 가장 많이 실행된 파일 찾기

WinPrefetchView에서는 정렬 기능을 이용할 수 있는데요
여기서 Run count 옵션을 정렬하면
Run count 정렬을 통해서 가장 많이 실행된 파일, 어플리케이션을 알 수 있습니다.
저의 경우에는 크롬, 카카오톡, 엣지 브라우저 등을 가장 많이 사용했네요
- 사용법 2 : 원하는 특정 파일 정보 파악
포렌식을 하다 보면 HxD를 자주 사용하게 되는데요 이 HxD의 정보를 예시로 파악해보겠습니다.

HxD 파일에 참조된 파일들의 목록을 확인할 수 있습니다. 주로 .DLL 파일이 많아 보이는 것을 알 수 있습니다.

HxD의 create time, modified time, Last Run time 등의 타임스탬프를 확인할 수 있습니다
File size로 용량 정보 또한 확인할 수 있습니다.
PECmd
Powerful command line Registry tool searching, multi-hive support, plugins, and more
사용법
해당 프로그램은 cmd 창을 켜서 명령어를 입력하는 방식을 가지고 있습니다
PECmd version 1.4.0.0 Author: Eric Zimmerman (saericzimmerman@gmail.com) <https://github.com/EricZimmerman/PECmd> d Directory to recursively process. Either this or -f is required f File to process. Either this or -d is required k Comma separated list of keywords to highlight in output. By default, 'temp' and 'tmp' are highlighted. Any additional keywords will be added to these. o When specified, save prefetch file bytes to the given path. Useful to look at decompressed Win10 files q Do not dump full details about each file processed. Speeds up processing when using --json or --csv. Default is FALSE json Directory to save json representation to. jsonf File name to save JSON formatted results to. When present, overrides default name csv Directory to save CSV results to. Be sure to include the full path in double quotes csvf File name to save CSV formatted results to. When present, overrides default name html Directory to save xhtml formatted results to. Be sure to include the full path in double quotes dt The custom date/time format to use when displaying timestamps. See <https://goo.gl/CNVq0k> for options. Default is: yyyy-MM-dd HH:mm:ss mp When true, display higher precision for timestamps. Default is FALSE vss Process all Volume Shadow Copies that exist on drive specified by -f or -d . Default is FALSE dedupe Deduplicate -f or -d & VSCs based on SHA-1. First file found wins. Default is TRUE debug Show debug information during processing trace Show trace information during processing Examples: PECmd.exe -f "C:\\Temp\\CALC.EXE-3FBEF7FD.pf" PECmd.exe -f "C:\\Temp\\CALC.EXE-3FBEF7FD.pf" --json "D:\\jsonOutput" --jsonpretty PECmd.exe -d "C:\\Temp" -k "system32, fonts" PECmd.exe -d "C:\\Temp" --csv "c:\\temp" --csvf foo.csv --json c:\\temp\\json PECmd.exe -d "C:\\Windows\\Prefetch" Short options (single letter) are prefixed with a single dash. Long commands are prefixed with two dashes
PECmd.exe -f "C:\Windows\Prefetch\ZOOM.EXE-********.pf" --json "C:Users\82108\Desktop"
-> zoom 어플리케이션의 프리페치 파일을 분석하여 이를 json으로 저장하는 명령을 실행해보겠습니다.

이렇게 실행이 완료되었다는 글귀가 뜨고 설정한 경로로 가면 json 파일이 생성됩니다.

이렇게 json 파일 안에 분석된 내용이 저장되어있는 것을 확인할 수 있습니다
분석툴의 장점?
Tool을 사용하지 않고 일반 .pf 파일을 HxD로 열어보겠습니다.

HxD로 열어보면 파일 시그니처가 MAM으로 표시된 것을 확인할 수 있는데, 이는 압축이 아직 해제되지 않았다는 의미가 됩니다.
따라서 우리가 원하는 정보를 얻으려면 MAM→SCCA 시그니처로 바뀔 수 있도록 압축을 해제하는 작업이 반드시 필요합니다!
깃헙 등에 Xpress Decompression 알고리즘 등이
많이 올라와있긴 하지만, 분석해야할 pf 파일이 여러개인 경우 일일이 이것을 다 해제하기는 상당히 어려울 수 있습니다.
WinPrefetchView, PECmd 등의 툴을 이용하면 이런 복잡한 과정 없이 파일 분석이 가능합니다!
참고 : Xpress Decompression Code (python)
https://kali-km.tistory.com/entry/XPRESS-Decompress-by-Python
'디지털포렌식' 카테고리의 다른 글
[디지털포렌식] Windows Event Log 와 EvtxECmd 리뷰 (2) | 2025.02.10 |
---|---|
[디지털포렌식] 웹브라우저 아티팩트와 BrowsingHistoryView, Hindsight 리뷰 (0) | 2025.02.10 |
[디지털포렌식] Thumbnail(썸네일), Icon Cache와 Thumbcache Viewer 리뷰 (0) | 2025.02.10 |
[디지털포렌식] Jumplist와 JumpList Explorer 리뷰 (0) | 2025.02.10 |
[디지털포렌식] NTFS Log Tracker 리뷰 (0) | 2025.02.10 |