Windows prefetch analysis

From ShulkwiSEC/bb-huge · View interactive version

Windows prefetch analysis is an AI agent skill from the GitHub repository ShulkwiSEC/bb-huge. Analyze Windows prefetch files (.pf) to determine evidence of program execution. This skill details how to extract execution times, run counts, and the paths of files accessed by a program, which is critical for incident response and malware timeline reconstruction.

How to use this skill

Skill file

Windows Prefetch Analysis

When to Use

Prerequisites

Workflow

Phase 1: Locating and Understanding Prefetch Files

Prefetch files are typically located at C:\Windows\Prefetch.

They are named ending with .pf (e.g., CMD.EXE-4A81B364.pf).

Note: Prefetch is enabled by default on Windows Client OS architectures but may be disabled on Windows Servers.

Phase 2: Offline Analysis with PECmd (Eric Zimmerman's Tools)

# Concept: Parse a single prefetch file PECmd.exe -f "C:\Windows\Prefetch\MIMIKATZ.EXE-53D22409.pf"

# PECmd.exe -d "C:\Windows\Prefetch\" -q --csv "C:\Forensics\Output" --csvf "prefetch_timeline.csv"

Phase 3: Interpreting the Output

When examining the parsed output, focus on:

Phase 4: Basic Live System Check (Powershell)

# Get-ChildItem -Path "C:\Windows\Prefetch" | Where-Object { $_.Name -match "MIMIKATZ|PSEXEC|NC.EXE" } | Select-Object Name, LastWriteTime
Decision Point 🔀
flowchart TD
    A[Locate Prefetch Folder ] --> B{Prefetch Enabled? ]}
    B -->|Yes| C[Extract .pf Files ]
    B -->|No| D[Check ShimCache/Amcache ]
    C --> E[Parse with PECmd ]

🔵 Blue Team Detection & Defense

| Concept | Description |

|---------|-------------|

Output Format

Windows Prefetch Analysis — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]

Findings Summary:
  [Finding 1]: [Severity] — [Brief description]
  [Finding 2]: [Severity] — [Brief description]

Detailed Results:
  Phase 1: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

  Phase 2: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

Risk Rating: [Critical/High/Medium/Low/Informational]
Recommendations:
  1. [Immediate remediation step]
  2. [Long-term hardening measure]
  3. [Monitoring/detection improvement]

📚 Shared Resources

For cross-cutting methodology applicable to all vulnerability classes, see:

- CODE0 — Exploit chaining methodology and high-payout chain patterns

- CODE0 — HackerOne-optimized report writing, CWE quick reference

- CODE0 — Verified disclosed bounties by vulnerability class

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.