mcpField
S
spray-dir-brute

spray-dir-brute

github.com/wgpsec安全1.8k42 次安装4 天前更新
代码仓库

关于 spray-dir-brute

spray 目录爆破方法论介绍使用 spray 扫描 Web 路径和常见文件,面向安全测试人员。内容涵盖智能过滤、掩码字典、指纹识别及批量目标扫描。

主要功能

  1. 01字典与掩码路径爆破
  2. 02自动过滤无效响应
  3. 03集成多种指纹库
  4. 04扫描备份和常见文件
  5. 05爬取页面路径并支持续传

适用场景

  1. 01对多个 Web 目标进行目录枚举
  2. 02生成掩码路径以查找特定文件
  3. 03识别 Web 技术并筛查备份文件

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/wgpsec/aboutsecurity --skill spray-dir-brute

安装后在 Claude Code 中输入/spray-dir-brute确认已加载。

附带文件evals/evals.json

详细介绍

来自项目 README

spray 目录爆破方法论

spray 是 chainreactors 开发的高性能目录爆破工具,核心优势:智能过滤(自动识别无效响应)+ 极致性能(多目标场景下远超 ffuf)+ 指纹识别(集成 gogo/fingerprinthub/wappalyzer 指纹库)。

项目地址:https://github.com/chainreactors/spray

Phase 1: 基本目录爆破

# 从字典爆破(最常用)
spray -u http://target -d wordlist.txt

# 多字典组合
spray -u http://target -d wordlist1.txt -d wordlist2.txt

# 指定后缀
spray -u http://target -d wordlist.txt --suffix .php,.jsp,.asp

# 批量目标
spray -l urls.txt -d wordlist.txt
常用字典路径(/pentest 目录)
# aboutsecurity 字典库
/pentest/AboutSecurity/Dic/web/directory/common.txt
/pentest/AboutSecurity/Dic/web/directory/php/php.txt
/pentest/AboutSecurity/Dic/web/ctf/param.txt

# spray 自带字典会自动加载

Phase 2: 掩码字典生成

spray 支持类似 hashcat 的掩码语法,无需预生成字典:

# 掩码: ?l=小写 ?u=大写 ?d=数字 ?s=特殊字符
# 爆破 /backup_XXXX.zip(4 位数字)
spray -u http://target -w "/backup_{?d#4}.zip"

# 爆破 /api/v1 到 /api/v9
spray -u http://target -w "/api/v{?d#1}"

# 组合路径
spray -u http://target -w "/{?l#3}/{?l#4}.php"

Phase 3: 智能过滤

spray 的核心优势——自动过滤无效响应,减少人工筛选:

# 智能过滤(自动检测 404 页面特征并过滤)
spray -u http://target -d wordlist.txt --smart

# 按状态码过滤
spray -u http://target -d wordlist.txt --match-status 200,301,302,403

# 按响应长度过滤(排除统一错误页面)
spray -u http://target -d wordlist.txt --filter-length 1234

# 按关键词过滤
spray -u http://target -d wordlist.txt --match-string "admin"

Phase 4: 指纹识别模式

spray 集成了 gogo、fingerprinthub、wappalyzer 三大指纹库:

# check-only 模式:只做指纹识别(类似 httpx)
spray -l urls.txt --check-only

# 启用拓展指纹(主动探测 + 第三方指纹库)
spray -u http://target --finger

# 爆破 + 指纹识别
spray -u http://target -d wordlist.txt --finger

Phase 5: 备份文件和常见文件

# 扫描备份文件(.bak, .zip, .tar.gz, .sql 等)
spray -u http://target --bak

# 扫描常见通用文件(robots.txt, .git, .env 等)
spray -u http://target --common

# 全功能扫描(爆破 + 备份 + 常见文件 + 爬虫 + 指纹)
spray -u http://target -a

Phase 6: 高级用法

# 启用爬虫(从页面中提取更多路径)
spray -u http://target --crawl

# 断点续传(中断后继续)
spray --resume stat.json

# 自定义 Header
spray -u http://target -d wordlist.txt -H "Cookie: session=xxx"

# 使用代理
spray -u http://target -d wordlist.txt --proxy http://127.0.0.1:8080

# 控制并发
spray -u http://target -d wordlist.txt -t 50

与 ffuf 对比决策

场景推荐工具原因
单目标目录爆破spray 或 ffuf 均可性能差异不大
批量多目标spray批量性能远超 ffuf
参数 FuzzffufFUZZ 占位符更灵活
备份文件扫描spray--bak 一键扫描
指纹识别spray内置三大指纹库
需要掩码字典spray内置掩码生成

评论

支持 Markdown