Skip to content

Latest commit

 

History

History
83 lines (53 loc) · 5.02 KB

File metadata and controls

83 lines (53 loc) · 5.02 KB

AWS - MQ Enum

Support HackTricks and get benefits!

AWS - MQ

Message brokers allow software systems, which often use different programming languages on various platforms, to communication and exchange information. Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ that streamlines setup, operation, and management of message brokers on AWS. With a few steps, Amazon MQ can provision your message broker with support for software version upgrades.

AWS - RabbitMQ

RabbitMQ is a message-queueing software also known as a message broker or queue manager. Simply said; it is software where queues are defined, to which applications connect in order to transfer a message or messages.

A message can include any kind of information. It could, for example, have information about a process or task that should start on another application (which could even be on another server), or it could be just a simple text message. The queue-manager software stores the messages until a receiving application connects and takes a message off the queue. The receiving application then processes the message.

AWS offers to host and manage in an easy way RabbitMQ servers.

AWS - ActiveMQ

Apache ActiveMQ® is the most popular open source, multi-protocol, Java-based message broker. It supports industry standard protocols so users get the benefits of client choices across a broad range of languages and platforms. Connect from clients written in JavaScript, C, C++, Python, .Net, and more. Integrate your multi-platform applications using the ubiquitous AMQP protocol. Exchange messages between your web applications using STOMP over websockets. Manage your IoT devices using MQTT. Support your existing JMS infrastructure and beyond. ActiveMQ offers the power and flexibility to support any messaging use-case.

Enumeration

# List brokers
aws mq list-brokers

# Get broker info
aws mq describe-broker --broker-id <broker-id>
## Find endpoints in .BrokerInstances
## Find if public accessible in .PubliclyAccessible

# List usernames (only for ActiveMQ)
aws mq list-users --broker-id <broker-id>

# Get user info (PASSWORD NOT INCLUDED)
aws mq describe-user --broker-id <broker-id> --username <username>

# Lits configurations (only for ActiveMQ)
aws mq list-configurations
## Here you can find if simple or LDAP authentication is used

# Creacte Active MQ user
aws mq create-user --broker-id <value> --password <value> --username <value> --console-access

{% hint style="warning" %} TODO: Indicate how to enumerate RabbitMQ and ActiveMQ internally and how to listen in all queues and send data (send PR if you know how to do this) {% endhint %}

Privesc

{% content-ref url="../aws-privilege-escalation/aws-mq-privesc.md" %} aws-mq-privesc.md {% endcontent-ref %}

References

Support HackTricks and get benefits!