jayelbotvibe-web/hermes-forensics-lab
GitHub: jayelbotvibe-web/hermes-forensics-lab
基于Hermes Agent构建的AI辅助数字取证实验室,整合12款取证工具实现内存分析、时间线生成、文件雕刻等全流程自动化,并通过双工具交叉验证和人工审批机制保障取证结论的可靠性。
Stars: 0 | Forks: 0
# Hermes Forensics Lab
[](https://github.com/NousResearch/hermes-agent)
[](#tool-inventory)
[](scripts/session-canary.sh)
## 运行效果
```
$ hermes -p forensics
=== Forensics Session Canary ===
[docker:volatility3] PASS [docker:plaso] PASS [docker:mft-tools] PASS
[sift:sleuthkit] PASS [sift:foremost] PASS [sift:dc3dd] PASS
[sift:photorec] PASS [sift:ddrescue] PASS [sift:regripper] PASS
[sift:hashdeep] PASS [sift:tshark] PASS
12/12 tools operational ✓
Agent: Mounting memory dump...
/mnt/mem/sys/proc/ → 97 processes
/mnt/mem/forensic/findevil.txt → 3 suspicious modules
Agent: Cross-validating with volatility3 malfind...
✓ 2 of 3 modules confirmed malicious
[DRAFT] F-niel-001 | Cobalt Strike Beacon detected in lsass.exe
Confidence: HIGH | Tool: MemProcFS 5.17.8 + volatility3 2.7.0
Evidence: EVID-003 | Cross-validated: dual-tool corroborated
Awaiting examiner approval. All findings held as DRAFT.
```
## 快速开始
### 1. 克隆
```
git clone https://github.com/jayelbotvibe-web/hermes-forensics-lab.git
cd hermes-forensics-lab
```
### 2. 构建 Docker 镜像
```
docker build -t forensics-volatility3:2.7.0 tools/volatility/
docker build -t forensics-plaso:20240512 tools/plaso/
docker build -t forensics-mft-tools:1.2.0.0 tools/mft-tools/
```
### 3. 安装 MemProcFS
```
wget https://github.com/ufrisk/MemProcFS/releases/latest -O memprocfs.tar.gz
tar xzf memprocfs.tar.gz
sudo apt install -y libfuse2t64 lz4
```
### 4. 配置 SIFT VM
完整配置说明请参阅 [SETUP.md](SETUP.md)。
### 5. 启动 agent
```
hermes -p forensics
```
## 架构

**[→ 完整交互版本](index.html)**
## 工具清单
| # | 工具 | 运行环境 | 版本 | 主要用途 |
|---|------|---------|---------|-------------|
| 1 | **MemProcFS** | 💻 宿主机 | 5.17.8 | 内存分析 (filesystem mount) |
| 2 | volatility3 | 🐳 Docker | 2.7.0 | 内存分析 (Linux dumps, cross-val) |
| 3 | plaso | 🐳 Docker | 20240512 | 超级时间线生成 |
| 4 | mft-tools | 🐳 Docker | 1.2.0.0 | MFT 解析 (analyzeMFT) |
| 5 | sleuthkit | 🖥️ SIFT | 4.11.1 | 文件系统取证 |
| 6 | foremost | 🖥️ SIFT | 1.5.7 | File carving |
| 7 | photorec | 🖥️ SIFT | 7.1 | File carving (不同的特征库) |
| 8 | dc3dd | 🖥️ SIFT | 7.3.1 | 取证镜像 |
| 9 | ddrescue | 🖥️ SIFT | 1.27 | 损坏介质镜像 |
| 10 | regripper | 🖥️ SIFT | 3.0 | 注册表分析 |
| 11 | hashdeep | 🖥️ SIFT | 4.4 | 证据哈希 |
| 12 | tshark | 🖥️ SIFT | 4.0 | 网络捕获分析 |
💻 = 宿主机 FUSE 🐳 = Docker 🖥️ = SIFT VM
## Hermes Agent 集成
该系统作为 **Hermes Agent profile** (`forensics`) 运行。该 profile 包含:
- **Persona**:稳定优先的 DFIR 分析师 — 证据至上,痴迷于验证
- **9 项 Skills**:evidence-handling、memory-forensics、filesystem-forensics、mft-analysis、registry-analysis、timeline-analysis、file-carving、disk-imaging、system-context
- **Session canary**:在每次会话开始时自动验证全部 12 个工具
- **工具目录**:版本锁定、降级链、记录已知问题
- **Human-in-the-loop**:所有发现均标记为 DRAFT,直到审查人员批准
### 技能
| Skill | 加载时机 | 描述 |
|-------|-------|-------------|
| [system-context](skills/system-context/SKILL.md) | ⚡ 始终 | 完整的架构图、工具位置、操作规程 |
| [evidence-handling](skills/evidence-handling/SKILL.md) | 📋 每个案子 | 监管链、案件创建、证据登记 |
| [memory-forensics](skills/memory-forensics/SKILL.md) | 🔍 每个任务 | 优先使用 MemProcFS 进行内存分析 + volatility3 降级方案 |
| [filesystem-forensics](skills/filesystem-forensics/SKILL.md) | 🔍 每个任务 | Sleuth Kit — 文件列表、inode 提取、mactime |
| [mft-analysis](skills/mft-analysis/SKILL.md) | 🔍 每个任务 | 使用 analyzeMFT 进行 MFT 解析、timestomping 检测 |
| [registry-analysis](skills/registry-analysis/SKILL.md) | 🔍 每个任务 | 注册表配置单元分析、持久化检测 |
| [timeline-analysis](skills/timeline-analysis/SKILL.md) | 🔍 每个任务 | 使用 plaso 生成超级时间线,降级使用 mactime |
| [file-carving](skills/file-carving/SKILL.md) | 🔍 每个任务 | foremost + photorec 双工具 carving |
| [disk-imaging](skills/disk-imaging/SKILL.md) | 🔍 每个任务 | 使用 dc3dd/ddrescue 进行镜像与哈希校验 |
⚡ 始终 = 每次会话均加载 📋 每个案子 = 打开/关闭案件时加载 🔍 每个任务 = 按需加载
### 与 Pentest Agent 的协同
配套的 [pentest lab](https://github.com/jayelbotvibe-web/hermes-pentest-lab) 可以将证据移交给取证 agent:
```
# Pentest agent 创建 handoff:
bash scripts/handoff.sh "Suspicious DC01 memory dump" /path/to/dump.mem HIGH
# Forensics agent 在下一次 session 启动时获取它
hermes -p forensics
```
## Session Canary
每次会话均以自动化工具验证开始:
```
bash scripts/session-canary.sh
```
输出:
```
=== Forensics Session Canary ===
[docker:volatility3] PASS
[docker:plaso] PASS
[docker:mft-tools] PASS
[sift:connectivity] PASS
[sift:sleuthkit] PASS
[sift:foremost] PASS
[sift:photorec] PASS
[sift:dc3dd] PASS
[sift:ddrescue] PASS
[sift:regripper] PASS
[sift:hashdeep] PASS
[sift:tshark] PASS
=== Results: 12 passed, 0 failed ===
✓ All tools operational
```
验证失败的工具会被标记为 **DEGRADED** — 仅用于分流,不可用于证据分析。
## 设计原则
| 原则 | 实现方式 |
|-----------|-----|
| 不可变的工具 | Docker 镜像版本锁定,不使用 `latest` 标签 |
| Session canary | 在每次调查前验证全部 12 个工具 |
| 双工具交叉验证 | 关键工件使用 2 种工具检查,差异 >5% 将被标记 |
| 证据只读 | 登记后执行 `chmod 444`,记录监管链 |
| Human-in-the-loop | 所有发现均标记为 DRAFT,直到审查人员批准 |
| 案件期间从不安装 | 缺失的工具将被标记,不会被安装 — 避免意外 |
| MemProcFS 优先 | 像浏览文件系统一样浏览内存,volatility3 作为降级方案 |
### MemProcFS 优先的内存分析
无需记忆 200 多个 volatility3 插件名称,agent 会将内存 dump 挂载为虚拟文件系统并进行浏览:
```
memprocfs -device dump.mem -mount /mnt/mem -forensic 1
ls /mnt/mem/sys/proc/ # All processes as directories
cat /mnt/mem/sys/net/tcp.txt # Network connections
cat /mnt/mem/forensic/findevil.txt # Auto-detected malware
```
volatility3 保留作为 Linux dump 和交叉验证的降级方案。
## 依赖要求
- **Hermes Agent** (https://github.com/NousResearch/hermes-agent)
- **Docker** (位于宿主机上,用于 volatility3、plaso、mft-tools)
- **SIFT Workstation VM** (Ubuntu 22.04 + 通过 apt 安装的取证工具)
- **VMware Workstation** 或 KVM/QEMU (用于运行 VM)
- **libfuse2** (用于 MemProcFS)
- 用于连接 SIFT VM 的 **SSH 密钥认证**
## 相关链接
- [Hermes Pentest Lab](https://github.com/jayelbotvibe-web/hermes-pentest-lab) — 配套的攻击安全 agent
- [MemProcFS](https://github.com/ufrisk/MemProcFS) — 内存进程文件系统
- [SIFT Workstation](https://www.sans.org/tools/sift-workstation) — SANS 取证工具包
- [Volatility3](https://github.com/volatilityfoundation/volatility3) — 内存取证框架
## 许可证
MIT — 工具包和文档。各个工具保留其自身的许可证 (GPL, AGPL, Apache 2.0)。
标签:AI智能体, Docker, JARM, 内存分析, 后端开发, 安全防御评估, 应用安全, 提权工具, 数字取证, 网络调试, 自动化, 自动化脚本, 请求拦截, 逆向工具