Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
malboxes — 构建恶意软件分析Windows虚拟机,让你无需亲自动手。 | Kitploit
工具/GitHubGitHub/gosecure/malboxes
取证分析恶意软件分析
GitHubgosecure/malboxes

malboxes

构建恶意软件分析Windows虚拟机,让你无需亲自动手。

查看仓库
1.0k1374年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

= Malboxes :toc: preamble :toclevels: 2 :twob: https://twitter.com/obilodeau :twhg: https://twitter.com/hugospns // github stuff ifdef::env-github[:github:]

ifndef::github[] // local logo image::docs/logos/main.svg[Malboxes 标志] endif::[]

ifdef::github[] // logo on github image::https://raw.githubusercontent.com/GoSecure/malboxes/master/docs/logos/main.svg?sanitize=true[Malboxes 标志]

.项目状态 // Travis Build Status image:https://img.shields.io/travis/GoSecure/malboxes/master.svg[构建状态 (Travis CI), link=https://travis-ci.org/GoSecure/malboxes] // BlackHat Arsenal 2017 image:https://raw.githubusercontent.com/toolswatch/badges/master/arsenal/usa/2017.svg?sanitize=true[黑帽军械库 2017, link=https://www.toolswatch.org/2017/06/the-black-hat-arsenal-usa-2017-phenomenal-line-up-announced/] // Gitter Chat image:https://badges.gitter.im/malboxes_/Lobby.svg[link="https://gitter.im/malboxes_/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"] endif::[]

构建恶意软件分析 Windows 虚拟机,让你无需亲自操劳。

https://github.com/gosecure/malboxes

== 系统要求

  • Python 3.3+
  • https://www.packer.io/docs/install/index.html[Packer]
  • vagrant: https://www.vagrantup.com/downloads.html
  • https://www.virtualbox.org/wiki/Downloads[VirtualBox] 或 vSphere / ESXi 服务器

=== 构建机的最低规格

  • 至少 5 GB 内存
  • 强烈推荐 VT-X 扩展

=== Fedora

root@kitploit:~
dnf install ruby-devel gcc-c++ zlib-devel
vagrant plugin install winrm winrm-fs

=== Debian

root@kitploit:~
apt install vagrant git python3-pip

=== Ubuntu

root@kitploit:~
apt install git python3-pip

=== ArchLinux

root@kitploit:~
pacman -Sy vagrant packer python-pip git

== 安装

=== Linux/Unix

  • 使用你的发行版包管理工具安装 git 和 packer (packer 有时被称为 packer-io)
  • 从他们的网站安装 vagrant:https://www.vagrantup.com/downloads.html(从某些发行版的包管理工具安装曾引发问题)
  • 使用 pip install 安装 malboxes:
  • sudo pip3 install git+https://github.com/GoSecure/malboxes.git#egg=malboxes

=== Windows

注意:从 Windows 10 开始,Hyper-V 始终在操作系统底层运行。由于 VT-X 必须由单个虚拟机监控程序独占操作,https://github.com/GoSecure/malboxes/issues/39[这会导致 VirtualBox (以及 malboxes) 失败]。要禁用 Hyper-V 并使 VirtualBox 能够运行,请在管理员命令提示符下执行以下命令,然后重启:bcdedit /set hypervisorlaunchtype off

==== 使用 Chocolatey

以下步骤假定你已安装 https://chocolatey.org/[Chocolatey]。否则,请按照<<Manual,手动安装>>步骤操作。

  • 安装依赖项:
  • choco install python vagrant packer git virtualbox
  • 刷新控制台
  • refreshenv
  • 安装 malboxes:
  • pip3 install setuptools pip3 install -U git+https://github.com/GoSecure/malboxes.git#egg=malboxes

==== 手动安装

  • 安装 https://www.virtualbox.org/wiki/Downloads[VirtualBox]、 https://www.vagrantup.com/downloads.html[Vagrant] 和 https://git-scm.com/downloads[git]
  • https://www.packer.io/downloads.html[安装 Packer],将 packer 可执行文件放在用户 PATH 环境变量中的某个文件夹中,例如 C:\Windows\System32\
  • https://www.python.org/downloads/[安装 Python 3](确保将 Python 添加到环境变量中)
  • 打开控制台(Windows 键 + cmd)
  • pip3 install setuptools pip3 install -U git+https://github.com/GoSecure/malboxes.git#egg=malboxes

=== 部署到 AWS(可选) 在正常安装后运行此命令:

root@kitploit:~
vagrant plugin install vagrant-aws

注意:目前 AWS 功能仅在 Linux 上测试过,且 EC2 不支持 32 位桌面版 Windows 10。

== 使用方法

=== 创建盒子

这将创建你的基础盒子,并导入到 Vagrant 中。之后,你可以多次重复使用同一个盒子进行样本分析。

运行:

root@kitploit:~
malboxes build <模板>

你还可以通过以下命令列出所有支持的模板:

root@kitploit:~
malboxes list

这将构建一个准备好用于恶意软件调查的 Vagrant 盒子,之后你可以将其包含在 Vagrantfile 中。

例如:

root@kitploit:~
malboxes build win10_x64_analyst

<<_configuration,配置部分>>包含了关于 malboxes 可配置内容的更多信息。

=== 每次分析实例

root@kitploit:~
malboxes spin win10_x64_analyst <名称>

这将创建一个用于恶意软件分析的 Vagrantfile。将其移动到任意目录,然后执行:

root@kitploit:~
vagrant up

默认情况下,本地目录会共享到虚拟机的桌面上。你可以通过注释 Vagrantfile 中的相关部分来更改此设置。

例如:

root@kitploit:~
malboxes spin win7_x86_analyst 20160519.cryptolocker.xyz

