Hashcat MCP Server
Hashcat MCP 服务器
一个结合本地 LLM 与 Hashcat 的 AI 驱动密码哈希审计助手,通过模型上下文协议(MCP) 实现。
专为授权安全审计而构建——LLM 自主识别哈希类型、选择攻击策略、通过多种方法逐步升级,并以通俗英语报告结果。所有处理均在本地进行——数据不会离开您的机器。
架构
User (natural language)
↓
Local LLM — qwen2.5 via Ollama
(decides which tools to call and with what arguments)
↓
MCP Client — bridges LLM decisions to real tool execution
↓
MCP Server — exposes Hashcat as structured tools
↓
Hashcat — performs actual password recovery
↓
Results logged to results/session_log.jsonRelated MCP server: PentestMCP
工具
工具 | 描述 |
| 根据格式/长度识别哈希算法(MD5、NTLM、SHA-1、bcrypt 等) |
| 列出系统上可用的字典文件和规则文件 |
| 使用可配置的攻击模式和字典文件破解单个哈希 |
| 从文件破解多个哈希,并自动升级攻击策略 |
攻击升级(自动)
LLM 对每个哈希自动遵循以下顺序:
字典攻击 —
10k-common字典文件基于规则的攻击 —
100k-ncsc+best66.rule混合攻击 —
100k-ncsc+ 4 位掩码(?d?d?d?d)更大的字典文件 —
000webhost
技术栈
组件 | 版本 | 用途 |
Hashcat | v7.1.2 | 密码恢复引擎 |
Ollama | latest | 本地 LLM 运行时 |
qwen2.5 | 7B | 支持工具调用的 LLM |
FastMCP (Python) | latest | MCP 服务器框架 |
WSL2 Ubuntu | 24.x | Windows 上的 Linux 环境 |
设置
先决条件
带有 WSL2 + Ubuntu 的 Windows
已安装 Ollama(
curl -fsSL https://ollama.com/install.sh | sh)已安装 Hashcat(
sudo apt install hashcat)已克隆 SecLists(
git clone --depth 1 https://github.com/danielmiessler/SecLists.git ~/SecLists)
安装
git clone https://github.com/YOUR_USERNAME/hashcat-mcp.git
cd hashcat-mcp
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt拉取 LLM
ollama pull qwen2.5:latest使用
启动助手
cd hashcat-mcp
source venv/bin/activate
python3 mcp_client.py破解单个哈希
You: crack this hash: 482c811da5d5b4bc6d497ffa98491e38
Assistant: [calls identify_hash → MD5 identified]
[calls run_hashcat → password123 found]
The password is: password123破解批处理文件
创建一个文件,每行一个哈希,或使用 username:hash 格式:
admin:e90664c0af74160644d29e4d6147969b
user1:5f4dcc3b5aa765d61d8327deb882cf99
482c811da5d5b4bc6d497ffa98491e38然后询问:
You: crack all hashes in /home/user/hashes.txt — they are MD5输出:
==================================================
BATCH CRACK SUMMARY
==================================================
Total hashes: 3
Cracked: 3 (100.0%)
Not cracked: 0
==================================================
RESULTS:
✓ admin → Summer2024
✓ user1 → password
✓ (hash) → password123
==================================================
Full results saved to: results/session_log.json会话日志
每次破解尝试都会自动记录到 results/session_log.json:
{
"timestamp": "2026-08-19T19:33:27.932857",
"username": "admin",
"hash": "e90664c0af74160644d29e4d6147969b",
"hash_mode": 0,
"cracked": true,
"password": "Summer2024",
"attack_used": "mode 6 wordlist=100k-ncsc mask=?d?d?d?d"
}支持的哈希类型
算法 | Hashcat 模式 | 示例格式 |
MD5 |
|
|
NTLM |
|
|
SHA-1 |
|
|
SHA-256 |
|
|
bcrypt |
|
|
sha512crypt |
|
|
安全与道德
此工具专为授权密码安全审计而设计:
针对真实世界的攻击方法测试组织密码强度
在攻击者之前识别弱密码
为安全策略执行生成证据
切勿将此工具用于未经明确授权审计的哈希。
项目结构
hashcat-mcp/
├── mcp_server.py # MCP server — exposes Hashcat as tools
├── mcp_client.py # MCP client — connects LLM to server
├── prompts/
│ └── system_prompt.txt # LLM behavior instructions
├── hashes/ # Hash files for testing
├── results/
│ └── session_log.json # Automatic audit log
└── requirements.txtThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform authorized security testing and penetration testing operations including SSL/TLS analysis, port scanning, vulnerability scanning, and HTTP security header audits through natural language interactions.1MIT
- AlicenseCqualityDmaintenanceEnables LLMs to perform Active Directory penetration testing using tools like NetExec, Bloodhound, Nmap, Certipy, and John the Ripper. Automates vulnerability discovery, attack path analysis, and documentation generation for security assessments.266MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform penetration testing and security assessments by exposing 60+ Kali Linux security tools including network scanning, web security testing, password cracking, exploitation frameworks, and OSINT capabilities through an AI-friendly interface.2MIT
- AlicenseAqualityFmaintenanceEnables AI assistants to perform authorized WiFi security assessments, including network scanning, handshake capture, and password cracking, by executing aircrack-ng commands on a remote Kali Linux system via SSH.16MIT
Related MCP Connectors
Offline methodology engine for authorized penetration testing, CTF, and security research.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chess960king/hashcat-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server