Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add killvxk/cybersecurity-skills-zh --skill analyzing-prefetch-files-for-execution-historygit clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zhWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-prefetch-files-for-execution-history)<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-prefetch-files-for-execution-history"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-prefetch-files-for-execution-history/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-prefetch-files-for-execution-history"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-prefetch-files-for-execution-history.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.03416 |
| Opus 5 | $0.00018 | $0.01708 |
| Sonnet 5 | $0.00007 | $0.00683 |
| Haiku 4.5 | $0.00004 | $0.00342 |
Grade A, and why
analyzing-prefetch-files-for-execution-history scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 312 lines — stays where its author put it; the contents beside it link to each section on GitHub.
分析 Prefetch 文件获取执行历史
适用场景
- 确定 Windows 系统上执行了哪些程序及执行时间
- 在恶意软件调查中确认可疑二进制文件的执行情况
- 建立事件期间应用程序使用的时间线
- 将程序执行与其他取证制品相关联
- 识别曾运行过的反取证工具或未经授权的软件
前置条件
- 从取证镜像访问 Windows Prefetch 目录(C:\Windows\Prefetch\)
- PECmd(Eric Zimmerman)、WinPrefetchView 或 python-prefetch 解析器
- 了解 Prefetch 文件格式(版本 17、23、26、30)
- Windows 系统且已启用 Prefetch(客户端操作系统默认启用,服务器默认禁用)
- 熟悉 Prefetch 命名规范(APPNAME-HASH.pf)
工作流程
步骤 1:从取证镜像提取 Prefetch 文件
# 挂载取证镜像
mount -o ro,loop,offset=$((2048*512)) /cases/case-2024-001/images/evidence.dd /mnt/evidence
# 复制所有 Prefetch 文件
mkdir -p /cases/case-2024-001/prefetch/
cp /mnt/evidence/Windows/Prefetch/*.pf /cases/case-2024-001/prefetch/
# 统计并列出 Prefetch 文件
ls -la /cases/case-2024-001/prefetch/ | wc -l
ls -la /cases/case-2024-001/prefetch/ | head -30
# 对所有 Prefetch 文件进行哈希以验证完整性
sha256sum /cases/case-2024-001/prefetch/*.pf > /cases/case-2024-001/prefetch/pf_hashes.txt
# 注意:Prefetch 文件名格式为 EXECUTABLE_NAME-XXXXXXXX.pf
# 哈希值(XXXXXXXX)基于可执行文件路径
# 来自不同路径的相同可执行文件会创建不同的 Prefetch 文件
步骤 2:使用 PECmd 解析 Prefetch 文件
# 使用 Eric Zimmerman 的 PECmd(Windows 或通过 Linux 上的 Mono/Wine)
# 从 https://ericzimmerman.github.io/ 下载
# 解析单个 Prefetch 文件
PECmd.exe -f "C:\cases\prefetch\POWERSHELL.EXE-A]B2C3D4.pf"
# 解析所有 Prefetch 文件并输出到 CSV
PECmd.exe -d "C:\cases\prefetch\" --csv "C:\cases\analysis\" --csvf prefetch_results.csv
# 以 JSON 格式输出
PECmd.exe -d "C:\cases\prefetch\" --json "C:\cases\analysis\" --jsonf prefetch_results.json
# 每个文件的输出包含:
# - 可执行文件名和路径
# - 运行次数
# - 最后运行时间(Windows 10 中最多 8 个时间戳)
# - 执行期间引用的文件和目录
# - 卷信息(序列号、创建日期)
# - Prefetch 文件创建时间
步骤 3:使用 Python 进行基于 Linux 的分析
pip install prefetch
python3 << 'PYEOF'
import os
import json
from datetime import datetime
# 使用 python 解析 Prefetch 文件
import struct
def parse_prefetch(filepath):
"""解析 Windows Prefetch 文件。"""
with open(filepath, 'rb') as f:
data = f.read()
# 检查 MAM 压缩格式(Windows 10)
if data[:4] == b'MAM\x04':
import lznt1 # 或使用 DecompressBuffer
# Windows 10 Prefetch 文件已压缩
print(f" [压缩的 Win10 格式 - 使用 PECmd 进行完整解析]")
return None
# 版本 17(XP)、23(Vista/7)、26(8.1)、30(10)
version = struct.unpack('<I', data[0:4])[0]
signature = data[4:8]
if signature != b'SCCA':
print(f" 无效的 Prefetch 签名")
return None
file_size = struct.unpack('<I', data[8:12])[0]
exec_name = data[16:76].decode('utf-16-le').strip('\x00')
run_count = struct.unpack('<I', data[208:212])[0] if version >= 23 else struct.unpack('<I', data[144:148])[0]
result = {
'version': version,
'executable': exec_name,
'file_size': file_size,
'run_count': run_count,
}
# 提取最后执行时间戳
if version == 23: # Vista/7 - 1 个时间戳
ts = struct.unpack('<Q', data[128:136])[0]
result['last_run'] = filetime_to_datetime(ts)
elif version >= 26: # Win8+ - 最多 8 个时间戳
timestamps = []
for i in range(8):
ts = struct.unpack('<Q', data[128+i*8:136+i*8])[0]
if ts > 0:
timestamps.append(filetime_to_datetime(ts))
result['last_run_times'] = timestamps
return result
def filetime_to_datetime(ft):
"""将 Windows FILETIME 转换为 datetime 字符串。"""
if ft == 0:
return None
timestamp = (ft - 116444736000000000) / 10000000
try:
return datetime.utcfromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S UTC')
except (OSError, ValueError):
return None
# 处理所有 Prefetch 文件
prefetch_dir = '/cases/case-2024-001/prefetch/'
results = []
for filename in sorted(os.listdir(prefetch_dir)):
if filename.lower().endswith('.pf'):
filepath = os.path.join(prefetch_dir, filename)
print(f"\n=== {filename} ===")
result = parse_prefetch(filepath)
if result:
print(f" 可执行文件: {result['executable']}")
print(f" 运行次数: {result['run_count']}")
if 'last_run' in result:
print(f" 最后运行: {result['last_run']}")
elif 'last_run_times' in result:
for i, ts in enumerate(result['last_run_times']):
print(f" 运行时间 {i+1}: {ts}")
results.append(result)
# 保存结果
with open('/cases/case-2024-001/analysis/prefetch_analysis.json', 'w') as f:
json.dump(results, f, indent=2)
PYEOF
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 312 lines · 37 tokens per session scan A c3e415078546
analyzing-prefetch-files-for-execution-history is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (44 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 3,416 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
analyzing-prefetch-files-for-execution-history
Parse Windows Prefetch files to determine program execution history including run counts, timestamps, and referenced files for forensic investigation.
analyzing-prefetch-files-for-execution-history
Parse Windows Prefetch files to determine program execution history including run counts, timestamps, and referenced files for forensic investigation.
analyzing-prefetch-files-for-execution-history
Parse Windows Prefetch files to determine program execution history including run counts, timestamps, and referenced files for forensic investigation.
analyzing-prefetch-files-for-execution-history
Parse Windows Prefetch files to determine program execution history including run counts, timestamps, and referenced files for forensic investigation.
analyzing-prefetch-files-for-execution-history
Parse Windows Prefetch files (versions 17, 23, 26, 30) with tools like PECmd, WinPrefetchView, or python-prefetch to determine program execution history, including run counts, execution timestamps, and referenced files/DLLs. Use when building a timeline of program execution on a Windows system, confirming whether a…
analyzing-prefetch-files-for-execution-history
Parse Windows Prefetch files to determine program execution history including run counts, timestamps, and referenced files for forensic investigation.