=== 部署到 AWS(可选)

Malboxes 可以上传虚拟机并与亚马逊 Web 服务上的虚拟机交互。为此,请按照以下步骤操作:

. Malboxes 需要在 AWS 上有一个 S3 存储桶,用于上传虚拟机,然后将其转换为 AMI(亚马逊机器镜像)。如果你没有, link:https://docs.aws.amazon.com/quickstarts/latest/s3backup/step-1-create-bucket.html[立即创建一个。]

. 你的实例还需要一个 link:https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#CreatingSecurityGroups[安全组],其中至少包含一条允许 WinRM 入站连接的规则(类型:WinRM-HTTP,协议:TCP,端口范围:5985,来源:主机的公共 IP)。

. 接下来,你需要配置一个 vmimport 服务角色。 请按照 https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html[本指南] 中名为《VM 导入服务角色》的部分进行操作。 这些步骤必须由具有 iam:CreateRole 和 iam:PutRolePolicy 权限的账户执行。

. 如果使用 <<_configuration,默认配置>>,请将 hypervisor 改为 aws,并填写相关的必填选项。否则,请确保在你的自定义配置中添加所有关于 AWS 的选项。

. 最后,你可以按照 <<创建盒子>> 和 <<每次分析实例>> 部分中描述的相同步骤来启动实例!

注意:AMI 导入可能需要很长时间(大约一个小时),但你可以通过执行 <<AMI 导入状态>> 来验证任务状态。目前,每个模板只能构建一个 AMI。

==== AMI 导入状态 使用 pip 安装 awscli:

root@kitploit:~
pip install awscli

link:https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration[配置] awscli,运行:

root@kitploit:~
aws configure

然后执行:

root@kitploit:~
aws ec2 describe-import-image-tasks

==== RDP

要使用 RDP 连接到云中的实例,请在 Vagrantfile 所在的位置运行此命令:

root@kitploit:~
vagrant rdp -- /cert-ignore

为此,实例需要有一个安全组允许 RDP 入站连接(类型:RDP,协议:TCP,端口范围:3389,来源:主机的公共 IP)。

注意:你可以安全地忽略以下错误,因为 rsync 尚未实现:No host IP was given to the Vagrant core NFS helper. This is an internal error that should be reported as a bug.

==== 停止实例

要停止云中的实例,请在 Vagrantfile 所在的位置运行此命令:

root@kitploit:~
vagrant halt

== 配置

Malboxes 的配置文件位于一个遵循常规操作系统约定的目录中:

  • Linux/Unix:~/.config/malboxes/
  • Mac OS X:~/Library/Application Support/malboxes/
  • Win 7+:C:\Users\<你的用户名>\AppData\Local\malboxes\malboxes\

该文件名为 config.js,首次运行时从示例文件复制而来。 link:malboxes/config-example.js[示例配置] 都带有说明。

=== ESXi / vSphere 支持

Malboxes 默认使用 virtualbox 作为后端,但从 0.3.0 版本开始,已添加对 ESXi / vSphere 的支持。相关 link:docs/esx-setup.adoc[ESXi / vSphere 支持所需步骤的说明] 可以参阅。由于每个人的设置略有不同,如果你遇到问题或希望通过拉取请求改进我们的文档,请随时提出 issue。

=== 配置文件

我们正在探索“配置文件”的概念,这些文件与配置分开存储,可用于创建文件、修改注册表或安装额外软件包。请参阅 link:malboxes/profile-example.js[profile-example.js] 示例配置。这项新功能尚处于实验阶段,随着我们进一步试验,可能会发生变化。

=== AWS 安全组

目前,Malboxes 不支持自动创建安全组,因此你需要使用 AWS 控制台自行创建。不过,利用 link:https://boto3.amazonaws.com/v1/documentation/api/latest/index.html[Boto3] 库,应该可以实现这一功能。

== 更多信息

=== 视频

介绍视频

image::https://img.youtube.com/vi/oq6N3WLAoe8/0.jpg[link="https://www.youtube.com/watch?v=oq6N3WLAoe8"]

=== 博客文章

  • 介绍性博客文章: http://gosecure.net/2017/02/16/introducing-malboxes-a-tool-to-build-malware-analysis-virtual-machines/

=== 演讲

malboxes 曾在 https://www.nsec.io/2016/01/applying-devops-principles-for-better-malware-analysis/[NorthSec 2016] 上展示,演讲题目为《将 DevOps 原则应用于更好的恶意软件分析》 ,由 link:{twob}[Olivier Bilodeau] 和 link:{twhg}[Hugo Genesse] 共同呈现。

  • http://gosecure.github.io/presentations/2016-05-19_northsec/malboxes.html[幻灯片] (HTML,最佳)
  • http://gosecure.github.io/presentations/2016-05-19_northsec/OlivierBilodeau_HugoGenesse-Malboxes.pdf[幻灯片] (PDF,降级)
  • https://www.youtube.com/watch?v=rfmUcYGGrls&list=PLuUtcRxSUZUpg-z0MkDrFrwMiiFMVr1yI[视频]

== 许可证

代码基于 GPLv3+ 许可证,详情请见 LICENSE。文档和演示材料基于知识共享 署名-相同方式共享 4.0 国际许可证,详情请见 docs/LICENSE。

== 致谢

在我有了改进恶意软件分析师工作流程的想法(基于我在 Linux 服务器上使用 Vagrant 进行开发的经验)后,我迅速谷歌了一下是否有人已经在做相关的事情。

我在 GitHub 上找到了 Mark Andrew Dwyer 的 https://github.com/m-dwyer/packer-malware[packer-malware] 仓库。Malboxes 的启动得益于他的工作,尤其是在 Autounattend.xml 文件方面给了我很大帮助。

下载工具