WebLogic arbitrary file Upload Remote Code execution Vulnerability (cve-2018-2894)------->>> arbitrary file Upload detection POC

Source: Internet
Author: User
Tags remove filter cve

Objective:

Oracle officially released the July Critical patch update CPU (Critical patch update), which fixes a high-risk vulnerability that could cause remote code execution cve-2018-2894:

Http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html

cve-2018-2894, a security researcher at China's National Internet Emergency Center Cncert Mingxuan Song and security researcher at Apple, David Litchfield, also submitted findings.

The National Internet Emergency Center Cncert issued a circular today July 19 stating that cve-2018-2894 is essentially an arbitrary file Upload vulnerability:

Https://mp.weixin.qq.com/s/y5JGmM-aNaHcs_6P9a-gRQ

Ideas:

Thinking the same. Read file removal space plus path initiation request remove filter. Extract the URL that matches the criteria

(I don't want to waste a line of things with a word)

Code:

Import requestsimport threadingimport oserror=[' 404 ', ' not Found ', ' Can't find ', ' safe dog ', ' No access ', ' 403 ']ok=[]bad=[]def Exploit (): headers={' user-agent ': ' mozilla/5.0 (Windows NT 6.1; WOW64) applewebkit/535.1 (khtml, like Gecko) chrome/14.0.835.163 safari/535.1 '} path= '/ws_utc/config.do ' Print (' [+]W eblogic arbitrary file Upload detection poc,data:https://mp.weixin.qq.com/s?__biz=mziwmdk1mjmymg==&mid= 2247484311&idx=1&sn=14da21743a447449896292bb367a322e&chksm= 96f41cfaa18395ec6182af2353ac55079ca9376ea8d2a2f8a1816c12e7e79b1081b0bc01d2fe&mpshare=1&scene=1& Srcid=0719et8nmmpfcrlu8vcgqreh#rd ') user=input (' Imported files: ') if os.path.exists (user): Print (' [+]file {}    Ok '. Format (user) Else:print (' [-]not Found {} '. Format (user)] Exit () Ops=open (' {} '. Format (user), ' R ') For o in Ops.readlines (): sc= "". Join (O.split (' \ n ')) Urls=sc+path try:reques=requests.ge T (url=urls,headers=headers,allow_redirects=false,timeout=3) for E in Error:if reques.status_code==200 and E not in reques.text:pd= ' [+]debug url:{} '. Format (SC) if PD in Ok:continue ok.append (PD) PR Int (PD) else:nos= ' [-]not debug url:{} '. Format (SC) if NOS in Bad:cont Inue bad.append (NOS) print (NOS) except:passexploit ()

 

The test results are as follows:

Github:https://github.com/422926799/python/tree/master/weblogic%e4%bb%bb%e6%84%8f%e6%96%87%e4%bb%b6%e4%b8%8a%e4%bc%a0

Disclaimer: If you use this script for illegal attacks, or do black production has no trace of the relationship.

Please obey the law.

WebLogic arbitrary file Upload Remote Code execution Vulnerability (cve-2018-2894)------->>> arbitrary file Upload detection POC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.