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,7 +4,7 @@
## Lambda
For more information check:
अधिक जानकारी के लिए देखें:
{{#ref}}
../../aws-services/aws-lambda-enum.md
@@ -12,7 +12,7 @@ For more information check:
### Lambda Layer Persistence
It's possible to **introduce/backdoor a layer to execute arbitrary code** when the lambda is executed in a stealthy way:
यह संभव है कि **कोई लेयर पेश की जाए/बैकडोर किया जाए ताकि जब लैम्ब्डा निष्पादित हो, तो मनमाना कोड चल सके**:
{{#ref}}
aws-lambda-layers-persistence.md
@@ -20,7 +20,7 @@ aws-lambda-layers-persistence.md
### Lambda Extension Persistence
Abusing Lambda Layers it's also possible to abuse extensions and persist in the lambda but also steal and modify requests.
Lambda Layers का दुरुपयोग करते हुए, यह भी संभव है कि एक्सटेंशन का दुरुपयोग किया जाए और लैम्ब्डा में स्थायी रूप से बने रहें, लेकिन साथ ही अनुरोधों को चुराएं और संशोधित करें।
{{#ref}}
aws-abusing-lambda-extensions.md
@@ -28,41 +28,37 @@ aws-abusing-lambda-extensions.md
### Via resource policies
It's possible to grant access to different lambda actions (such as invoke or update code) to external accounts:
यह संभव है कि विभिन्न लैम्ब्डा क्रियाओं (जैसे कि इनवोक या कोड अपडेट) के लिए बाहरी खातों को पहुंच प्रदान की जाए:
<figure><img src="../../../../images/image (255).png" alt=""><figcaption></figcaption></figure>
### Versions, Aliases & Weights
A Lambda can have **different versions** (with different code each version).\
Then, you can create **different aliases with different versions** of the lambda and set different weights to each.\
This way an attacker could create a **backdoored version 1** and a **version 2 with only the legit code** and **only execute the version 1 in 1%** of the requests to remain stealth.
एक Lambda में **विभिन्न संस्करण हो सकते हैं** (प्रत्येक संस्करण के साथ अलग कोड)।\
फिर, आप लैम्ब्डा के **विभिन्न संस्करणों के साथ विभिन्न उपनाम बना सकते हैं** और प्रत्येक को अलग वजन सेट कर सकते हैं।\
इस तरह एक हमलावर **बैकडोर संस्करण 1** और **केवल वैध कोड के साथ संस्करण 2** बना सकता है और **केवल 1%** अनुरोधों में संस्करण 1 को निष्पादित कर सकता है ताकि वह छिपा रहे।
<figure><img src="../../../../images/image (120).png" alt=""><figcaption></figcaption></figure>
### Version Backdoor + API Gateway
1. Copy the original code of the Lambda
2. **Create a new version backdooring** the original code (or just with malicious code). Publish and **deploy that version** to $LATEST
1. Call the API gateway related to the lambda to execute the code
3. **Create a new version with the original code**, Publish and deploy that **version** to $LATEST.
1. This will hide the backdoored code in a previous version
4. Go to the API Gateway and **create a new POST method** (or choose any other method) that will execute the backdoored version of the lambda: `arn:aws:lambda:us-east-1:<acc_id>:function:<func_name>:1`
1. Note the final :1 of the arn **indicating the version of the function** (version 1 will be the backdoored one in this scenario).
5. Select the POST method created and in Actions select **`Deploy API`**
6. Now, when you **call the function via POST your Backdoor** will be invoked
1. Lambda का मूल कोड कॉपी करें
2. **मूल कोड को बैकडोर करते हुए एक नया संस्करण बनाएं** (या केवल दुर्भावनापूर्ण कोड के साथ)। उस संस्करण को प्रकाशित करें और **$LATEST पर तैनात करें**
1. कोड निष्पादित करने के लिए लैम्ब्डा से संबंधित API गेटवे को कॉल करें
3. **मूल कोड के साथ एक नया संस्करण बनाएं**, उस **संस्करण को प्रकाशित करें** और **$LATEST पर तैनात करें**।
1. यह पिछले संस्करण में बैकडोर कोड को छिपा देगा
4. API गेटवे पर जाएं और **एक नया POST विधि बनाएं** (या कोई अन्य विधि चुनें) जो लैम्ब्डा के बैकडोर संस्करण को निष्पादित करेगा: `arn:aws:lambda:us-east-1:<acc_id>:function:<func_name>:1`
1. अंतिम :1 को ध्यान में रखें जो **कार्य के संस्करण को इंगित करता है** (इस परिदृश्य में संस्करण 1 बैकडोर वाला होगा)।
5. बनाए गए POST विधि का चयन करें और क्रियाओं में **`Deploy API`** चुनें
6. अब, जब आप **POST के माध्यम से कार्य को कॉल करेंगे, तो आपका बैकडोर** सक्रिय होगा
### Cron/Event actuator
The fact that you can make **lambda functions run when something happen or when some time pass** makes lambda a nice and common way to obtain persistence and avoid detection.\
Here you have some ideas to make your **presence in AWS more stealth by creating lambdas**.
यह तथ्य कि आप **लैम्ब्डा कार्यों को तब चला सकते हैं जब कुछ होता है या जब कुछ समय बीतता है** लैम्ब्डा को स्थायीता प्राप्त करने और पहचान से बचने का एक अच्छा और सामान्य तरीका बनाता है।\
यहां आपके **AWS में उपस्थिति को अधिक छिपाने के लिए लैम्ब्डा बनाने के कुछ विचार हैं**
- Every time a new user is created lambda generates a new user key and send it to the attacker.
- Every time a new role is created lambda gives assume role permissions to compromised users.
- Every time new cloudtrail logs are generated, delete/alter them
- हर बार जब एक नया उपयोगकर्ता बनाया जाता है, तो लैम्ब्डा एक नया उपयोगकर्ता कुंजी उत्पन्न करता है और इसे हमलावर को भेजता है।
- हर बार जब एक नई भूमिका बनाई जाती है, तो लैम्ब्डा समझौता किए गए उपयोगकर्ताओं को भूमिका मानने की अनुमति देता है।
- हर बार जब नए क्लाउडट्रेल लॉग उत्पन्न होते हैं, तो उन्हें हटा दें/संशोधित करें
{{#include ../../../../banners/hacktricks-training.md}}