nobody-Justheader/Hashcatizer
GitHub: nobody-Justheader/Hashcatizer
一个用Rust编写的单二进制哈希提取工具,支持从89种加密文件格式中提取哈希并输出为Hashcat兼容格式。
Stars: 0 | Forks: 0
# Hashcatizer 🔓
[](https://github.com/nobody-Justheader/Hashcatizer/actions/workflows/ci.yml)
[](https://coderabbit.ai)
[](LICENSE)
**文件转 Hashcat 转换套件** — 从加密文件中提取哈希并输出为 [hashcat](https://hashcat.net/hashcat/) 兼容格式。使用 Rust 编写,以实现最高速度。
灵感来源于 [John the Ripper](https://github.com/openwall/john) 的 [`*2john` 脚本](https://github.com/openwall/john/tree/bleeding-jumbo/run)。完整致谢名单见 [CREDITS.md](CREDITS.md)。
## 功能
- **单一静态二进制文件** — 无运行时依赖,无需解释器
- **89 个转换器**,覆盖钱包、密码管理器、磁盘加密、归档文件、SSH 密钥等
- **自动检测** — 传入任意文件,Hashcatizer 会自动识别格式
- **哈希识别** — 传入原始哈希字符串以识别其类型和 hashcat 模式
- **Hashcat 提示** — 每个结果都包含确切的 `hashcat -m ` 命令供使用
## 安装
### 预编译二进制文件
从 [Releases 页面](../../releases) 下载适用于您平台的最新版本。
```
# Debian / Ubuntu / Kali (推荐)
curl -LO https://github.com/nobody-Justheader/Hashcatizer/releases/latest/download/hashcatizer-linux-x86_64.deb
sudo dpkg -i hashcatizer-linux-x86_64.deb
# Linux (musl static tarball)
curl -Lo hashcatizer-linux-x86_64.tar.gz https://github.com/nobody-Justheader/Hashcatizer/releases/latest/download/hashcatizer-linux-x86_64.tar.gz
tar -xzf hashcatizer-linux-x86_64.tar.gz
chmod +x hashcatizer
sudo mv hashcatizer /usr/local/bin/
```
### 从源码构建
需要 [Rust](https://rustup.rs/) 1.75+。
```
git clone https://github.com/nobody-Justheader/Hashcatizer.git
cd Hashcatizer
cargo build --release
# Binary: target/release/hashcatizer
```
## 用法
```
# 自动检测格式并提取 hash
hashcatizer
# 使用显式转换器
hashcatizer
# 识别原始 hash 字符串
hashcatizer ''
# 列出所有包含 hashcat 模式信息的转换器
hashcatizer --list
```
### 示例
```
# SSH private key → hash + crack 命令
hashcatizer id_rsa
# 显式转换器
hashcatizer keepass vault.kdbx
hashcatizer pdf document.pdf
hashcatizer ethereum keystore.json
hashcatizer ansible vault.yml
# 直接 Pipe 进 hashcat
hashcatizer id_rsa | hashcat -m 22931 -a 0 rockyou.txt
hashcatizer vault.kdbx | hashcat -m 13400 -a 0 rockyou.txt
# 识别已有的 hash
hashcatizer '$2a$12$LlMILsdbh1gAdLhWBXWzXu...'
# → bcrypt (hashcat -m 3200)
```
## 支持的格式 (89 个转换器)
| 转换器 | Hashcat 模式 | 描述 |
|---|---|---|
| `ssh` | 22911–22941 | SSH 私钥 (RSA/DSA/EC/OpenSSH) |
| `pdf` | 10400–10700 | PDF 1.1–2.0 |
| `office` | 9400–9800 | MS Office 97–2013+ |
| `keepass` | 13400 | KeePass 1.x / 2.x |
| `bitlocker` | 22100 | BitLocker 卷 |
| `truecrypt` | 6211–6243 | TrueCrypt 卷 |
| `veracrypt` | 13711–13743 | VeraCrypt 卷 |
| `luks` | 14600 | LUKS 加密卷 |
| `ethereum` | 15600, 15700 | 以太坊钱包 (scrypt / pbkdf2) |
| `bitcoin` | 11300 | 比特币 / 莱特币 wallet.dat |
| `electrum` | 16600 | Electrum 钱包 |
| `blockchain` | 15200 | Blockchain.com 钱包 |
| `ansible` | 16900 | Ansible Vault |
| `bitwarden` | 26400 | Bitwarden |
| `lastpass` | 6800 | LastPass |
| `1password` | 8200 | 1Password 保险库 |
| `pwsafe` | 5200 | Password Safe v3 |
| `encfs` | 6211–6221 | EncFS |
| `dmg` | 12700 | Apple DMG 加密镜像 |
| `mozilla` | 16600 | Firefox / Thunderbird key3/key4.db |
| `telegram` | 22301 | Telegram 桌面版 |
| `signal` | 25300 | Signal 桌面版 / Android |
| `7z` | 11600 | 7-Zip 归档 |
| `pgpdisk` | 22600 | PGP Virtual Disk |
| `pgpsda` | 22600 | PGP Self-Decrypting Archives |
| `pgpwde` | 22600 | PGP Whole Disk Encryption |
| `zed` | 13711 | ZED / AxCrypt 容器 |
| `mac` | 7100 | macOS 密码哈希 |
| `lion` | 7100 | macOS Lion SHA-512 |
| `pcap` | 5500, 5600 | PCAP / PCAPNG (NTLM, WPA) |
| `netntlm` | 5500, 5600 | NetNTLMv1/v2 |
| `cisco` | 500, 9200, 9300 | Cisco IOS 配置 |
| `sap` | 7700, 7800 | SAP CODVN B/F/G |
| `ldif` | various | LDAP LDIF 哈希 |
| `mongodb` | 24100, 24200 | MongoDB SCRAM-SHA-1/256 |
| `ios` | 14800 | iOS / iTunes 备份加密 |
| `vdi` | 13711–13733 | VirtualBox VDI 加密 |
| `androidbackup` | 18900 | Android ADB 备份 |
| `androidfde` | 12900 | Android 全盘加密 |
| `axcrypt` | 13200 | AxCrypt |
| `bestcrypt` | 23400 | BestCrypt 容器 |
| `cardano` | 28500 | 艾欧塔 (Cardano) 钱包 |
| `coinomi` | — | Coinomi 钱包 |
| `dashlane` | — | Dashlane 保险库 |
| `deepsound` | 24310 | DeepSound 音频隐写术 |
| `diskcryptor` | 22500 | DiskCryptor 卷 |
| `dpapimk` | 15300, 15900 | Windows DPAPI 主密钥 |
| `ecryptfs` | 12200 | eCryptfs |
| `enpass` | 24600 | Enpass |
| `fvde` | 16700 | FileVault 2 / Core Storage |
| `geli` | 16800 | FreeBSD GELI |
| `htdigest` | — | Apache htdigest |
| `hccapx` | 22000 | WPA2 HCCAPX |
| `iwork` | 9600 | Apple iWork (Pages/Numbers/Keynote) |
| `keychain` | 23100 | macOS Keychain |
| `keyring` | — | GNOME Keyring |
| `known_hosts` | — | SSH known_hosts (已哈希) |
| `libreoffice` | 18400 | LibreOffice / ODF 文档 |
| `monero` | 26620 | 门罗币 (Monero) 钱包 |
| `multibit` | 22200 | MultiBit 钱包 |
| `openbsd_softraid` | — | OpenBSD softraid 加密 |
| `openssl` | 500 | OpenSSL `enc` (Salted__) |
| `pem` | — | 加密的 PEM 私钥 |
| `pfx` | 24410 | PKCS#12 / PFX |
| `restic` | 24410 | Restic 仓库 |
| `staroffice` | 18400 | StarOffice / OOo 文档 |
| `strip` | 24420 | Strip 密码管理器 |
| `tezos` | 28510 | Tezos 钱包 |
| `vmx` | 17300 | VMware VMX 加密 |
| `aix` | — | AIX 密码哈希 |
| `andotp` | — | andOTP 备份 |
| `applenotes` | — | Apple 备忘录 (加密) |
| `bks` | — | Bouncy Castle BKS keystore |
| `ccache` | — | Kerberos ccache |
| `ejabberd` | — | ejabberd SCRAM 哈希 |
| `gitea` | — | Gitea 密码哈希 |
| `ikescan` | — | ike-scan IKE PSK 哈希 |
| `kdcdump` | — | KDC 密钥转储 |
| `keystore` | — | Java KeyStore (JKS) |
| `keplr` | — | Keplr 钱包 |
| `kirbi` | — | Kerberos 票据 (kirbi) |
| `krb` | — | Kerberos 哈希 |
| `kwallet` | — | KDE KWallet |
| `lotus` | — | Lotus Notes ID 文件 |
| `prosody` | — | Prosody XMPP SCRAM 哈希 |
| `radius` | — | RADIUS 哈希 |
| `sipdump` | — | SIP 摘要认证 |
## 许可证
MIT — 详见 [LICENSE](LICENSE)。
## 致谢
灵感来源于 [openwall/john](https://github.com/openwall/john) 的 `*2john` 脚本,构建旨在补充 **Jens "atom" Steube** 的 [hashcat](https://github.com/hashcat/hashcat)。完整致谢名单见 [CREDITS.md](CREDITS.md)。
标签:Bitdefender, CTF工具, DOS头擦除, Hashcat, HTTP工具, John the Ripper替代, KeePass, Office文档, PDF解密, Rust, SSH密钥, StruQ, 凭证访问, 加密钱包, 单文件二进制, 可视化界面, 哈希提取, 哈希识别, 密码破解, 文件格式转换, 漏洞搜索, 磁盘映像, 离线攻击, 网络安全, 网络流量审计, 网络调试, 自动化, 通知系统, 隐私保护