incredincomp/sandbox-toolkit

GitHub: incredincomp/sandbox-toolkit

基于 Windows Sandbox 的恶意软件分析工具包,通过清单驱动和配置文件实现分析环境的快速构建与工具自动部署。

Stars: 0 | Forks: 0

# Windows Sandbox 工具包 一个清单驱动、配置文件感知的 Windows Sandbox 环境,专为**防御性恶意软件分析和逆向工程**而设计。 ## 独立项目 本仓库作为独立项目维护,位于 `incredincomp/sandbox-toolkit`。 它是清单驱动的(`tools.json`),支持配置文件(`minimal`、`reverse-engineering`、`network-analysis`、`full`),并为防御性恶意软件分析、逆向工程和样本分类而构建。 默认姿态为“默认更安全”:一次性沙箱会话、只读映射脚本,以及默认禁用网络(除非明确选择了联网配置文件)。 ### 仓库迁移 本项目从早期的 `sandbox` 仓库迁移而来,现正式维护于 `https://github.com/incredincomp/sandbox-toolkit`。 ## 快速开始 ``` # Clone 仓库 git clone https://github.com/incredincomp/sandbox-toolkit.git cd sandbox-toolkit # 运行 setup (default profile: reverse-engineering) .\Start-Sandbox.ps1 # Windows Sandbox 打开并自动安装所有 tools ``` 请参阅 [QUICKSTART.md](QUICKSTART.md) 获取包含前置条件的分步指南。 ## 配置文件 | Profile | Networking | Tools | |---|---|---| | `minimal` | ❌ 禁用 | VSCode, Notepad++, Python 3, Sysinternals | | `reverse-engineering` *(默认)* | ❌ 禁用 | + Ghidra, x64dbg, dnSpyEx, DIE, UPX, PE-bear, pestudio, HxD, FLOSS | | `network-analysis` | ✅ 启用 | + Wireshark, Npcap | | `full` | ✅ 启用 | 所有工具 | ``` .\Start-Sandbox.ps1 -Profile minimal .\Start-Sandbox.ps1 -Profile network-analysis ``` 有关完整详情,请参阅 [PROFILES.md](PROFILES.md)。 ## 已安装工具 | Tool | Category | Source | Notes | |---|---|---|---| | [7-Zip](https://www.7-zip.org/) | 实用工具 | Vendor | 必需;解压所有 zip 工具 | | [Visual Studio Code](https://code.visualstudio.com/) | 编辑器 | GitHub | 最新稳定版 | | [Notepad++](https://notepad-plus-plus.org/) | 编辑器 | GitHub | 最新稳定版 | | [Python 3](https://www.python.org/) | Runtime | Vendor | 3.13.2 | | [Amazon Corretto JDK 21](https://aws.amazon.com/corretto/) | Runtime | Vendor | Ghidra 11.x 必需 | | [Visual C++ Redist x64](https://aka.ms/vs/17/release/vc_redist.x64.exe) | Runtime | Vendor | PE-bear 必需 | | [Sysinternals Suite](https://docs.microsoft.com/sysinternals/) | 系统分析 | Vendor | 始终为最新版 | | [Ghidra](https://ghidra-sre.org/) | 逆向 | GitHub | 最新稳定版 | | [x64dbg](https://x64dbg.com/) | 逆向 | SourceForge | 最新快照 | | [dnSpyEx](https://github.com/dnSpyEx/dnSpy) | 逆向 | GitHub | 已归档 dnSpy 的活跃分支 | | [Detect-It-Easy](https://github.com/horsicq/DIE-engine) | 逆向 | GitHub | 最新稳定版 | | [UPX](https://upx.github.io/) | 逆向 | GitHub | 最新稳定版 | | [PE-bear](https://github.com/hasherezade/pe-bear) | 逆向 | GitHub | 最新稳定版 | | [pestudio](https://www.winitor.com/) | 逆向 | Vendor | 最新版 | | [HxD](https://mh-nexus.de/en/hxd/) | 逆向 | Vendor | 最新版 | | [FLARE FLOSS](https://github.com/mandiant/flare-floss) | 逆向 | GitHub | 最新稳定版 | | [Wireshark](https://www.wireshark.org/) | 网络 | Vendor | 仅 network-analysis/full | | [Npcap](https://npcap.com/) | 网络 | Vendor | **手动安装**(无静默模式) | ### 移除的工具(对比旧版本) | Tool | Reason | |---|---| | Python 2 | 自 2020 年 1 月起已 EOL。 | | DosBox | 与恶意软件分析工作流无关。 | | Sublime Text | 与 VSCode 和 Notepad++ 重复。 | | AutoIT Extractor | 来源为未验证的 GitLab CI 产物;无稳定版本。 | | dnSpy (原版) | 2022 年被原作者归档。已被 dnSpyEx 取代。 | ## 仓库结构 ``` sandbox-toolkit/ ├── Start-Sandbox.ps1 # Main entry point — run this on the host ├── tools.json # Tool manifest: versions, URLs, profiles, install behavior ├── sandbox.wsb.template # Reference template (actual .wsb is generated) ├── src/ │ ├── Manifest.ps1 # Manifest loading and profile filtering │ ├── Download.ps1 # Download with retry and GitHub release resolution │ └── SandboxConfig.ps1 # .wsb generation ├── scripts/ │ ├── autostart.cmd # Thin launcher (runs on sandbox startup) │ ├── Install-Tools.ps1 # In-sandbox install orchestrator │ └── setups/ # Downloaded files (gitignored, populated at runtime) ├── schemas/ │ └── tools.schema.json # JSON Schema for tools.json validation ├── .github/ │ └── workflows/ │ └── validate.yml # CI: PSScriptAnalyzer + manifest validation ├── README.md ├── QUICKSTART.md ├── PROFILES.md ├── TROUBLESHOOTING.md ├── SAFETY.md └── CHANGELOG.md ``` ## 工作原理 1. **`Start-Sandbox.ps1`** 在您的主机上运行: - 检查 Windows Sandbox 是否已启用。 - 加载 `tools.json` 并根据选定的配置文件过滤工具。 - 将缺失的工具安装程序下载到 `scripts/setups/`(带重试机制)。 - 写入 `scripts/install-manifest.json`(临时会话文件)。 - 生成具有配置文件相应设置(如网络等)的 `sandbox.wsb`。 - 启动 Windows Sandbox。 2. **`scripts/autostart.cmd`** 在沙箱启动时自动运行,并调用 **`scripts/Install-Tools.ps1`**(沙箱内): - 从只读映射的脚本文件夹读取 `install-manifest.json`。 - 按依赖顺序安装所有工具。 - 将详细日志写入 `%USERPROFILE%\Desktop\install-log.txt`。 ## 安全姿态 - 网络连接**默认禁用**(除 `network-analysis` 和 `full` 外的所有配置文件)。 - `scripts/` 主机文件夹以**只读**方式映射。 - 不会自动执行来自主机的样本。 - 沙箱完全是一次性的;关闭后不会保留任何内容。 有关完整的安全指导,请参阅 [SAFETY.md](SAFETY.md)。 ## 贡献 - 工具版本更新:编辑 `tools.json`。CI 会在每次推送时验证清单。 - 新增工具:按照 `schemas/tools.schema.json` 中的模式添加条目。 - 配置文件:更新每个相关工具条目中的 `profiles` 数组。 ## 许可证 如果存在,请参阅 [LICENSE](LICENSE),或检查仓库根目录。
标签:AI合规, DAST, DNS 反向解析, DNS 解析, Ghidra, HAR文件处理, Homebrew安装, HTTP工具, Libemu, Mr. Robot, PowerShell脚本, Sysinternals套件, Windows Sandbox, Windows沙盒, Wireshark, 云安全监控, 云资产清单, 句柄查看, 后渗透, 子域名变形, 恶意软件分析, 数据包嗅探, 无线安全, 样本分析, 沙箱逃逸检测, 流量嗅探, 网络安全审计, 自动化环境, 逆向工程, 配置文件管理, 防御性安全, 隔离环境, 静态分析