Krb5RoastParser 是一个旨在从 .pcap 文件中解析 Kerberos 认证数据包(AS-REQ、AS-REP 和 TGS-REP)并生成用于安全测试的密码破解兼容哈希的工具。通过利用 tshark,Krb5RoastParser 从 Kerberos 数据包中提取必要细节,提供适用于 Hashcat 等工具的哈希格式。

.pcap 文件中解析 AS-REQ、AS-REP 和 TGS-REP 数据包。john)。请确保您已安装:
tshark 已安装并可在 PATH 中访问安装 tshark(如果尚未安装):
# 在 Debian/Ubuntu 上
sudo apt update
sudo apt install tshark -y
# 在 macOS 上(使用 Homebrew)
brew install wireshark
# 在 Windows 上,它包含在 Wireshark 安装中
git clone https://github.com/jalvarezz13/Krb5RoastParser.git
cd Krb5RoastParser
要运行 Krb5RoastParser,请使用以下语法:
python krb5_roast_parser.py <pcap_file> <as_req/as_rep/tgs_rep>
<pcap_file>:包含 Kerberos 数据包的 .pcap 文件路径。<as_req/as_rep>:指定要解析的 Kerberos 数据包类型。
as_req 解析 AS-REQ 数据包as_rep 解析 AS-REP 数据包tgs_rep 解析 TGS-REP 数据包解析 AS-REQ 数据包:
python krb5_roast_parser.py sample.pcap as_req
解析 AS-REP 数据包:
python krb5_roast_parser.py sample.pcap as_rep
解析 TGS-REP 数据包:
python krb5_roast_parser.py sample.pcap tgs_rep
as_req:输出格式为 $krb5pa$18$...as_rep:输出格式为 $krb5asrep$23$...tgs_rep:输出格式为 $krb5tgs$23$...这些输出与 Hashcat 哈希模式兼容。
[!NOTE]
目前,该工具仅支持这些哈希格式。如果您需要其他哈希格式的支持,请随时提交 issue 或发起 pull request。
获得生成的哈希后,您可以使用 Hashcat 尝试破解它们。
对于 AS-REQ 哈希,请使用 Hashcat 模式 19900:
hashcat -m 19900 <hashfile> <wordlist>
对于 AS-REP 哈希,请使用 Hashcat 模式 18200:
hashcat -m 18200 <hashfile> <wordlist>
对于 TGS-REP 哈希,请使用 Hashcat 模式 13100:
hashcat -m 13100 <hashfile> <wordlist>
将 <hashfile> 替换为包含提取哈希的文件,将 <wordlist> 替换为您的词表文件。
本项目采用 MIT 许可证授权。详情请参阅 LICENSE 文件。