analyzing-windows-shellbag-artifacts
分析 Windows ShellBag 注册表取证痕迹,使用 SBECmd 和 ShellBags Explorer 重建文件夹浏览活动,检测对可移动介质和网络共享的访问,并在删除后仍能确认用户与目录的交互行为。
Best use case
analyzing-windows-shellbag-artifacts is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
分析 Windows ShellBag 注册表取证痕迹,使用 SBECmd 和 ShellBags Explorer 重建文件夹浏览活动,检测对可移动介质和网络共享的访问,并在删除后仍能确认用户与目录的交互行为。
Teams using analyzing-windows-shellbag-artifacts should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/analyzing-windows-shellbag-artifacts/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How analyzing-windows-shellbag-artifacts Compares
| Feature / Agent | analyzing-windows-shellbag-artifacts | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
分析 Windows ShellBag 注册表取证痕迹,使用 SBECmd 和 ShellBags Explorer 重建文件夹浏览活动,检测对可移动介质和网络共享的访问,并在删除后仍能确认用户与目录的交互行为。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 分析 Windows ShellBag 取证痕迹 ## 概述 ShellBag 是 Windows 注册表取证痕迹,用于追踪用户通过 Windows 资源管理器与文件夹的交互方式,存储视图设置,如图标大小、窗口位置、排序顺序和视图模式。从取证角度看,ShellBag 能提供文件夹访问的确切证据——即便文件夹已不存在于系统中。当用户通过 Windows 资源管理器、打开/保存对话框或控制面板浏览到某文件夹时,用户注册表配置单元中会创建或更新一条 ShellBag 条目。这些条目在文件夹删除、驱动器断开连接甚至跨用户配置文件重置后仍会保留,使其在证明用户导航到本地驱动器、USB 设备、网络共享或 zip 压缩包中的特定目录时极具价值。 ## 注册表位置 ### Windows 7/8/10/11 | 配置单元 | 键路径 | 存储内容 | |------|---------|--------| | NTUSER.DAT | Software\Microsoft\Windows\Shell\BagMRU | 文件夹层级树 | | NTUSER.DAT | Software\Microsoft\Windows\Shell\Bags | 每个文件夹的视图设置 | | UsrClass.dat | Local Settings\Software\Microsoft\Windows\Shell\BagMRU | 桌面/资源管理器 Shell | | UsrClass.dat | Local Settings\Software\Microsoft\Windows\Shell\Bags | 附加视图设置 | ### BagMRU 结构 BagMRU 键包含一个以数字编号的子键层级树,表示目录结构。每个子键值包含一个 Shell Item(SHITEMID)二进制 blob,对文件夹标识进行编码: - **根(BagMRU)**:桌面命名空间根 - **BagMRU\0**:通常为"我的电脑" - **BagMRU\0\0**:第一个驱动器(如 C:) - **BagMRU\0\0\0**:C: 上的第一个子文件夹 每个 Shell Item 包含: - 项目类型(文件夹、驱动器、网络、zip、控制面板) - 短名称(8.3 格式) - 长名称(Unicode) - 创建/修改时间戳 - NTFS 文件夹的 MFT 条目/序列号 ## 使用 EZ Tools 分析 ### SBECmd(命令行) ```powershell # 从注册表配置单元目录解析 ShellBag SBECmd.exe -d "C:\Evidence\Registry" --csv C:\Output --csvf shellbags.csv # 从实时系统解析(需要管理员权限) SBECmd.exe --live --csv C:\Output --csvf live_shellbags.csv # 关键输出列: # AbsolutePath - 完整重建路径 # CreatedOn - 文件夹首次被浏览的时间 # ModifiedOn - 视图设置最后更改时间 # AccessedOn - 最后访问时间戳 # ShellType - Shell 项目类型(Directory、Drive、Network 等) # Value - 原始 Shell 项目数据 ``` ### ShellBags Explorer(GUI) ```powershell # 启动 GUI 工具进行交互式分析 ShellBagsExplorer.exe # 加载注册表配置单元:File > Load Hive # 在树形结构中导航查看文件夹层级 # 右键点击条目查看详细 Shell 项目属性 ``` ## 取证调查场景 ### 证明 USB 设备浏览行为 ``` Shellbag Path: My Computer\E:\Confidential\Project_Files ShellType: Directory (on removable volume) CreatedOn: 2025-03-15 09:30:00 UTC 这证明用户通过 Windows 资源管理器导航到了 E:\Confidential\Project_Files, 即使 USB 驱动器已不再连接。 卷盘符 E: 和目录时间戳可与 USBSTOR 和 MountPoints2 注册表条目关联。 ``` ### 检测网络共享访问 ``` Shellbag Path: \\FileServer01\Finance\Q4_Reports ShellType: Network Location AccessedOn: 2025-02-20 14:15:00 UTC 这证明用户浏览了网络共享,即使该共享已停用或访问权限已撤销。 ``` ### 识别已删除文件夹的访问记录 ``` Shellbag Path: C:\Users\suspect\Documents\Exfiltration_Staging ShellType: Directory CreatedOn: 2025-01-10 08:00:00 UTC 即使 C:\Users\suspect\Documents\Exfiltration_Staging 已不存在, ShellBag 条目仍证明用户创建并导航到了该文件夹。 ``` ## 局限性 - ShellBag 只记录文件夹级别的交互,不记录单个文件的访问 - 只通过 Windows 资源管理器 Shell 和打开/保存对话框创建 - 命令行访问(cmd、PowerShell)不生成 ShellBag 条目 - 通过 API 进行的编程化文件访问不生成 ShellBag 条目 - 时间戳可能反映视图设置更改,不一定是文件夹访问 - Windows 可能在资源管理器关闭期间批量更新 ShellBag 条目 ## 参考资料 - Shellbag 取证分析 2025: https://www.cybertriage.com/blog/shellbags-forensic-analysis-2025/ - SANS ShellBag 取证: https://www.sans.org/blog/computer-forensic-artifacts-windows-7-shellbags - Magnet Forensics ShellBag 分析: https://www.magnetforensics.com/blog/forensic-analysis-of-windows-shellbags/ - ShellBags Explorer: https://ericzimmerman.github.io/
Related Skills
performing-windows-artifact-analysis-with-eric-zimmerman-tools
使用 Eric Zimmerman 的开源 EZ Tools 套件(包括 KAPE、MFTECmd、PECmd、LECmd、JLECmd 和 Timeline Explorer)执行全面的 Windows 取证制品分析,解析注册表 hive、预取文件、事件日志和文件系统元数据。
investigating-ransomware-attack-artifacts
识别、收集和分析勒索软件攻击制品,以确定变种、初始访问向量、加密范围和恢复选项。
implementing-code-signing-for-artifacts
本技能涵盖为构建产物实施代码签名,以确保软件供应链中的完整性和真实性。 内容包括使用 GPG、Sigstore 和平台专用签名工具对二进制文件、软件包和容器进行签名, 建立信任链,以及在部署管道中验证签名。
hunting-for-persistence-mechanisms-in-windows
系统性地狩猎 Windows 终端中的攻击者持久化机制,涵盖注册表、服务、启动文件夹和 WMI 事件订阅。
hardening-windows-endpoint-with-cis-benchmark
使用 CIS(互联网安全中心)Benchmark 建议对 Windows 端点进行加固, 以减少攻击面、执行安全基线并满足合规要求。适用于部署新 Windows 工作站或服务器、 修复审计发现或为组织建立全面安全基线的场景。适用于涉及 Windows 加固、 CIS Benchmark、GPO 安全基线或端点配置合规的请求。
extracting-windows-event-logs-artifacts
使用 Chainsaw、Hayabusa 和 EvtxECmd 提取、解析和分析 Windows 事件日志(EVTX),以检测横向移动、持久化和权限提升。
extracting-memory-artifacts-with-rekall
使用 Rekall 内存取证框架分析内存转储,检测进程空洞化(process hollowing)、通过 VAD 异常注入的代码、隐藏进程和 rootkit。应用 pslist、psscan、vadinfo、malfind 和 dlllist 等插件从 Windows 内存镜像中提取取证工件。适用于应急响应内存分析场景。
extracting-browser-history-artifacts
从 Chrome、Firefox 和 Edge 中提取并分析浏览器历史记录、Cookie、缓存、下载记录和书签,以获取用户网络活动的取证证据。
configuring-windows-event-logging-for-detection
配置 Windows 事件日志与高级审计策略,以生成高质量安全事件用于威胁检测和取证调查。 适用于为登录事件、进程创建、权限使用和对象访问启用审计策略,以支撑 SIEM 检测规则的场景。
configuring-windows-defender-advanced-settings
配置 Microsoft Defender for Endpoint(MDE)高级防护设置,包括攻击面缩减规则、受控文件夹访问、 网络保护和漏洞利用防护。适用于在默认 Defender 设置基础上加固 Windows 端点、部署企业级端点防护 或满足高级恶意软件防御合规要求的场景。
analyzing-windows-registry-for-artifacts
提取并分析 Windows 注册表配置单元,以发现用户活动、已安装软件、自启动条目及系统入侵证据。
analyzing-windows-prefetch-with-python
使用 windowsprefetch Python 库解析 Windows Prefetch 文件,重建应用程序执行历史,检测重命名或伪装的二进制文件,并识别可疑的程序执行模式。