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/name-that-hash.md
View on GitHub# Name-That-Hash
- **Category**: Password Attacks / Hash Identification
- **Risk Level**: 🟢 Low
---
## 描述
现代化的哈希类型识别工具,是 `hashid` 的继承者。从原始哈希字符串识别哈希类型,并提供对应的 hashcat 模式编号和 john 格式名称。比 `hashid` 具有更高的识别准确率、更好的输出格式、置信度排序以及对新型哈希类型的支持。适用于交互式使用和脚本自动化管道。
## 安装
```bash
sudo apt install name-that-hash
# 或通过 pip 安装
pip3 install name-that-hash
```
## 参数说明
| 参数 | 说明 |
|------|------|
| `-t <hash>` | 识别单个哈希字符串 |
| `-f <file>` | 从文件识别哈希(每行一个) |
| `-g` | 可 grep 输出(JSON 格式) |
| `-b64` | 识别前先对哈希进行 Base64 解码 |
| `-e`, `--extreme` | 在字符串中搜索哈希 |
| `-a` | 无障碍输出模式(无 ASCII 艺术) |
| `-v` | 详细/调试日志(-vvv 为最大详细度) |
| `--no-banner` | 隐藏横幅 |
| `--no-john` | 隐藏 john 格式建议 |
| `--no-hashcat` | 隐藏 hashcat 模式建议 |
## 常用命令
```bash
# 识别单个哈希
nth -t '5f4dcc3b5aa765d61d8327deb882cf99'
# 无障碍输出模式
nth -t '5f4dcc3b5aa765d61d8327deb882cf99' -a
# 从文件批量识别哈希
nth -f hashes.txt
# 可 grep 输出(适用于脚本)
nth -t '5f4dcc3b5aa765d61d8327deb882cf99' -g
# 从其他工具管道输入(如提取并识别)
cat /etc/shadow | awk -F: '{print $2}' | nth -f -
# 无横幅识别(干净输出)
nth -t '5f4dcc3b5aa765d61d8327deb882cf99' --no-banner
# 仅显示 hashcat 模式(隐藏 john 格式)
nth -t '5f4dcc3b5aa765d61d8327deb882cf99' --no-john
# 典型工作流:识别哈希后破解
nth -t '$2y$10$abcdefghijklmnopqrstuuABCDEFGHIJKLMNOPQRSTUVWXYZ01234'
# 输出:bcrypt [Hashcat Mode: 3200] [John Format: bcrypt]
hashcat -m 3200 hash.txt /usr/share/wordlists/rockyou.txt
```
### 常见哈希特征
| 模式 | 可能类型 | hashcat 模式 |
|------|----------|--------------|
| 32 个十六进制字符 | MD5 | 0 |
| 40 个十六进制字符 | SHA-1 | 100 |
| 64 个十六进制字符 | SHA-256 | 1400 |
| `$2y$` 或 `$2a$` 前缀 | bcrypt | 3200 |
| `$6$` 前缀 | sha512crypt | 1800 |
| `$1$` 前缀 | md5crypt | 500 |
## 注意事项
1. 使用 `nth`(CLI 别名)而非输入 `name-that-hash`——这是标准调用方式。
2. `name-that-hash` 按置信度排序结果,最可能的哈希类型排在首位——从最高排名的结果开始破解。
3. 对于模糊哈希(如 32 个十六进制字符可能是 MD5、NTLM 或 MD4),先测试最常见的算法:在 Web 应用中 MD5(hashcat 模式 0)远比 NTLM(模式 1000)常见。
4. 可 grep 输出(`-g`)便于与需要程序化解析哈希类型的自动化脚本集成。
5. 与 `hashid` 相比:name-that-hash 对现代哈希类型的准确率更高,提供置信度排序,默认同时显示 hashcat 和 john 参考信息。
6. 处理从数据库提取的哈希时,应用框架通常决定了哈希类型——先确认框架(WordPress、Django 等)以缩小可能范围。
---
## 官方参考
- [Name-That-Hash (GitHub)](https://github.com/bee-san/Name-That-Hash)
- [Kali name-that-hash](https://www.kali.org/tools/name-that-hash/)
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 |