root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat broker.md
// writeups

Broker

9 Nov 2023 · 9 min read · root access
Broker - maquina de Hack The Box

Executive summary — Broker is an Easy Linux box built around a well-known flaw: Apache ActiveMQ 5.15.15 is vulnerable to CVE-2023-46604, a critical unauthenticated RCE in the OpenWire protocol (port 61616). After a shell as activemq, sudo -l shows we can run nginx as root with any config: we stand up an nginx with WebDAV (PUT) rooted at / to write our key into /root/.ssh/authorized_keys. Path: ActiveMQ RCE → nginx sudo → root.

PlatformHack The Box
Operating systemLinux
DifficultyEasy
StatusRetired
Target IP10.129.12.34

Attack map

[61616] Apache ActiveMQ 5.15.15 (OpenWire) → CVE-2023-46604 (unauth RCE)
   │  exploit sends remote XML → Spring ClassPathXmlApplicationContext
   ▼
[SHELL]  activemq  (user.txt)
   │  sudo -l → (ALL) NOPASSWD /usr/sbin/nginx
   ▼
[ROOT]  nginx with malicious config (root / + WebDAV PUT) → write authorized_keys

1. Reconnaissance

We run nmap against the messaging/ActiveMQ ports plus the usual ones so we don't miss anything in the stack:

nmap -sCV -p 22,80,1883,5672,8161,61613,61614,61616 10.129.12.34

Relevant results:

PortServiceVersion
22SSHOpenSSH 8.9p1
80HTTPnginx 1.18.0
61616ActiveMQ (OpenWire)5.15.15

What matters is port 61616 running Apache ActiveMQ 5.15.15: that exact version is vulnerable to CVE-2023-46604, a critical unauthenticated RCE disclosed in late 2023 and actively exploited in the wild (including ransomware campaigns) within days of publication.

🔒 Clearance required

This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.

See Root Access plans

No account? Create one free then upgrade from your console.