Default Ports: 5672(AMQP) / 15672(Web Management) / 25672(Erlang Distribution) / 4369(epmd) / 1883(MQTT) / 61613(STOMP)
Default Credentials: guest / guest | Identification: Title "RabbitMQ Management",/api/overview contains rabbitmq_version
Vulnerability Overview
| Vulnerability | Affected | Type | Impact |
|---|---|---|---|
| Default credentials guest/guest | All versions | Weak password | Critical |
| CVE-2023-34050 | Spring AMQP 1.0.0-2.4.16, 3.0.0-3.0.9 | Deserialization RCE | Critical |
| Erlang Cookie RCE | All versions | Cookie leakage→node takeover | Critical |
| Management API unauthorized | Misconfiguration | Information disclosure/takeover | High |
Exploitation Decision Tree
1. 识别 → 4369/epmd枚举节点 | 5672/nmap amqp-info | 15672/api/overview
2. 默认凭据 → guest/guest → 管理员权限接管
3. 管理API(已有凭据) → /api/users创建后门 | /api/queues读消息 | /api/definitions导出配置
4. Erlang Cookie → 获取cookie → erl -remsh → os:cmd("cmd") RCE
5. Spring AMQP → CVE-2023-34050 → 恶意序列化消息 → RCE
6. 协议攻击 → MQTT匿名订阅/发布 | STOMP未授权
Exploitation Chain Priority
1. 默认凭据 guest/guest → 管理后台接管 → 创建后门用户
2. 管理API → 枚举队列消息 → 敏感信息泄露
3. Erlang Cookie → 远程Erlang节点连接 → os:cmd RCE
4. CVE-2023-34050 → Spring AMQP反序列化 → 恶意消息 → RCE
5. MQTT/STOMP → 匿名发布订阅 → 消息嗅探/注入
Ports and API Quick Reference
| Port | Service | Key API Endpoints |
|---|---|---|
| 4369 | epmd | epmd -names enumerate nodes |
| 5672 | AMQP | nmap --script amqp-info |
| 15672 | Web Management | /api/overview /api/users /api/queues /api/definitions |
| 25672 | Erlang Distribution | erl -cookie <C> -remsh rabbit@host |
| 1883 | MQTT | mosquitto_sub -t "#" |
| 61613 | STOMP | nmap --script stomp-info |
Authentication: Authorization: Basic Z3Vlc3Q6Z3Vlc3Q= (guest:guest Base64)
Detailed Reference
- Default credential exploitation + detection script + Nuclei template
- CVE-2023-34050 Spring AMQP Deserialization RCE (Java exploit code)
- Erlang Cookie RCE (Cookie location/exploitation steps/Python script)
- Management API unauthorized exploitation (HTTP requests/Python script)
- epmd enumeration + MQTT/STOMP protocol attacks + Docker environment exploitation
- Comprehensive detection script (all-in-one Python scanner)