CodeWithAmeer/Meta-Forensics
GitHub: CodeWithAmeer/Meta-Forensics
一款基于 C++ 的 Linux 原生数字取证工具,集成文件分析、元数据提取、IOC 挖掘与威胁检测能力,帮助蓝队快速完成应急响应中的证据分流与结构化报告生成。
Stars: 0 | Forks: 0
# Meta-Forensics
Meta-Forensics 是一个基于 Debian 系统的 Linux 原生取证分流与证据分析工具。它收集文件元数据、哈希、字符串、指标、时间轴事件、Linux 实时痕迹以及用于防御性调查的结构化报告。
## 功能特性
- 文件哈希:MD5、SHA1、SHA256、SHA512
- 文件签名与熵分析
- 针对域名、IP、路径、电子邮件、哈希和钱包字符串提取 IOC
- 解析 PE、PDF、Office、LNK、注册表导出文件、Prefetch、Amcache、ShimCache 和 SRUM 证据
- 使用 `/proc`、`/proc/net`、cron、systemd、XDG 自启动、Shell 启动文件、SSH 密钥和 USB sysfs 路径检查 Linux 实时痕迹
- 可选支持 YARA、Sigma 风格规则、ssdeep、TLSH、osslsigncode 和 Graphviz
- 支持 TXT、JSON、CSV、Markdown、HTML、DOT、STIX JSON 和清单格式的报告
## 系统要求
基础依赖:
```
sudo apt update
sudo apt install -y g++ coreutils
```
可选工具:
```
sudo apt install -y cmake yara ssdeep tlsh-tools osslsigncode graphviz
```
## 构建
使用构建脚本:
```
chmod +x build_debian.sh
./build_debian.sh
```
使用 CMake:
```
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j1
```
## 用法
```
./meta-forensics --help
./meta-forensics analyze /path/to/evidence.bin --out reports
./meta-forensics analyze /path/to/directory --recursive --out reports
./meta-forensics memory --out reports
./meta-forensics cases list
./meta-forensics cases view default-case
```
常用选项:
```
--case CASE_ID
--evidence EVIDENCE_ID
--investigator NAME
--hostname HOSTNAME
--out REPORT_DIR
--recursive
--no-memory
--no-yara
--no-sigma
--no-pe
--no-artifacts
--no-live-artifacts
--no-stix-export
--export-overlay
```
## 快速测试
```
./build_debian.sh
./meta-forensics --help
printf 'Meta-Forensics smoke test\n' > sample.txt
./meta-forensics analyze sample.txt --out test_reports --no-memory --no-live-artifacts --no-yara --no-sigma --no-pe --no-artifacts --no-stix-export
find test_reports -type f -size +0
```
## 仓库目录结构
```
include/meta_forensics/ modular implementation headers
src/main.cpp command-line entry point
docs/ usage and output documentation
yara_rules/ optional YARA rules
sigma_rules/ optional Sigma-style rules
threat_db/ local IOC and signer lists
scripts/ packaging helpers
.github/workflows/ CI build checks
```
## 模块结构
```
common.hpp shared includes, utility functions, file mapping
process.hpp process execution and PATH lookup helpers
hash.hpp file and buffer hashing helpers
model.hpp result models, graph, timeline, threat database, context
signature.hpp PE signature inspection and base64 helpers
core_ioc.hpp core file analysis and IOC extraction
rules.hpp YARA and Sigma-style rule support
pe.hpp PE parser and executable analysis
documents_artifacts.hpp document and artifact parsers
runtime.hpp script decoding, similarity, process, memory, network checks
reports_cases.hpp scoring, report export, case storage, analysis orchestration
```
## 安全使用
以只读方式分析未知证据。不要执行可疑文件。将报告与原始证据分开存储。
## 许可证
MIT 许可证。详见 `LICENSE`。
标签:AMSI绕过, Bash脚本, DAST, HTTP请求, IOC提取, Linux取证, STIX, YARA, 二进制发布, 云资产可视化, 元数据提取, 域渗透, 威胁检测, 库, 应急响应, 开源工具, 恶意软件分析, 攻击指标提取, 数字取证, 数字证据, 文件分析, 文件哈希, 熵分析, 电子数据取证, 系统加固, 聊天机器人, 自动化脚本, 证据分析, 进程保护, 高级取证