poc weblogic 漏洞利用_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

声明:如果你使用该脚本进行非法攻击,或者做黑产已本人无一丝关系。

请遵守法律。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值