WebLogic 任意文件上传 远程代码执行漏洞 (CVE-2018-2894)------->>>任意文件上传检测POC
前言:
Oracle官方发布了7月份的关键补丁更新CPU(Critical Patch Update),其中针对可造成远程代码执行的高危漏洞 CVE-2018-2894 进行修复:
http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html
CVE-2018-2894 由中国国家互联网应急中心 CNCERT 的安全研究员 Mingxuan Song 和 Apple 公司的安全研究员 David Litchfield 同时提交发现。
今天 7 月 19 号国家互联网应急中心 CNCERT 发出通告,指出 CVE-2018-2894 本质上为任意文件上传漏洞:
https://mp.weixin.qq.com/s/y5JGmM-aNaHcs_6P9a-gRQ
思路:
思路一样。读取文件去除空格加上路径发起请求去掉过滤。提取出符合条件的URL
(能用一句话说完的事情不想浪费换行)
代码:
import requests
import threading
import os error=['404','Not Found','找不到','安全狗','无权访问','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('[+]Weblogic 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.get(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)
print(pd)
else:
nos='[-]Not debug url:{}'.format(sc)
if nos in bad:continue
bad.append(nos)
print(nos)
except:
pass
exploit()
测试结果如下:


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
声明:如果你使用该脚本进行非法攻击,或者做黑产已本人无一丝关系。
请遵守法律。
WebLogic 任意文件上传 远程代码执行漏洞 (CVE-2018-2894)------->>>任意文件上传检测POC的更多相关文章
- Apache Struts最新漏洞 远程代码执行漏洞预警 2018年11月08日
2018年11月8日,SINE安全监控检测中心,检测到Apache Struts官方更新了一个Struts漏洞补丁,这个漏洞是Apache Struts目前最新的漏洞,影响范围较广,低于Apache ...
- WebLogic 任意文件上传远程代码执行_CVE-2018-2894漏洞复现
WebLogic 任意文件上传远程代码执行_CVE-2018-2894漏洞复现 一.漏洞描述 Weblogic管理端未授权的两个页面存在任意上传getshell漏洞,可直接获取权限.Oracle 7月 ...
- CVE-2017-8464 LNK文件(快捷方式)远程代码执行漏洞复现
北京时间2017年6月13日凌晨,微软官方发布6月安全补丁程序,“震网三代” LNK文件远程代码执行漏洞(CVE-2017-8464)和Windows搜索远程命令执行漏洞(CVE-2017-8543) ...
- CVE-2012-0003 Microsoft Windows Media Player ‘winmm.dll’ MIDI文件解析远程代码执行漏洞 分析
[CNNVD]Microsoft Windows Media Player ‘winmm.dll’ MIDI文件解析远程代码执行漏洞(CNNVD-201201-110) Microsoft Wi ...
- 【漏洞公告】CVE-2017-12615/CVE-2017-12616:Tomcat信息泄漏和远程代码执行漏洞
2017年9月19日,Apache Tomcat官方确认并修复了两个高危漏洞,漏洞CVE编号:CVE-2017-12615和CVE-2017-12616,该漏洞受影响版本为7.0-7.80之间,在一定 ...
- Tomcat/7.0.81 远程代码执行漏洞复现
Tomcat/7.0.81 远程代码执行漏洞复现 参考链接: http://www.freebuf.com/vuls/150203.html 漏洞描述: CVE-2017-12617 Apache T ...
- EOS节点远程代码执行漏洞细节
这是一个缓冲区溢出越界写漏洞 漏洞存在于在 libraries/chain/webassembly/binaryen.cpp文件的78行, Function binaryen_runtime::ins ...
- CVE-2017-6920 Drupal远程代码执行漏洞学习
1.背景介绍: CVE-2017-6920是Drupal Core的YAML解析器处理不当所导致的一个远程代码执行漏洞,影响8.x的Drupal Core. Drupal介绍:Drupal 是一个由 ...
- 【研究】Tomcat远程代码执行漏洞(CVE-2017-12615)
一.Tomcat远程代码执行漏洞(CVE-2017-12615) 1.1 实验环境 操作机:windows 10 IP:192.168.1. ...
随机推荐
- Android Gradle 理解
/********************************************************************************* * Android Gradle ...
- jqprint 打印分页
再要分页的结尾处加上<div style="page-break-after:always;"></div> 就可以了
- HihoCoder - 1794:拼三角形 (状压DP)
描述 给定 n 根木棍,第 i 根长度为 ai 现在你想用他们拼成尽量多的面积大于 0 的三角形,要求每根木棍只能被用一次,且不能折断 请你求出最多能拼出几个 输入 第一行一个正整数 n 第二行 n ...
- BZOJ3864: Hero meet devil【dp of dp】
Description There is an old country and the king fell in love with a devil. The devil always asks th ...
- ThinkPHP3.2.3整合smarty模板(三)
在smarty模板中使用thinkphp框架的U方法时要主要的问题: 1.不能直接使用{:U('Index/index')}: 2.正确的使用方法为:<!--{U("Login/log ...
- HDU 1232:畅通工程(并查集模板)
畅通工程 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submis ...
- JAVA解压文件
package com.chauvet.utils; import java.io.File; import java.io.FileOutputStream; import java.io.IOEx ...
- 多个sshkey 指定key来clone仓库
Something like this should work (suggested by orip): ssh-agent bash -c 'ssh-add /somewhere/yourkey; ...
- 通过torodb && hasura graphql 让mongodb 快速支持graphql api
torodb 可以方便的将mongo 数据实时同步到pg,hasura graphql 可以方便的将pg 数据暴露为graphql api,集成在一起真的很方便 环境准备 docker-compose ...
- 使用MVC5的Entity Framework 6入门 ---- 系列教程
使用MVC5的Entity Framework 6入门(十二)——为ASP.NET MVC应用程序使用高级功能 为ASP.NET MVC应用程序使用高级功能这是微软官方教程Getting Starte ...