0x01 工具介绍
平时使用过 dirsearch|dirmap 等一些目录扫描工具,针对如今的 WEB 多样化,对扫描结果的过滤总感觉与预期不符合。因此下定决心造个轮子,就这样有了 dirsx。当时是使用 python 写的,但是可移植性不是很好。所以使用 golang 进行重构。
下载地址在末尾
0x02 功能简介
功能
使用 html 相似度对结果进行过滤
对 301、302、403 状态进行二次判断
对 json 返回结果进行判断
字典第一个字母大写|全部字母大写|添加前后缀
返回页面 title, 如无 title 返回内容前面 30 个字符串 (默认|设置)
自动过滤模式, 默认开启 (开启|关闭)
0x03更新说明
修复 title 特殊字符导致格式问题、Redirect 二次判断问题增加 --httpx, --ffuf 模式修复发生异常时,-o 没有输出结果的问题 #4
0x04 使用介绍
基本使用
指定字典进行扫描
dirsx -u https://www.baidu.com -w words.txt指定目录递归扫描, 目前暂无添加结果递归功能扫描,担心目录误报
dirsx -u https://www.baidu.com -w words.txt --split# https://www.baidu.com/a/b/# -> https://www.baidu.com/a/# -> https://www.baidu.com/a/b/
指定备份文件进行扫描
dirsx -u https://www.baidu.com -w words.txt --bak指定添加后缀进行扫描
dirsx -u https://www.baidu.com -w words.txt --suffix h5# https://www.baidu.com/admin# -> https://www.baidu.com/adminh5
指定添加 cookie | headers
# --cookiedirsx -u https://www.baidu.com -w words.txt --cookie "session=admin"# --headersdirsx -u https://www.baidu.com -w words.txt --headers "Authorization: bearer eyJ0eX..." --headers "X-Forwarded-For: 127.0.0.1"# --headers-filedirsx -u https://www.baidu.com -w words.txt --headers-file headers.txt
内置一些常用字典选择, 在没有指定字典时显示该列表
常见目录字典
dirsearch 的自带字典
长度为 1-5 的字母组合
... ...
~ kali$ dirsx -u http://127.0.0.1/██████╗ ██╗██████╗ ███████╗██╗ ██╗██╔══██╗██║██╔══██╗██╔════╝╚██╗██╔╝██║ ██║██║██████╔╝███████╗ ╚███╔╝██║ ██║██║██╔══██╗╚════██║ ██╔██╗██████╔╝██║██║ ██║███████║██╔╝ ██╗╚═════╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝1.1.0xboy@遥遥领先[+] You have not appoint payloads, so you can select from the list:[0] fuzzing-dirs-common.txt[1] fuzzing-dirs-dirsearch.txt[2] fuzzing-files-php.txt[3] fuzzing-letter-len1.txt[4] fuzzing-letter-len2.txt[5] fuzzing-letter-len3.txt[6] fuzzing-letter-len4.txt... ...[+] Select payloads with number: 1
--httpx 模式
增加 httpx 模式, 可以在没有 httpx 工具的情况下用来探测 WEB 服务
dirsx -u https://www.baidu.com --httpx--ffuf 模式
增加 ffuf 模式, 用法与 ffuf 工具一样, 使用 FUZZ 指定 Fuzzing 位置
# Fuzzing dirsdirsx --ffuf -u http://127.0.0.1/FUZZ -w words.txtdirsx --ffuf -u http://127.0.0.1/FUZZ.php -w words.txtdirsx --ffuf -u http://127.0.0.1/FUZZ/index.php -w words.txt# Fuzzing headersdirsx --ffuf -u http://127.0.0.1/ -H "x-forwarded-for: FUZZ"
dirsx -h
~ kali$ dirsx -h██████╗ ██╗██████╗ ███████╗██╗ ██╗██╔══██╗██║██╔══██╗██╔════╝╚██╗██╔╝██║ ██║██║██████╔╝███████╗ ╚███╔╝██║ ██║██║██╔══██╗╚════██║ ██╔██╗██████╔╝██║██║ ██║███████║██╔╝ ██╗╚═════╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝1.1.0xboy@遥遥领先Usage:dirsx [OPTIONS]Application Options:-u, --url= input url of target-l, --list= input file containing list of target-w, --wordlist= appoint wordlist for scanning directory--title-len= set title display length (default: 30)-t, --threads= number of threads to use (default: 20)--timeout= timeout in seconds (default: 5)-o, --output= file to write output results--prefix= add prefix of payloads--suffix= add suffix of payloads-e, --extension= add extension eg: -e php,html--remove-ext= remove extension eg: --remove-ext php | admin.php -> admin--upper-title capitalize the first letter eg: admin -> Admin--upper-all capitalize the all letter eg: admin -> ADMIN--bak enable scanning backup file (default:false)--split enable spliting the url path, eg: /a/b -> /a/, /a/b (default: false)-X= method of http requests (default: GET)-x, --excode= specify the status codes that be filtered eg: 400,404 (default:400,404,406,416,501,502,503)--cookie= set request cookies, eg: --cookie "session=admin"-H, --headers= set request headers, string[] eg: -H "Token: admin=true" -H "Cookie:login=true"--headers-file= set request headers file, eg: --headers-file headers.txt--proxy= set request proxy, eg: --proxy http://127.0.0.1:8080--no-smart disable smart mode (automated filtering)Help Options:-h, --help Show this help message
字典添加
可在 dicts 目录下根据个人需求更新常用字典
dirsx -u https://www.baidu.com -w words.txt00x05
推荐站内搜索:最好用的开发软件、免费开源系统、渗透测试工具云盘下载、最新渗透测试资料、最新黑客工具下载……




还没有评论,来说两句吧...