AIForensicAgents/forensicToolkit
GitHub: AIForensicAgents/forensicToolkit
一个基于 Node.js 的模块化、可扩展的数字取证框架,通过统一的注册中心接口管理和执行多种取证分析工具。
Stars: 0 | Forks: 0

# forensicToolkit
### AI Forensic Agents 开发的可扩展数字取证 Toolkit
[](https://nodejs.org/)
[](LICENSE)
[](CONTRIBUTING.md)
**注册。管理。分析。**
一个用于构建、组织和执行数字取证分析工具的模块化框架 —— 所有操作均通过单一、统一的界面完成。
[概述](#overview) · [功能特性](#features) · [快速开始](#quick-start) · [安装](#installation) · [工具类别](#tool-categories) · [API 参考](#api-reference) · [贡献](#contributing)
## 概述
**forensicToolkit** 是一个开源、可扩展的数字取证框架,专为调查人员、事件响应人员和安全研究人员设计。forensicToolkit 提供了一个统一的基于注册中心的架构,而非费力协调数十个独立的实用程序,在这个架构中,每一个工具 —— 无论它是分析磁盘镜像、易失性内存、网络捕获、恶意软件样本、日志文件还是移动设备提取数据 —— 都是通过一致的接口进行注册、管理和执行的。
该框架基于 **Node.js 18+** 构建,强调:
- **模块化** —— 每个工具都是具有标准化接口的独立模块。
- **可扩展性** —— 添加新工具只需三步:创建、注册、导出。
- **一致性** —— 每个工具都遵循相同的生命周期:`initialize → execute → report`。
- **协作性** —— 清晰的项目结构和注册格式使团队贡献无缝衔接。
无论您是正在进行大规模的事件响应工作,还是为组织构建自定义取证流水线,forensicToolkit 都提供了脚手架,让您在不牺牲严谨性的前提下快速行动。
## 功能特性
| 功能 | 描述 |
|---|---|
| 🔌 **插件架构** | 通过中央注册中心的简单 JavaScript 对象注册任何工具。 |
| 📂 **六大取证类别** | 内置支持磁盘、内存、网络、恶意软件、日志和移动取证。 |
| 🚀 **统一 CLI 与 API** | 从命令行运行工具或通过编程方式集成到您自己的工作流中。 |
| 📋 **标准化报告** | 每个工具都以一致、结构化的格式输出结果(默认为 JSON)。 |
| ⚙️ **可配置流水线** | 将工具链接在一起,并将输出从一个阶段传递到下一个阶段。 |
| 🔒 **证据完整性** | 为每个操作内置哈希和监管链记录。 |
| 🧩 **热重载支持** | 在运行时注册新工具,无需重启框架。 |
| 📝 **全面日志记录** | 为每个工具调用提供详细的审计跟踪,可配置详细程度。 |
| 🌐 **跨平台** | 只要有 Node.js 18+,即可在 Linux、macOS 和 Windows 上运行。 |
| 🤝 **社区驱动** | 从一开始就为开放贡献和扩展而设计。 |
## 快速开始
在两分钟内启动并运行:
```
# 克隆 repository
git clone https://github.com/ai-forensic-agents/forensicToolkit.git
cd forensicToolkit
# 安装 dependencies
npm install
# 列出所有已注册的 tools
node index.js --list
# 运行特定 tool
node index.js --run disk-imager --target /dev/sda --output ./evidence/
# 运行 category 中的所有 tools
node index.js --category disk-forensics --target /dev/sda --output ./evidence/
```
## 安装
### 前置条件
| 需求 | 版本 | 说明 |
|---|---|---|
| **Node.js** | ≥ 18.0.0 | [下载](https://nodejs.org/) — 推荐使用 LTS 版本 |
| **npm** | ≥ 9.0.0 | 随 Node.js 18+ 附带 |
| **Git** | ≥ 2.30 | 用于克隆和贡献 |
### 分步安装
**1. 克隆仓库**
```
git clone https://github.com/ai-forensic-agents/forensicToolkit.git
cd forensicToolkit
```
**2. 安装依赖**
```
npm install
```
**3. 验证安装**
```
node index.js --version
```
您应该看到类似以下的输出:
```
forensicToolkit v1.0.0
Node.js v18.x.x
Registered tools: 12
```
**4. (可选)全局安装**
```
npm link
```
这允许您从系统的任何位置运行 `forensic-toolkit`。
**5. (可选)运行测试套件**
```
npm test
```
## 项目结构
```
forensicToolkit/
├── assets/
│ └── logo.png # Project logo and branding assets
├── config/
│ ├── default.json # Default framework configuration
│ ├── logging.json # Logging verbosity and output settings
│ └── pipelines/ # Pre-built pipeline definitions
│ ├── full-disk-analysis.json
│ └── incident-response.json
├── docs/
│ ├── API.md # Full API documentation
│ ├── ARCHITECTURE.md # Architecture decision records
│ └── TOOL_DEVELOPMENT.md # Detailed tool development guide
├── lib/
│ ├── core/
│ │ ├── engine.js # Tool execution engine
│ │ ├── loader.js # Dynamic tool loader
│ │ ├── logger.js # Logging subsystem
│ │ ├── reporter.js # Report generation module
│ │ └── validator.js # Registry & input validation
│ ├── utils/
│ │ ├── hash.js # Hashing utilities (MD5, SHA-256, etc.)
│ │ ├── filesystem.js # File system helpers
│ │ └── chain-of-custody.js # Evidence integrity tracking
│ └── cli/
│ ├── index.js # CLI entry point and argument parser
│ └── commands/ # CLI command handlers
│ ├── list.js
│ ├── run.js
│ └── validate.js
├── tools/
│ ├── registry.js # ★ Central tool registry
│ ├── disk-forensics/
│ │ ├── disk-imager.js # Disk imaging tool
│ │ └── partition-analyzer.js # Partition table analysis
│ ├── memory-forensics/
│ │ ├── memdump-parser.js # Memory dump parser
│ │ └── process-scanner.js # Running process reconstruction
│ ├── network-forensics/
│ │ ├── pcap-analyzer.js # PCAP file analyzer
│ │ └── dns-extractor.js # DNS query extraction
│ ├── malware-analysis/
│ │ ├── static-analyzer.js # Static binary analysis
│ │ └── yara-scanner.js # YARA rule scanner
│ ├── log-analysis/
│ │ ├── syslog-parser.js # Syslog parsing and correlation
│ │ └── timeline-generator.js # Event timeline reconstruction
│ └── mobile-forensics/
│ ├── ios-backup-parser.js # iOS backup extraction
│ └── android-db-reader.js # Android SQLite database reader
├── test/
│ ├── core/ # Core module unit tests
│ ├── tools/ # Tool-specific tests
│ └── integration/ # End-to-end integration tests
├── .eslintrc.json # ESLint configuration
├── .gitignore
├── CONTRIBUTING.md # Contribution guidelines
├── LICENSE # MIT License
├── index.js # Main entry point
├── package.json
└── README.md # ← You are here
```
## 工具类别
forensicToolkit 将工具组织为 **六大核心取证类别**。每个类别对应 `tools/` 下的一个子目录,并服务于独特的调查目的。
### 💾 磁盘取证 (Disk Forensics)
**目录:** `tools/disk-forensics/`
用于获取和分析硬盘、固态硬盘及可移动存储介质数据的工具。包括磁盘镜像、分区分析、文件系统解析、删除文件恢复和松散空间(slack space)分析。
### 🧠 内存取证 (Memory Forensics)
**目录:** `tools/memory-forensics/`
用于分析易失性内存 (RAM) 转储的工具。支持进程重构、已加载 DLL 枚举、网络连接提取、内存注册表配置单元分析以及 Rootkit 检测。
### 🌐 网络取证 (Network Forensics)
**目录:** `tools/network-forensics/`
用于捕获和分析网络流量的工具。支持 PCAP 解析、协议解剖、DNS 查询提取、HTTP 会话重构以及异常流量检测。
### 🦠 恶意软件分析 (Malware Analysis)
**目录:** `tools/malware-analysis/`
用于对可疑二进制文件和脚本进行静态及动态分析的工具。包括 PE 头解析、字符串提取、YARA 规则扫描、熵分析和 IOC 提取。
### 📜 日志分析 (Log Analysis)
**目录:** `tools/log-analysis/`
用于解析、关联和可视化系统及应用程序日志的工具。支持 syslog、Windows 事件日志、Web 服务器访问日志以及自动化时间线生成。
### 📱 移动取证 (Mobile Forensics)
**目录:** `tools/mobile-forensics/`
用于从移动设备提取和分析数据的工具。涵盖 iOS 备份解析、Android 数据库读取、应用数据提取和通信日志恢复。
## 如何添加新工具
向 forensicToolkit 添加工具是一个直接的三步过程。本示例演示如何在 `disk-forensics` 类别中创建一个 **文件哈希验证器**。
### 第 1 步:创建工具文件
在 `tools/` 下的相应类别目录中创建一个新的 JavaScript 文件。
**文件:** `tools/disk-forensics/hash-verifier.js`
```
/**
* Hash Verifier Tool
* Computes and verifies cryptographic hashes of evidence files
* to ensure integrity throughout the forensic process.
*
* @module tools/disk-forensics/hash-verifier
* @category disk-forensics
* @version 1.0.0
*/
const crypto = require("crypto");
const fs = require("fs");
const path = require("path");
/**
* Initialize the tool with the provided configuration.
* Called once before execution begins.
*
* @param {Object} config - Tool configuration object
* @param {string} config.algorithm - Hash algorithm (e.g., "sha256", "md5")
* @returns {Promise标签:AI智能体, BurpSuite集成, DAST, Digital Forensics, DNS 反向解析, GNU通用公共许可证, HTTP工具, Incident Response, IP 地址批量处理, MITM代理, Node.js, SecList, Threat Hunting, 二进制发布, 内存取证, 取证工具包, 可扩展框架, 库, 应急响应, 开源工具, 恶意软件分析, 数字取证, 数据可视化, 文档结构分析, 电子取证, 磁盘取证, 移动取证, 网络安全, 网络安全审计, 自动化取证, 自动化脚本, 自定义脚本, 隐私保护