sltcnb/Madeleine

GitHub: sltcnb/Madeleine

Madeleine 是基于 Volatility3 的内存取证自动化工具包,将复杂的内存分析流程编排为标准化 pipeline,让初级分析师也能高效完成恶意软件检测与事件取证。

Stars: 0 | Forks: 0

# Madeleine — 内存取证工具包 [![CI](https://static.pigsec.cn/wp-content/uploads/repos/cas/ad/ad5834178f7599af9fdda11629d49cae07f2997beec49821b2920eff5bfd50e7.svg)](https://github.com/sltcnb/madeleine/actions/workflows/ci.yml) **Volatility3** 之上的现代自动化层。将专家专属的 CLI 复杂操作转化为可重复的分流 pipeline:编排正确的插件, 将输出标准化为 ECS,通过启发式算法 + YARA 追踪恶意软件,重建 时间线,并输出 HTML 报告 / STIX bundle。支持 CLI、Docker 和 Kubernetes。 Madeleine 献给 Madeleine de Proust ## 演示

Madeleine demo

## 架构 ``` flowchart LR run["run
dump → raw"] --> parse["parse
→ ECS"] --> detect["detect
MITRE ATT&CK"] --> timeline["timeline"] --> report["report
HTML"] --> export["stix / export"] ``` ## 为什么需要 Volatility3 功能强大,但需要深厚的专业知识——每条命令都需要 正确的插件、标志以及手动进行关联。Madeleine 编码了最佳实践 插件集,将其输出解析为单一的标准化 schema(ECS v8), 并运行检测,从而让 SOC 分析师和初级 IR 工程师直接得到答案,而非原始 表格。 ## Pipeline ``` run dump.raw → case/raw/.json (Volatility3 output) parse case/raw → case/ecs/.ecs.jsonl (normalized ECS) detect case/ecs → ranked threat findings (MITRE ATT&CK mapped) timeline case/ecs → ordered / clustered events report case/ → case/report.html export case/ecs → jsonl | csv stix → STIX 2.1 bundle ``` 原始证据与派生数据保持分离。`run` 需要 Volatility3;**随后的 每个阶段都基于任何预先收集的 Vol3 JSON 运行**,因此您可以进行离线 分析,并且测试套件不需要内存转储。 ## 文档 - **[docs/usage.md](docs/usage.md)** — 详尽指南:每条命令、标志、 Web API,以及 **Talon → Madeleine** 的数据采集交接。 - [docs/getting-started.md](docs/getting-started.md) · [docs/deployment.md](docs/deployment.md) ## 安装 ``` pip install -e ".[vol]" # + Volatility3 for the `run` stage pip install -e ".[web,dev]" # web GUI + tests ``` ## 快速开始 ``` # 1. 针对一个 dump 运行推荐的 plugins(自动 OS 检测 + 并行) Madeleine run memory.raw -o case/ # 2. 将原始 Vol3 JSON 规范化为 ECS Madeleine parse case/raw -o case/ # 3. 搜索 Madeleine detect case/ecs Madeleine timeline case/ecs --cluster Madeleine report case/ # → case/report.html Madeleine stix case/ecs -o iocs.json ``` 已经有了 Vol3 JSON?将其放入 `case/raw/` 目录中(命名为 `.json`),然后从 第 2 步开始——无需内存转储或 Volatility3。 ## 检测 基于标准化事件的启发式检测,每一项都映射到 MITRE ATT&CK,进行置信度 评分,并在多个信号命中同一个 PID 时通过相关性增强: | 检查项 | 技术 | ATT&CK | |-------|-----------|--------| | 进程注入 | RWX 私有内存 (malfind) | T1055 | | 进程掏空 | 异常父进程 | T1055.012 | | DKOM | 存在于 scan 但不在 active list 中的进程 | T1014 | | Rootkit | 被 hook 的 syscall / SSDT / IDT | T1014 | | 持久化 | 运行 LOLBin / temp 路径的服务 | T1543.003 | | 凭据窃取 | 注入 / 访问 lsass | T1003.001 | | YARA | 在 malfind 区域上的规则匹配 | — | ## 部署 ``` # Desktop / CLI — 参见上方的 Install。 # Docker(Web GUI 位于 http://localhost:8080) docker compose up --build # Kubernetes kubectl apply -f k8s/deployment.yaml ``` Web 模式在 `/` 提供无依赖的仪表板,并在 `/api` 下提供 JSON API。 案例数据存放于 `Madeleine_DATA`(默认为 `/data`);按用户映射 各自对应的用例子目录。JWT/OAuth + RBAC 可在网关处无缝接入。 ## 目录结构 ``` Madeleine/ ├── cli.py # run | parse | detect | timeline | report | export | stix | serve ├── core/ │ ├── orchestrator.py # Vol3 subprocess wrapper: cache, parallel, OS detect │ ├── plugins.py # recommended plugin sets + OS detection │ ├── parser.py # Vol3 JSON → ECS (tolerant, registry-based) │ ├── detector.py # malware heuristics + YARA + correlation │ ├── timeline.py # timeline build + clustering │ ├── ioc.py # IOC extraction + STIX 2.1 │ ├── report.py # self-contained HTML report │ └── exporter.py # jsonl / csv ├── ecs/schema.py # ECS v8 forensic event model (pydantic) └── api/server.py # FastAPI backend + SPA dashboard ``` ## 测试 ``` pytest -q # unit tests, no dump needed ruff check . # lint # 针对真实 image 的可选端到端测试(需要 Volatility3): Madeleine_TEST_DUMP=/path/to/mem.raw pytest -m integration python scripts/validate_dump.py mem.raw # full pipeline + column-drift report ``` `scripts/validate_dump.py` 会标记出任何其真实 Vol3 列 未能映射到事件的收集数据集——这是合成测试无法捕获的偏移。 ## 许可证 Apache-2.0。
标签:子域名突变, 请求拦截, 逆向工具