NimPlant 开源项目使用教程
1. 项目的目录结构及介绍
NimPlant 是一个轻量级的第一阶段 C2(Command and Control)植入工具,使用 Nim 和 Rust 编程语言编写。以下是项目的目录结构及其介绍:
NimPlant/
├── .devcontainer/
├── .github/
├── client-rs/
│ ├── client/
│ └── detection/
├── client/
│ ├── bin/
│ ├── nimplant.py
│ ├── Dockerfile
│ └── ...
├── docker-example/
├── server/
├── ui/
├── .dockerignore
├── .gitignore
├── LICENSE
├── README.md
├── config.toml.example
└── ...
client-rs/
: 包含 NimPlant 的 Rust 实现部分。client/
: 包含 NimPlant 的 Nim 实现部分,bin/
目录存放编译后的二进制文件。server/
: NimPlant 的服务器部分,用于接收和处理来自植入程序的指令。ui/
: NimPlant 的 Web 用户界面部分。docker-example/
: 提供了一个使用 Docker 容器的示例。.devcontainer/
,.github/
: 这些目录包含开发环境和 CI/CD 配置文件。.dockerignore
,.gitignore
: 分别是 Docker 和 Git 的忽略文件。LICENSE
: 项目许可证文件。README.md
: 项目说明文件。config.toml.example
: 配置文件的示例。
2. 项目的启动文件介绍
项目的启动主要是通过 client/
目录下的 nimplant.py
脚本。以下是启动文件的基本介绍:
nimplant.py
: 这个 Python 脚本用于编译和配置 NimPlant。它接受不同的参数来编译不同类型的植入程序,例如.exe
、.dll
、.bin
等。
编译植入程序的示例命令如下:
python nimplant.py compile exe
3. 项目的配置文件介绍
NimPlant 的配置文件为 config.toml
,通常建议从 config.toml.example
复制并修改。以下是配置文件中的主要设置:
# 服务器设置
server = {
ip = "127.0.0.1", # 服务器监听地址
port = 8080, # 服务器监听端口
}
# 监听器设置
listener = {
type = "HTTP", # 监听器类型,HTTP 或 HTTPS
sslCertPath = "", # HTTPS 证书文件路径
sslKeyPath = "", # HTTPS 证书密钥文件路径
hostname = "", # 监听器主机名
ip = "127.0.0.1", # 监听器 IP
port = 8080, # 监听器端口
registerPath = "/register", # 注册 URI 路径
taskPath = "/task", # 任务 URI 路径
resultPath = "/result" # 结果 URI 路径
}
# 植入程序设置
nimplant = {
riskyMode = false, # 是否启用风险模式
sleepMask = false, # 是否使用 Ekko sleep mask
sleepTime = 10, # 默认休眠时间(秒)
sleepJitter = 0.5, # 默认抖动百分比
killDate = "", # 杀死日期(格式:yyyy-MM-dd)
userAgent = "NimPlant" # 用户代理字符串
}
在配置文件中,你可以根据实际需求修改监听器类型、端口、IP 地址等设置,以及植入程序的休眠时间、用户代理等参数。配置完成后,可以将配置文件传递给 nimplant.py
脚本进行编译。
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考