sohan-a11y/ageis-ai-pentester/analyzing-windows-prefetch-with-python
Claude Code and agent skill by sohan-a11y/ageis-ai-pentester
- community
Checking that the SKILL.md file is still in the repository.
Parse Windows Prefetch files using the windowsprefetch Python library to reconstruct application execution history,
Install
npx vskill@latest install sohan-a11y/ageis-ai-pentester/analyzing-windows-prefetch-with-pythonSKILL.md
The same SKILL.md was published earlier as xalgord/xalgorix/analyzing-windows-prefetch-with-python.
Analyzing Windows Prefetch with Python
Overview
Windows Prefetch files (.pf) record application execution data including executable names, run counts, timestamps, loaded DLLs, and accessed directories. This skill covers parsing Prefetch files using the windowsprefetch Python library to reconstruct execution timelines, detect renamed or masquerading binaries by comparing executable names with loaded resources, and identifying suspicious programs that may indicate malware execution or lateral movement.
When to Use
- When investigating security incidents that require analyzing windows prefetch with python
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Detection Gaps & Validation
- Prefetch can be disabled or absent. It is off by default on Windows Server, and
EnablePrefetcher(HKLM\SYSTEM\...\Memory Management\PrefetchParameters) may be set to 0 by hardening or by an attacker. No.pfdoes not mean no execution — confirm the setting before concluding. - Run-time history is shallow. Windows 8.1/10/11 store only the last 8 execution timestamps; Windows 7 stores one. Earlier runs are lost. The "first executed" estimate is the
.pfcreation time minus ~10 seconds, not an exact start. - Renamed/masquerading binaries: the hash in
EXECUTABLE-HASH.pfis derived from the full path, so the same binary run from two paths yields two different.pffiles — and a renamed malware keeps its real loaded-DLL fingerprint. Compare referenced DLLs/directories, not just the name. - Anti-forensics that defeat this analysis: deletion of
C:\Windows\Prefetch\*.pf, disabling the Prefetcher, and.pftimestomping. Carve deleted.pf(headerMAM\x04/SCCA) from unallocated space and VSS. - Validate / cross-corroborate: confirm execution against Amcache, ShimCache/AppCompatCache, SRUM
SRUDB.dat(app usage + bytes), and Security.evtx EID 4688. The volume serial in the.pfshould match the system under analysis. - Interpretation false positives: a high run count on
svchost.exe/explorer.exeis normal; flag on path, first-seen during incident window, and loaded-resource anomalies, never run count alone.
Prerequisites
- Python 3.9+ with
windowsprefetchlibrary (pip install windowsprefetch) - Windows Prefetch files from C:\Windows\Prefetch\ (versions 17-30 supported)
- Understanding of Windows Prefetch file naming conventions (EXECUTABLE-HASH.pf)
Steps
Step 1: Collect Prefetch Files
Gather .pf files from target system's C:\Windows\Prefetch\ directory.
Step 2: Parse Execution History
Extract executable name, run count, last execution timestamps, and volume information.
Step 3: Detect Suspicious Execution
Flag known attack tools (mimikatz, psexec, etc.), renamed binaries, and unusual execution patterns.
Step 4: Build Execution Timeline
Reconstruct chronological execution timeline from all Prefetch files.
Expected Output
JSON report with execution history, suspicious executables, renamed binary indicators, and timeline reconstruction.
Example Output
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingxalgorix-main/internal/tools/skills/data/digital-forensics/analyzing-windows-prefetch-with-python/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sohan-a11y/ageis-ai-pentester/analyzing-windows-prefetch-with-python)