mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
74 lines
7.6 KiB
Markdown
74 lines
7.6 KiB
Markdown
# 5671,5672 - Pentesting AMQP
|
|
|
|
{{#include ../banners/hacktricks-training.md}}
|
|
|
|
## Basic Information
|
|
|
|
From [cloudamqp](https://www.cloudamqp.com/blog/2015-05-18-part1-rabbitmq-for-beginners-what-is-rabbitmq.html):
|
|
|
|
> **RabbitMQ** एक **संदेश-लाइनिंग सॉफ़्टवेयर** है जिसे _संदेश ब्रोकर_ या _क्यू प्रबंधक_ के रूप में भी जाना जाता है। सरल शब्दों में; यह सॉफ़्टवेयर है जहाँ कतारें परिभाषित की जाती हैं, जिनसे अनुप्रयोग कनेक्ट होते हैं ताकि एक या अधिक संदेशों को स्थानांतरित किया जा सके।\
|
|
> एक **संदेश में किसी भी प्रकार की जानकारी शामिल हो सकती है**। उदाहरण के लिए, इसमें किसी प्रक्रिया या कार्य के बारे में जानकारी हो सकती है जो किसी अन्य अनुप्रयोग पर शुरू होनी चाहिए (जो कि किसी अन्य सर्वर पर भी हो सकता है), या यह बस एक साधारण पाठ संदेश हो सकता है। क्यू-प्रबंधक सॉफ़्टवेयर संदेशों को तब तक संग्रहीत करता है जब तक कि एक प्राप्त करने वाला अनुप्रयोग कनेक्ट नहीं होता और कतार से एक संदेश नहीं लेता। प्राप्त करने वाला अनुप्रयोग फिर संदेश को संसाधित करता है।\
|
|
> Definition from .
|
|
|
|
**Default port**: 5672,5671
|
|
```
|
|
PORT STATE SERVICE VERSION
|
|
5672/tcp open amqp RabbitMQ 3.1.5 (0-9)
|
|
```
|
|
## Enumeration
|
|
|
|
### Manual
|
|
```python
|
|
import amqp
|
|
#By default it uses default credentials "guest":"guest"
|
|
conn = amqp.connection.Connection(host="<IP>", port=5672, virtual_host="/")
|
|
conn.connect()
|
|
for k, v in conn.server_properties.items():
|
|
print(k, v)
|
|
```
|
|
### स्वचालित
|
|
```bash
|
|
nmap -sV -Pn -n -T4 -p 5672 --script amqp-info <IP>
|
|
|
|
PORT STATE SERVICE VERSION
|
|
5672/tcp open amqp RabbitMQ 3.1.5 (0-9)
|
|
| amqp-info:
|
|
| capabilities:
|
|
| publisher_confirms: YES
|
|
| exchange_exchange_bindings: YES
|
|
| basic.nack: YES
|
|
| consumer_cancel_notify: YES
|
|
| copyright: Copyright (C) 2007-2013 GoPivotal, Inc.
|
|
| information: Licensed under the MPL. See http://www.rabbitmq.com/
|
|
| platform: Erlang/OTP
|
|
| product: RabbitMQ
|
|
| version: 3.1.5
|
|
| mechanisms: PLAIN AMQPLAIN
|
|
|_ locales: en_US
|
|
```
|
|
### Brute Force
|
|
|
|
- [**AMQP Protocol Brute-Force**](../generic-hacking/brute-force.md#amqp-activemq-rabbitmq-qpid-joram-and-solace)
|
|
- [**STOMP Protocol Brute-Force**](../generic-hacking/brute-force.md#stomp-activemq-rabbitmq-hornetq-and-openmq)
|
|
|
|
## अन्य RabbitMQ पोर्ट
|
|
|
|
In [https://www.rabbitmq.com/networking.html](https://www.rabbitmq.com/networking.html) you can find that **rabbitmq कई पोर्ट का उपयोग करता है**:
|
|
|
|
- **1883, 8883**: ([MQTT clients](http://mqtt.org) बिना और TLS के साथ, यदि [MQTT plugin](https://www.rabbitmq.com/mqtt.html) सक्षम है। [**यहां MQTT को pentest करने के बारे में अधिक जानें**](1883-pentesting-mqtt-mosquitto.md).
|
|
- **4369: epmd**, एक पीयर डिस्कवरी सेवा जो RabbitMQ नोड्स और CLI टूल्स द्वारा उपयोग की जाती है। [**यहां इस सेवा को pentest करने के बारे में अधिक जानें**](4369-pentesting-erlang-port-mapper-daemon-epmd.md).
|
|
- **5672, 5671**: AMQP 0-9-1 और 1.0 क्लाइंट्स द्वारा बिना और TLS के साथ उपयोग किया जाता है
|
|
- **15672**: [HTTP API](https://www.rabbitmq.com/management.html) क्लाइंट्स, [management UI](https://www.rabbitmq.com/management.html) और [rabbitmqadmin](https://www.rabbitmq.com/management-cli.html) (केवल यदि [management plugin](https://www.rabbitmq.com/management.html) सक्षम है)। [**यहां इस सेवा को pentest करने के बारे में अधिक जानें**](15672-pentesting-rabbitmq-management.md).
|
|
- 15674: STOMP-over-WebSockets क्लाइंट्स (केवल यदि [Web STOMP plugin](https://www.rabbitmq.com/web-stomp.html) सक्षम है)
|
|
- 15675: MQTT-over-WebSockets क्लाइंट्स (केवल यदि [Web MQTT plugin](https://www.rabbitmq.com/web-mqtt.html) सक्षम है)
|
|
- 15692: Prometheus मेट्रिक्स (केवल यदि [Prometheus plugin](https://www.rabbitmq.com/prometheus.html) सक्षम है)
|
|
- 25672: इंटर-नोड और CLI टूल्स संचार के लिए उपयोग किया जाता है (Erlang वितरण सर्वर पोर्ट) और एक डायनामिक रेंज से आवंटित किया गया है (डिफ़ॉल्ट रूप से एकल पोर्ट तक सीमित, AMQP पोर्ट + 20000 के रूप में गणना की गई)। जब तक इन पोर्ट्स पर बाहरी कनेक्शन वास्तव में आवश्यक नहीं हैं (जैसे, क्लस्टर [federation](https://www.rabbitmq.com/federation.html) का उपयोग करता है या CLI टूल्स सबनेट के बाहर मशीनों पर उपयोग किए जाते हैं), इन पोर्ट्स को सार्वजनिक रूप से उजागर नहीं किया जाना चाहिए। विवरण के लिए [networking guide](https://www.rabbitmq.com/networking.html) देखें। **इनमें से केवल 9 पोर्ट इंटरनेट पर खुले हैं**।
|
|
- 35672-35682: CLI टूल्स (Erlang वितरण क्लाइंट पोर्ट्स) द्वारा नोड्स के साथ संचार के लिए उपयोग किया जाता है और एक डायनामिक रेंज से आवंटित किया गया है (सर्वर वितरण पोर्ट + 10000 से सर्वर वितरण पोर्ट + 10010 के रूप में गणना की गई)। विवरण के लिए [networking guide](https://www.rabbitmq.com/networking.html) देखें।
|
|
- 61613, 61614: [STOMP clients](https://stomp.github.io/stomp-specification-1.2.html) बिना और TLS के साथ (केवल यदि [STOMP plugin](https://www.rabbitmq.com/stomp.html) सक्षम है)। इस पोर्ट के साथ 10 से कम उपकरण खुले हैं और ज्यादातर DHT नोड्स के लिए UDP के लिए हैं।
|
|
|
|
## Shodan
|
|
|
|
- `AMQP`
|
|
|
|
{{#include ../banners/hacktricks-training.md}}
|