githubEdit

Apache ActiveMQ

Message broker software - often runs with elevated privileges.


Discovery

Default Ports:

Port
Service

8161

Web Console (HTTP/Jetty)

61616

OpenWire transport

61613

STOMP

61614

HTTP/WebSocket

5672

AMQP

1883

MQTT

# Nmap detection
nmap -sC -sV -p 8161,61616,61613,61614,5672,1883 $ip

# Look for
ActiveMQ OpenWire transport
basic realm=ActiveMQRealm
Jetty(9.4.x)

Default Credentials

Username
Password

admin

admin

(blank)

(blank)

Web console: http://TARGET:8161/admin/


CVE-2023-46604 - RCE (OpenWire Deserialization)

Affected: Apache ActiveMQ < 5.15.16, < 5.16.7, < 5.17.6, < 5.18.3

Port: 61616 (OpenWire transport)

Exploit Repositories

Malicious XML Payload

Create poc-linux.xml:

Alternative payload (mkfifo):

Exploitation Steps

Verify Vulnerability


Post-Exploitation

ActiveMQ often runs as dedicated user:


References

  • https://nvd.nist.gov/vuln/detail/CVE-2023-46604

  • https://github.com/rootsecdev/CVE-2023-46604

  • https://attackerkb.com/topics/IHsgZDE3tS/cve-2023-46604

Last updated