dir-bruteforce
Skill9 starsChanged 24 days agoMITView on GitHub
目录与文件爆破:后台入口、备份文件、配置泄露、源码与版本库暴露(ffuf/feroxbuster/dirsearch/gobuster)
- Reads credentials
In this repository22 other files it gives its agents.
- active-scanSkill
- asset-correlationSkill
- browser-automationSkill
- chisel-tunnelSkill
- cn-proxy-poolSkill
- credential-attackSkill
- fofa-reconSkill
- frp-tunnelSkill
- fscan-intranetSkill
- gogo-intranetSkill
- kimi-webbridgeSkill
- lateral-movementSkill
- nuclei-scanSkill
- passive-reconSkill
- recon-pipelineSkill
- redteam-setupSkill
- shell-handlerSkill
- suo5-tunnelSkill
- unauth-exploitSkill
- vps-reverse-shellSkill
- web-fingerprintSkill
- webshell-toolkitSkill
The file
Files
目录与文件爆破(找入口的主力)
实战里大部分入口不是 CVE 打进去的,是目录爆破扫出来的:后台 /admin、备份 www.zip、配置 .env、
源码 .git/、接口文档 swagger-ui.html、上传点、调试页、actuator/druid 监控台。
本技能覆盖本机已就位的四个工具,不要只用一个——它们的字典与判定逻辑不同,互补。
本机工具
| 工具 | 路径 | 版本 | 特点 |
| feroxbuster | /usr/bin/feroxbuster | 2.13.1 | Rust,递归爆破最强,自动跟随目录层级,首选 |
| ffuf | /usr/bin/ffuf | 2.1.0-dev | 最快、最灵活,支持多字典/vhost/参数 fuzz |
| dirsearch | $DSH_HOME/redteam/toolkit/dirsearch/dirsearch | v0.5.0 | Python。setup.sh 不下载,需自行放到该路径 |
| gobuster | /usr/bin/gobuster | — | 轻量稳定,dir/dns/vhost 三模式 |
一、feroxbuster(首选:递归 + 自动过滤)
feroxbuster -u https://target.example.com \
-w /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt \
-x php,asp,aspx,jsp,html,js,zip,tar.gz,bak,sql,txt,xml,json,config \
-d 3 -t 30 --rate-limit 80 --timeout 10 \
--filter-status 404 --filter-size 0 \
-o runs/ferox-target.txt --json -o runs/ferox-target.json要点:-d 3(递归深度)别开太大;--rate-limit 交给服务器喘气;-x 后缀表必须带备份与配置类。
二、ffuf(最快,多字典 / vhost / 参数)
# 目录与文件(两轮:先目录,再按命中的目录加后缀)
ffuf -u https://target/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt \
-mc 200,204,301,302,307,401,403,500 -fc 404 -t 40 -rate 80 -timeout 10 \
-o runs/ffuf-dir.json -of json
# 敏感文件(备份/配置/源码/密钥)
ffuf -u https://target/FUZZ -w /usr/share/seclists/Discovery/Web-Content/quickhits.txt \
-mc all -fc 404 -t 40 -o runs/ffuf-quick.json -of json
# vhost 虚拟主机发现(同 IP 多站点,边缘资产常从这里出来)
ffuf -u https://target/ -H "Host: FUZZ.example.com" \
-w /usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt \
-fs 0 -mc all -t 50 -o runs/ffuf-vhost.json -of json三、dirsearch(字典全,适合补漏)
$DSH_HOME/redteam/toolkit/dirsearch/dirsearch \
-u https://target.example.com -e php,asp,aspx,jsp,zip,bak,txt,sql,json \
--random-agent -t 30 --delay 0.1 --exclude-status 404 \
-r -R 3 --format json -o runs/dirsearch-target.json四、gobuster(轻量兜底)
gobuster dir -u https://target -w /usr/share/seclists/Discovery/Web-Content/common.txt \
-x php,asp,aspx,jsp,zip,bak -t 30 -k -o runs/gobuster-target.txt字典(本机已有,优先用这些)
| 用途 | 路径 |
| 大目录字典 | /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt |
| 中目录字典 | /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt |
| 常见文件 | /usr/share/seclists/Discovery/Web-Content/common.txt |
| 敏感文件(quickhits) | /usr/share/seclists/Discovery/Web-Content/quickhits.txt |
| 子域(vhost 用) | /usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt |
字典目录:/usr/share/seclists、/usr/share/wordlists。缺字典时用 redteam_credential_list 里已收集的
单位词(品牌名、拼音缩写)自造小字典——针对性字典命中率往往高于通用大字典。
重点目标(扫到就要跟到底)
| 命中 | 下一步 |
/admin、/manage、/login、后台路径 | 交给账号权限路线:默认口令/弱口令(技能 credential-attack) |
.git/、.svn/、.env、config.php.bak、www.zip、web.rar | 源码与配置泄露:拉下来找数据库连接串、密钥、硬编码账号 → redteam_credential_add |
swagger-ui.html、/v2/api-docs、/openapi.json | 提取全量接口清单 → 未授权与越权探测(技能 unauth-exploit) |
actuator、druid、/console、/jmx | 未授权监控台,常直通 RCE 或数据库 |
| 上传点、导入、备份恢复、模板/报表设计 | 交给漏洞利用角色串 getshell 链 |
.ssh/、id_rsa、*.pem、*.jks | 私钥泄露 → 直接尝试登录(ssh -i) |
降噪与自保
- 必须先过滤 404 的软 404:先请求一个不存在的随机路径,看返回状态码与响应长度,用它做
--filter-size/-fs。 - 限速:
-rate 80/--delay 0.1/-t 30起步;被 WAF 拦(大量 403/429)先降到 5–10 req/s。 - 别碰危险路径:
/logout、/reboot、/shutdown、/delete*、/reset*这类会改状态的不要爆破, 字典里遇到也要排除(会造成业务中断,且演练记分不认)。 - 被封 >3 次放弃该资产(
redteam_asset_teststatus=abandoned + blocked=true),转下一个。 - 内网目标走隧道:feroxbuster
--proxy socks5://127.0.0.1:1080、ffuf-x socks5://127.0.0.1:1080(技能suo5-tunnel)。
输出与落库(强制)
- 隐藏路径本身不是得分项,但每个拿到东西的路径都要落库:
- 找到后台/上传点/接口文档 → 记进该资产
redteam_asset_test的surface(追加式),交给漏洞发现/利用的下一个动作; - 泄露源码/配置/密钥/凭据 →
redteam_credential_add(source=配置泄露,tool写路径与命令,明文写secret_value); - 未授权可访问的接口/监控台 → 直接
redteam_vuln_add(含evidence回显)+redteam_http_evidence_add。
- 找到后台/上传点/接口文档 → 记进该资产
- 每个关键动作
redteam_chain_add:stage_code=internet(或internal),tool写实际命令原文(例如feroxbuster -u https://target -w raft-large-directories.txt -x php,zip,bak -d 3 --rate-limit 80),result写命中摘要(例如命中 /admin/、/backup/www.zip、/.env)。 - 跑完立刻
redteam_asset_test回写status/test/surface——不写状态后面的人一定重复扫。 - 字典与结果文件一律放
runs/(报告要能复现)。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

