Skip to main content
Glama

Hashcat MCP 服务器

一个结合本地 LLMHashcat 的 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.json

Related MCP server: PentestMCP

工具

工具

描述

identify_hash

根据格式/长度识别哈希算法(MD5、NTLM、SHA-1、bcrypt 等)

list_wordlists

列出系统上可用的字典文件和规则文件

run_hashcat

使用可配置的攻击模式和字典文件破解单个哈希

crack_batch

从文件破解多个哈希,并自动升级攻击策略

攻击升级(自动)

LLM 对每个哈希自动遵循以下顺序:

  1. 字典攻击 — 10k-common 字典文件

  2. 基于规则的攻击 — 100k-ncsc + best66.rule

  3. 混合攻击 — 100k-ncsc + 4 位掩码(?d?d?d?d

  4. 更大的字典文件 — 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

-m 0

482c811da5d5b4bc6d497ffa98491e38

NTLM

-m 1000

cc36cf7aa9dc7f2d2c2c43f877c32b0c

SHA-1

-m 100

cbfdac6008f9cab4083784cbd1874f76618d2a97

SHA-256

-m 1400

ef92b779...(64 个字符)

bcrypt

-m 3200

$2a$10$...

sha512crypt

-m 1800

$6$...


安全与道德

此工具专为授权密码安全审计而设计:

  • 针对真实世界的攻击方法测试组织密码强度

  • 在攻击者之前识别弱密码

  • 为安全策略执行生成证据

切勿将此工具用于未经明确授权审计的哈希。


项目结构

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.txt
F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    1
    MIT
  • A
    license
    C
    quality
    D
    maintenance
    Enables 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.
    26
    6
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    2
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    Enables 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.
    16
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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