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 @@
## CodeBuild
For more information, check:
अधिक जानकारी के लिए, देखें:
{{#ref}}
../../aws-services/aws-codebuild-enum.md
@@ -12,8 +12,8 @@ For more information, check:
### Check Secrets
If credentials have been set in Codebuild to connect to Github, Gitlab or Bitbucket in the form of personal tokens, passwords or OAuth token access, these **credentials are going to be stored as secrets in the secret manager**.\
Therefore, if you have access to read the secret manager you will be able to get these secrets and pivot to the connected platform.
यदि क्रेडेंशियल्स को Github, Gitlab या Bitbucket से कनेक्ट करने के लिए Codebuild में सेट किया गया है, व्यक्तिगत टोकन, पासवर्ड या OAuth टोकन एक्सेस के रूप में, तो ये **क्रेडेंशियल्स को सीक्रेट मैनेजर में सीक्रेट्स के रूप में स्टोर किया जाएगा**\
इसलिए, यदि आपके पास सीक्रेट मैनेजर को पढ़ने का एक्सेस है, तो आप इन सीक्रेट्स को प्राप्त कर सकते हैं और जुड़े प्लेटफॉर्म पर पिवट कर सकते हैं।
{{#ref}}
../../aws-privilege-escalation/aws-secrets-manager-privesc.md
@@ -21,68 +21,56 @@ Therefore, if you have access to read the secret manager you will be able to get
### Abuse CodeBuild Repo Access
In order to configure **CodeBuild**, it will need **access to the code repo** that it's going to be using. Several platforms could be hosting this code:
**CodeBuild** को कॉन्फ़िगर करने के लिए, इसे **कोड रेपो** तक **एक्सेस** की आवश्यकता होगी जिसका यह उपयोग करने जा रहा है। कई प्लेटफार्म इस कोड को होस्ट कर सकते हैं:
<figure><img src="../../../../images/image (96).png" alt=""><figcaption></figcaption></figure>
The **CodeBuild project must have access** to the configured source provider, either via **IAM role** of with a github/bitbucket **token or OAuth access**.
**CodeBuild प्रोजेक्ट को कॉन्फ़िगर किए गए स्रोत प्रदाता तक एक्सेस होना चाहिए**, या तो **IAM भूमिका** के माध्यम से या github/bitbucket **टोकन या OAuth एक्सेस** के साथ।
An attacker with **elevated permissions in over a CodeBuild** could abuse this configured access to leak the code of the configured repo and others where the set creds have access.\
In order to do this, an attacker would just need to **change the repository URL to each repo the config credentials have access** (note that the aws web will list all of them for you):
एक हमलावर के पास **CodeBuild में उच्च अनुमतियाँ** होने पर, वह इस कॉन्फ़िगर किए गए एक्सेस का दुरुपयोग करके कॉन्फ़िगर किए गए रेपो और अन्य में कोड लीक कर सकता है जहाँ सेट क्रेड्स को एक्सेस है।\
इसके लिए, एक हमलावर को बस **रेपो के लिए प्रत्येक रेपो का रिपॉजिटरी URL बदलने की आवश्यकता होगी** जिनके लिए कॉन्फ़िग क्रेडेंशियल्स को एक्सेस है (ध्यान दें कि aws वेब आपके लिए सभी को सूचीबद्ध करेगा):
<figure><img src="../../../../images/image (107).png" alt=""><figcaption></figcaption></figure>
And **change the Buildspec commands to exfiltrate each repo**.
और **प्रत्येक रेपो को एक्सफिल्ट्रेट करने के लिए Buildspec कमांड बदलें**
> [!WARNING]
> However, this **task is repetitive and tedious** and if a github token was configured with **write permissions**, an attacker **won't be able to (ab)use those permissions** as he doesn't have access to the token.\
> Or does he? Check the next section
> हालाँकि, यह **कार्य दोहरावदार और थकाऊ है** और यदि एक github टोकन को **लिखने की अनुमतियों** के साथ कॉन्फ़िगर किया गया था, तो एक हमलावर **उन अनुमतियों का (दुरुपयोग) नहीं कर पाएगा** क्योंकि उसके पास टोकन तक पहुँच नहीं है।\
> या क्या है? अगले अनुभाग की जाँच करें
### Leaking Access Tokens from AWS CodeBuild
You can leak access given in CodeBuild to platforms like Github. Check if any access to external platforms was given with:
आप CodeBuild में दिए गए एक्सेस को Github जैसे प्लेटफार्मों पर लीक कर सकते हैं। जाँच करें कि क्या किसी बाहरी प्लेटफार्मों तक पहुँच दी गई थी:
```bash
aws codebuild list-source-credentials
```
{{#ref}}
aws-codebuild-token-leakage.md
{{#endref}}
### `codebuild:DeleteProject`
An attacker could delete an entire CodeBuild project, causing loss of project configuration and impacting applications relying on the project.
एक हमलावर पूरे CodeBuild प्रोजेक्ट को हटा सकता है, जिससे प्रोजेक्ट कॉन्फ़िगरेशन का नुकसान होगा और प्रोजेक्ट पर निर्भर एप्लिकेशन पर प्रभाव पड़ेगा।
```bash
aws codebuild delete-project --name <value>
```
**Potential Impact**: Loss of project configuration and service disruption for applications using the deleted project.
**संभावित प्रभाव**: हटाए गए प्रोजेक्ट का उपयोग करने वाले अनुप्रयोगों के लिए प्रोजेक्ट कॉन्फ़िगरेशन का नुकसान और सेवा में बाधा।
### `codebuild:TagResource` , `codebuild:UntagResource`
An attacker could add, modify, or remove tags from CodeBuild resources, disrupting your organization's cost allocation, resource tracking, and access control policies based on tags.
एक हमलावर CodeBuild संसाधनों से टैग जोड़ सकता है, संशोधित कर सकता है, या हटा सकता है, जिससे आपकी संगठन की लागत आवंटन, संसाधन ट्रैकिंग, और टैग के आधार पर पहुंच नियंत्रण नीतियों में बाधा उत्पन्न हो सकती है।
```bash
aws codebuild tag-resource --resource-arn <value> --tags <value>
aws codebuild untag-resource --resource-arn <value> --tag-keys <value>
```
**Potential Impact**: Disruption of cost allocation, resource tracking, and tag-based access control policies.
**संभावित प्रभाव**: लागत आवंटन, संसाधन ट्रैकिंग, और टैग-आधारित पहुंच नियंत्रण नीतियों में विघटन।
### `codebuild:DeleteSourceCredentials`
An attacker could delete source credentials for a Git repository, impacting the normal functioning of applications relying on the repository.
एक हमलावर Git रिपॉजिटरी के लिए स्रोत क्रेडेंशियल्स को हटा सकता है, जो रिपॉजिटरी पर निर्भर करने वाले अनुप्रयोगों के सामान्य कार्य को प्रभावित करता है।
```sql
aws codebuild delete-source-credentials --arn <value>
```
**Potential Impact**: Disruption of normal functioning for applications relying on the affected repository due to the removal of source credentials.
**संभावित प्रभाव**: प्रभावित रिपॉजिटरी पर निर्भर करने वाले अनुप्रयोगों के सामान्य कार्य में बाधा, स्रोत क्रेडेंशियल्स को हटाने के कारण।
{{#include ../../../../banners/hacktricks-training.md}}