skills/tool/hashcat-crack/SKILL.md
使用 hashcat 进行密码哈希离线破解。当获取到密码哈希(NTLM/NTLMv2/Kerberos TGS/AS-REP/SHA/MD5/bcrypt/NetNTLMv2)需要还原明文密码时使用。hashcat 是 GPU 加速的密码破解工具,比 john 快几十倍。覆盖哈希类型识别、字典攻击、规则攻击、掩码攻击、组合攻击。拿到 hashdump/secretsdump/Kerberoast/AS-REP 输出后必用此技能
npx skillsauth add wgpsec/AboutSecurity hashcat-crackInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
hashcat 利用 GPU 加速哈希破解,速度远超 CPU。核心工作流:识别哈希类型 → 选择攻击模式 → 喂字典/规则/掩码。
| 哈希类型 | -m 值 | 来源 | |----------|-------|------| | NTLM | 1000 | hashdump / secretsdump | | NetNTLMv1 | 5500 | Responder 抓包(旧系统/降级攻击) | | NetNTLMv2 | 5600 | Responder / ntlmrelayx 抓包 | | Kerberos TGS (Kerberoast) | 13100 | GetUserSPNs.py | | Kerberos AS-REP | 18200 | GetNPUsers.py | | MD5 | 0 | Web 数据库泄露 | | SHA-256 | 1400 | — | | Raw SHA-512 | 1700 | 128 字符十六进制摘要 | | sha512crypt ($6$) | 1800 | Linux /etc/shadow | | bcrypt | 3200 | Web 应用 | | DCC2 (Domain Cached Credentials 2) | 2100 | secretsdump 域缓存凭据 | | WPA-PBKDF2 | 22000 | WiFi 握手包 |
# 基本字典攻击
hashcat -m 1000 hashes.txt /usr/share/wordlists/rockyou.txt
# 加规则(变形字典,如 password → Password1!)
hashcat -m 1000 hashes.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
# 常用规则文件
# best64.rule — 64 条高效规则,速度和效果平衡
# rockyou-30000.rule — 大规则集,覆盖更多变形
# OneRuleToRuleThemAll.rule — 社区最强规则集
# 8 位纯数字
hashcat -m 1000 hashes.txt -a 3 ?d?d?d?d?d?d?d?d
# 首字母大写 + 6 位小写 + 1 位数字(如 Password1)
hashcat -m 1000 hashes.txt -a 3 ?u?l?l?l?l?l?l?d
# 掩码字符集:?l=小写 ?u=大写 ?d=数字 ?s=特殊 ?a=全部
# 两个字典组合(word1+word2)
hashcat -m 1000 hashes.txt -a 1 dict1.txt dict2.txt
# GetUserSPNs.py 输出 → hashcat
GetUserSPNs.py domain/user:pass -dc-ip DC_IP -request -outputfile tgs.txt
hashcat -m 13100 tgs.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
GetNPUsers.py domain/ -usersfile users.txt -no-pass -dc-ip DC_IP -outputfile asrep.txt
hashcat -m 18200 asrep.txt /usr/share/wordlists/rockyou.txt
# secretsdump 输出格式:user:RID:LM:NTLM:::
# 提取 NTLM 部分
cat secretsdump.txt | awk -F: '{print $4}' | sort -u > ntlm.txt
hashcat -m 1000 ntlm.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 5600 responder_hashes.txt /usr/share/wordlists/rockyou.txt
# 查看已破解结果
hashcat -m 1000 hashes.txt --show
# 继续中断的任务
hashcat -m 1000 hashes.txt --restore
# 只跑 GPU(不用 CPU)
hashcat -m 1000 hashes.txt -D 2
# 设置工作负载(1=低 2=默认 3=高 4=极限)
hashcat -m 1000 hashes.txt -w 3
# 内核优化(截断密码长度换速度,多数场景够用)
hashcat -m 1000 hashes.txt -O
# 输出到文件
hashcat -m 1000 hashes.txt wordlist.txt -o cracked.txt
拿到哈希后:
├─ 知道哈希类型 → 直接 hashcat -m 值
├─ 不确定类型 → hashcat --identify hashes.txt 或 hashid
├─ 有 GPU → hashcat(首选)
├─ 无 GPU / CPU 环境 → john the ripper
└─ 在线查询 → hashes.org / crackstation.net(先试再跑)
testing
Azure 云环境渗透测试总体方法论。当目标使用 Azure/Microsoft 365/Entra ID、发现 Azure 相关资产(Blob Storage/App Service/Azure VM/Azure Functions)、获取 Azure 凭据(Service Principal/Managed Identity/Access Token)、或需要对 Azure 环境进行安全评估时使用。提供从未授权枚举到 Entra ID 攻击、服务提权、Cloud-to-OnPrem 横向移动的全流程决策树。覆盖 35+ Azure 服务攻击面
tools
Mythic C2 操作方法论。当需要部署 Mythic、选择 Mythic Agent、安装 C2 Profile、配置 HTTP/DNS/WebSocket/SMB/TCP 通信、生成 payload、管理回连任务,或把 Mythic 作为跨平台 C2 框架用于授权红队演练时使用。覆盖 mythic-cli 安装、Agent/Profile 选择、SSL 证书配置、payload 构建和基础 OPSEC 判断
development
Docker 安全测试与容器渗透方法论。当需要评估 Docker 容器、Docker Daemon、Docker Registry、镜像层、构建产物或容器逃逸风险时使用。覆盖容器环境识别、特权容器逃逸、docker.sock/Remote API 利用、procfs/cgroup/capabilities 滥用、Docker 用户组提权、运行时/内核 CVE、Registry 枚举、镜像层 Secret 分析和构建上下文泄露。发现 Docker 容器环境、Registry 暴露、镜像凭据或容器配置错误时应使用此技能
development
使用 PadBuster 进行 Padding Oracle 攻击。当发现 Web 应用使用 CBC 模式加密且存在 Padding Oracle 漏洞时使用。PadBuster 可自动解密密文和伪造任意明文对应的合法密文,适用于加密 Cookie/Token/URL 参数。任何涉及 Padding Oracle 攻击、CBC 密文解密、Cookie 伪造的场景都应使用此技能