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

This commit is contained in:
Translator
2024-12-31 20:36:01 +00:00
parent 388bdfdf0a
commit 0077c42f9c
245 changed files with 9025 additions and 11888 deletions

View File

@@ -4,22 +4,21 @@
## Amazon MSK
**Amazon Managed Streaming for Apache Kafka (Amazon MSK)** is a service that is fully managed, facilitating the development and execution of applications processing streaming data through **Apache Kafka**. Control-plane operations, including creation, update, and deletion of **clusters**, are offered by Amazon MSK. The service permits the utilization of Apache Kafka **data-plane operations**, encompassing data production and consumption. It operates on **open-source versions of Apache Kafka**, ensuring compatibility with existing applications, tooling, and plugins from both partners and the **Apache Kafka community**, eliminating the need for alterations in the application code.
**Amazon Managed Streaming for Apache Kafka (Amazon MSK)** एक सेवा है जो पूरी तरह से प्रबंधित है, जो **Apache Kafka** के माध्यम से स्ट्रीमिंग डेटा को संसाधित करने वाले अनुप्रयोगों के विकास और निष्पादन को सुविधाजनक बनाती है। नियंत्रण-स्तर संचालन, जिसमें **क्लस्टर** का निर्माण, अद्यतन और हटाना शामिल है, Amazon MSK द्वारा प्रदान किए जाते हैं। यह सेवा Apache Kafka **डेटा-स्तर संचालन** के उपयोग की अनुमति देती है, जिसमें डेटा उत्पादन और उपभोग शामिल हैं। यह **Apache Kafka** के ओपन-सोर्स संस्करणों पर काम करती है, जो मौजूदा अनुप्रयोगों, उपकरणों और साझेदारों और **Apache Kafka समुदाय** से प्लगइन्स के साथ संगतता सुनिश्चित करती है, जिससे अनुप्रयोग कोड में परिवर्तनों की आवश्यकता समाप्त हो जाती है।
In terms of reliability, Amazon MSK is designed to **automatically detect and recover from prevalent cluster failure scenarios**, ensuring that producer and consumer applications persist in their data writing and reading activities with minimal disruption. Moreover, it aims to optimize data replication processes by attempting to **reuse the storage of replaced brokers**, thereby minimizing the volume of data that needs to be replicated by Apache Kafka.
विश्वसनीयता के मामले में, Amazon MSK को **सामान्य क्लस्टर विफलता परिदृश्यों** का स्वचालित रूप से पता लगाने और पुनर्प्राप्त करने के लिए डिज़ाइन किया गया है, यह सुनिश्चित करते हुए कि उत्पादक और उपभोक्ता अनुप्रयोग अपने डेटा लेखन और पढ़ने की गतिविधियों में न्यूनतम व्यवधान के साथ बने रहें। इसके अलावा, यह डेटा पुनरुत्पादन प्रक्रियाओं को अनुकूलित करने का प्रयास करता है, **बदले गए ब्रोकरों के भंडारण** का पुन: उपयोग करने का प्रयास करके, इस प्रकार Apache Kafka द्वारा पुनरुत्पादित किए जाने वाले डेटा की मात्रा को कम करता है।
### **Types**
There are 2 types of Kafka clusters that AWS allows to create: Provisioned and Serverless.
AWS द्वारा बनाने के लिए 2 प्रकार के Kafka क्लस्टर हैं: प्रावधानित और सर्वरलेस।
From the point of view of an attacker you need to know that:
एक हमलावर के दृष्टिकोण से आपको यह जानना आवश्यक है कि:
- **Serverless cannot be directly public** (it can only run in a VPN without any publicly exposed IP). However, **Provisioned** can be configured to get a **public IP** (by default it doesn't) and configure the **security group** to **expose** the relevant ports.
- **Serverless** **only support IAM** as authentication method. **Provisioned** support SASL/SCRAM (**password**) authentication, **IAM** authentication, AWS **Certificate** Manager (ACM) authentication and **Unauthenticated** access.
- Note that it's not possible to expose publicly a Provisioned Kafka if unauthenticated access is enabled
- **सर्वरलेस सीधे सार्वजनिक नहीं हो सकता** (यह केवल एक VPN में चल सकता है जिसमें कोई सार्वजनिक रूप से उजागर IP नहीं है)। हालाँकि, **प्रावधानित** को **सार्वजनिक IP** प्राप्त करने के लिए कॉन्फ़िगर किया जा सकता है (डिफ़ॉल्ट रूप से यह नहीं होता) और **सुरक्षा समूह** को प्रासंगिक पोर्ट को **उजागर** करने के लिए कॉन्फ़िगर किया जा सकता है।
- **सर्वरलेस** **केवल IAM** को प्रमाणीकरण विधि के रूप में समर्थन करता है। **प्रावधानित** SASL/SCRAM (**पासवर्ड**) प्रमाणीकरण, **IAM** प्रमाणीकरण, AWS **प्रमाणपत्र** प्रबंधक (ACM) प्रमाणीकरण और **अप्रमाणित** पहुंच का समर्थन करता है।
- ध्यान दें कि यदि अप्रमाणित पहुंच सक्षम है तो प्रावधानित Kafka को सार्वजनिक रूप से उजागर करना संभव नहीं है।
### Enumeration
```bash
#Get clusters
aws kafka list-clusters
@@ -43,9 +42,7 @@ aws kafka describe-configuration-revision --arn <config-arn> --revision <version
# If using SCRAN authentication, get used AWS secret name (not secret value)
aws kafka list-scram-secrets --cluster-arn <cluster-arn>
```
### Kafka IAM Access (in serverless)
### Kafka IAM एक्सेस (सर्वरलेस में)
```bash
# Guide from https://docs.aws.amazon.com/msk/latest/developerguide/create-serverless-cluster.html
# Download Kafka
@@ -75,7 +72,6 @@ kafka_2.12-2.8.1/bin/kafka-console-producer.sh --broker-list $BS --producer.conf
# Read messages
kafka_2.12-2.8.1/bin/kafka-console-consumer.sh --bootstrap-server $BS --consumer.config client.properties --topic msk-serverless-tutorial --from-beginning
```
### Privesc
{{#ref}}
@@ -90,14 +86,10 @@ kafka_2.12-2.8.1/bin/kafka-console-consumer.sh --bootstrap-server $BS --consumer
### Persistence
If you are going to **have access to the VPC** where a Provisioned Kafka is, you could **enable unauthorised access**, if **SASL/SCRAM authentication**, **read** the password from the secret, give some **other controlled user IAM permissions** (if IAM or serverless used) or persist with **certificates**.
यदि आप उस **VPC** तक **पहुँच** रखने जा रहे हैं जहाँ एक Provisioned Kafka है, तो आप **अनधिकृत पहुँच** **सक्षम** कर सकते हैं, यदि **SASL/SCRAM प्रमाणीकरण**, **गुप्त से** पासवर्ड **पढ़ें**, कुछ **अन्य नियंत्रित उपयोगकर्ता IAM अनुमतियाँ** दें (यदि IAM या सर्वरलेस का उपयोग किया गया हो) या **प्रमाणपत्रों** के साथ **स्थायी** रहें।
## References
- [https://docs.aws.amazon.com/msk/latest/developerguide/what-is-msk.html](https://docs.aws.amazon.com/msk/latest/developerguide/what-is-msk.html)
{{#include ../../../banners/hacktricks-training.md}}