mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-03 16:27:34 -08:00
114 lines
5.6 KiB
Markdown
114 lines
5.6 KiB
Markdown
# AWS - SQS Post Exploitation
|
|
|
|
{% hint style="success" %}
|
|
Learn & practice AWS Hacking:<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">\
|
|
Learn & practice GCP Hacking: <img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
|
|
|
<details>
|
|
|
|
<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.
|
|
|
|
</details>
|
|
{% endhint %}
|
|
|
|
## SQS
|
|
|
|
For more information check:
|
|
|
|
{% content-ref url="../aws-services/aws-sqs-and-sns-enum.md" %}
|
|
[aws-sqs-and-sns-enum.md](../aws-services/aws-sqs-and-sns-enum.md)
|
|
{% endcontent-ref %}
|
|
|
|
### `sqs:SendMessage` , `sqs:SendMessageBatch`
|
|
|
|
An attacker could send malicious or unwanted messages to the SQS queue, potentially causing data corruption, triggering unintended actions, or exhausting resources.
|
|
|
|
```bash
|
|
aws sqs send-message --queue-url <value> --message-body <value>
|
|
aws sqs send-message-batch --queue-url <value> --entries <value>
|
|
```
|
|
|
|
**Potential Impact**: Vulnerability exploitation, Data corruption, unintended actions, or resource exhaustion.
|
|
|
|
### `sqs:ReceiveMessage`, `sqs:DeleteMessage`, `sqs:ChangeMessageVisibility`
|
|
|
|
An attacker could receive, delete, or modify the visibility of messages in an SQS queue, causing message loss, data corruption, or service disruption for applications relying on those messages.
|
|
|
|
```bash
|
|
aws sqs receive-message --queue-url <value>
|
|
aws sqs delete-message --queue-url <value> --receipt-handle <value>
|
|
aws sqs change-message-visibility --queue-url <value> --receipt-handle <value> --visibility-timeout <value>
|
|
```
|
|
|
|
**Potential Impact**: Steal sensitive information, Message loss, data corruption, and service disruption for applications relying on the affected messages.
|
|
|
|
### `sqs:DeleteQueue`
|
|
|
|
An attacker could delete an entire SQS queue, causing message loss and impacting applications relying on the queue.
|
|
|
|
```arduino
|
|
Copy codeaws sqs delete-queue --queue-url <value>
|
|
```
|
|
|
|
**Potential Impact**: Message loss and service disruption for applications using the deleted queue.
|
|
|
|
### `sqs:PurgeQueue`
|
|
|
|
An attacker could purge all messages from an SQS queue, leading to message loss and potential disruption of applications relying on those messages.
|
|
|
|
```arduino
|
|
Copy codeaws sqs purge-queue --queue-url <value>
|
|
```
|
|
|
|
**Potential Impact**: Message loss and service disruption for applications relying on the purged messages.
|
|
|
|
### `sqs:SetQueueAttributes`
|
|
|
|
An attacker could modify the attributes of an SQS queue, potentially affecting its performance, security, or availability.
|
|
|
|
```arduino
|
|
aws sqs set-queue-attributes --queue-url <value> --attributes <value>
|
|
```
|
|
|
|
**Potential Impact**: Misconfigurations leading to degraded performance, security issues, or reduced availability.
|
|
|
|
### `sqs:TagQueue` , `sqs:UntagQueue`
|
|
|
|
An attacker could add, modify, or remove tags from SQS resources, disrupting your organization's cost allocation, resource tracking, and access control policies based on tags.
|
|
|
|
```bash
|
|
aws sqs tag-queue --queue-url <value> --tags Key=<key>,Value=<value>
|
|
aws sqs untag-queue --queue-url <value> --tag-keys <key>
|
|
```
|
|
|
|
**Potential Impact**: Disruption of cost allocation, resource tracking, and tag-based access control policies.
|
|
|
|
### `sqs:RemovePermission`
|
|
|
|
An attacker could revoke permissions for legitimate users or services by removing policies associated with the SQS queue. This could lead to disruptions in the normal functioning of applications that rely on the queue.
|
|
|
|
```arduino
|
|
arduinoCopy codeaws sqs remove-permission --queue-url <value> --label <value>
|
|
```
|
|
|
|
**Potential Impact**: Disruption of normal functioning for applications relying on the queue due to unauthorized removal of permissions.
|
|
|
|
{% hint style="success" %}
|
|
Learn & practice AWS Hacking:<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">\
|
|
Learn & practice GCP Hacking: <img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
|
|
|
<details>
|
|
|
|
<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.
|
|
|
|
</details>
|
|
{% endhint %}
|