mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2025-12-26 04:41:55 -08:00
Translated ['src/pentesting-cloud/pentesting-cloud-methodology.md', 'src
This commit is contained in:
@@ -1,40 +1,40 @@
|
||||
# Pentesting क्लाउड कार्यप्रणाली
|
||||
# Pentesting Cloud Methodology
|
||||
|
||||
{{#include ../banners/hacktricks-training.md}}
|
||||
|
||||
<figure><img src="../images/CLOUD-logo-letters.svg" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
## बुनियादी कार्यप्रणाली
|
||||
## Basic Methodology
|
||||
|
||||
प्रत्येक क्लाउड की अपनी विशेषताएँ होती हैं लेकिन सामान्यतः कुछ **सामान्य बातें हैं जो एक pentester को जांचनी चाहिए** जब क्लाउड पर्यावरण का परीक्षण कर रहा हो:
|
||||
Each cloud has its own peculiarities but in general there are a few **common things a pentester should check** when testing a cloud environment:
|
||||
|
||||
- **बेंचमार्क चेक्स**
|
||||
- यह आपकी मदद करेगा **पर्यावरण के आकार** और **उपयोग की जाने वाली सेवाओं** को समझने में
|
||||
- यह आपको कुछ **त्वरित misconfigurations** खोजने में भी मदद करेगा क्योंकि आप इनमें से अधिकांश परीक्षण **automated tools** के साथ कर सकते हैं
|
||||
- **Benchmark checks**
|
||||
- यह आपको वातावरण का आकार और उपयोग की जाने वाली सेवाओं को समझने में मदद करेगा
|
||||
- यह आपको कुछ त्वरित misconfigurations खोजने में भी सक्षम करेगा क्योंकि आप इन परीक्षणों में से अधिकांश **automated tools** के साथ कर सकते हैं
|
||||
- **Services Enumeration**
|
||||
- यदि आपने बेंचमार्क टेस्ट सही तरीके से किए हैं तो यहाँ शायद ज्यादा misconfigurations नहीं मिलेंगे, पर कुछ ऐसे मिल सकते हैं जिन्हें बेंचमार्क टेस्ट में नहीं देखा गया था।
|
||||
- यह आपको बताएगा कि क्लाउड env में **ठीक-ठीक क्या इस्तेमाल हो रहा है**
|
||||
- यदि आपने सही तरीके से benchmark tests किए हैं तो आप शायद यहाँ ज्यादा misconfigurations नहीं पाएँगे, लेकिन ऐसे कुछ मिल सकते हैं जिनकी benchmark टेस्ट में तलाश नहीं की जा रही थी।
|
||||
- इससे आपको पता चलेगा कि क्लाउड env में वास्तव में क्या इस्तेमाल हो रहा है
|
||||
- यह अगले चरणों में बहुत मदद करेगा
|
||||
- **Check exposed assets**
|
||||
- यह पिछले सेक्शन के दौरान भी किया जा सकता है, आपको **हर उस चीज़ का पता लगाना होगा जो किसी न किसी तरह से Internet के लिए सम्भवतः exposed है** और उसे कैसे access किया जा सकता है।
|
||||
- यहाँ मैं **मैनुअली एक्सपोज्ड infrastructure** की बात कर रहा हूँ जैसे instances जिनमें web pages या अन्य ports एक्सपोज़ हैं, और साथ ही उन अन्य **cloud managed services** के बारे में जो एक्सपोज़ होने के लिए configure की जा सकती हैं (जैसे DBs या buckets)
|
||||
- फिर आपको चेक करना चाहिए **क्या वह resource एक्सपोज़ हो सकता है या नहीं** (गोपनीय जानकारी? vulnerabilities? exposed service में misconfigurations?)
|
||||
- यह पिछले सेक्शन के दौरान किया जा सकता है, आपको यह पता लगाना होगा कि इंटरनेट के लिए किस चीज़ की संभावित रूप से एक्सपोज़र है और उसे कैसे एक्सेस किया जा सकता है।
|
||||
- यहाँ मैं मैन्युअली एक्सपोज़ की गई infrastructure जैसे instances जिनमें web pages या अन्य पोर्ट एक्सपोज़ हैं, और साथ ही अन्य cloud managed services जिनको एक्सपोज़ होने के लिए configure किया जा सकता है (जैसे DBs या buckets) ले रहा हूँ
|
||||
- फिर आपको यह जांचना चाहिए कि **क्या उस resource को एक्सपोज़ किया जा सकता है या नहीं** (गोपनीय जानकारी? vulnerabilities? exposed service में misconfigurations?)
|
||||
- **Check permissions**
|
||||
- यहाँ आपको **क्लाउड के अंदर हर role/user की सभी permissions** पता करनी चाहिए और वे कैसे उपयोग हो रहे हैं
|
||||
- बहुत सारे **highly privileged** (सब कुछ नियंत्रित करने वाले) accounts? Generated keys जो उपयोग नहीं हो रहे?... इनमें से अधिकांश चेक पहले से बेंचमार्क टेस्ट में किए जाने चाहिए थे
|
||||
- यदि क्लाइंट OpenID या SAML या कोई अन्य **federation** उपयोग कर रहा है तो आपको उनसे और **जानकारी** माँगनी पड़ सकती है कि **प्रत्येक role कैसे assign किया जा रहा है** (यह एक जैसा नहीं है कि admin role 1 user को assign है या 100 को)
|
||||
- यह सिर्फ यह पता लगाने के लिए पर्याप्त नहीं है कि किस user के पास **admin** permissions "\*:\*". हैं। बहुत सारी **अन्य permissions** भी हैं जो उपयोग की जाने वाली सेवाओं के आधार पर बहुत **संवेदनशील** हो सकती हैं।
|
||||
- इसके अलावा, permissions का दुरुपयोग करके अनुसरण करने योग्य **potential privesc** तरीके भी होते हैं। इन सभी चीज़ों को ध्यान में रखा जाना चाहिए और जितना संभव हो उतने privesc paths रिपोर्ट किए जाने चाहिए।
|
||||
- यहाँ आपको cloud के अंदर प्रत्येक role/user के सभी permissions और उनका उपयोग कैसे हो रहा है यह पता लगाना चाहिए
|
||||
- बहुत सारे highly privileged (control everything) accounts? Generated keys का प्रयोग नहीं हो रहा?... इनमे से अधिकांश चेक पहले से benchmark tests में किए जा चुके होने चाहिए थे
|
||||
- यदि client OpenID या SAML या कोई अन्य federation उपयोग कर रहा है तो आपको उनसे पूछना पड़ सकता है कि **प्रत्येक role कैसे assign किया जा रहा है** (यह एक ही नहीं है कि admin role 1 user को assign है या 100 को)
|
||||
- यह सिर्फ यही जानना पर्याप्त नहीं है कि किस user के पास **admin** permissions "\*:\*". हैं। बहुत सारी अन्य permissions हैं जो उपयोग की जा रही सेवाओं के आधार पर बहुत **सेंसिटिव** हो सकती हैं।
|
||||
- इसके अलावा, permissions का दुरुपयोग करके अनुसरण करने के लिए संभावित privesc तरीके होते हैं। इन सभी चीजों को ध्यान में रखना चाहिए और जितने संभव हों उतने privesc paths रिपोर्ट किए जाने चाहिए।
|
||||
- **Check Integrations**
|
||||
- यह बहुत संभव है कि **अन्य क्लाउड्स या SaaS के साथ integrations** क्लाउड env के अंदर इस्तेमाल हो रहे हों।
|
||||
- उस क्लाउड के लिए **जो आप ऑडिट कर रहे हैं** अन्य platform के साथ integrations के लिए आपको यह सूचित करना चाहिए **कि किसके पास उस integration का (ab)use करने का access है** और आपको पूछना चाहिए कि किया जा रहा action कितना **संवेदनशील** है।\
|
||||
उदाहरण के लिए, कौन AWS bucket में लिख सकता है जहाँ से GCP data ले रहा है (पूछें कि GCP में उस data का उपचार करते समय action कितना संवेदनशील है)।
|
||||
- जिस क्लाउड को आप ऑडिट कर रहे हैं उसके अंदर से external platforms से होने वाले **integrations** के लिए, आपको पूछना चाहिए **बाहरी रूप से किसके पास उस integration का (ab)use करने का access है** और जाँचना चाहिए कि वह data कैसे उपयोग हो रहा है।\
|
||||
उदाहरण के लिए, यदि कोई service GCR में host किए गए Docker image का उपयोग कर रही है, तो आपको पूछना चाहिए कि किसके पास उसे modify करने का access है और वह image जब AWS क्लाउड के अंदर execute होगा तो उसे कौन-सी संवेदनशील जानकारी और access मिलेंगे।
|
||||
- बहुत संभव है कि क्लाउड env के अंदर अन्य clouds या SaaS के साथ integrations इस्तेमाल किए जा रहे हों।
|
||||
- जिस cloud की आप auditing कर रहे हैं उसकी **other platform** के साथ integrations के लिए आपको notify करना चाहिए कि **कौन उस integration को (ab)use करने का access रखता है** और आपको पूछना चाहिए कि की जा रही action कितनी **सेंसिटिव** है।\
|
||||
For example, who can write in an AWS bucket where GCP is getting data from (ask how sensitive is the action in GCP treating that data).
|
||||
- जिन integrations का स्रोत external platforms हैं और जो cloud आप audit कर रहे हैं के अंदर उपयोग हो रहे हैं, उनके लिए आपको पूछना चाहिए कि **externally किसके पास उस integration को (ab)use करने का access है** और यह जाँचना चाहिए कि वह डेटा कैसे उपयोग किया जा रहा है।\
|
||||
For example, if a service is using a Docker image hosted in GCR, you should ask who has access to modify that and which sensitive info and access will get that image when executed inside an AWS cloud.
|
||||
|
||||
## Multi-Cloud tools
|
||||
|
||||
ऐसे कई tools हैं जिनका उपयोग विभिन्न क्लाउड environments को टेस्ट करने के लिए किया जा सकता है। इस सेक्शन में installation steps और links बताए जाएंगे।
|
||||
There are several tools that can be used to test different cloud environments. The installation steps and links are going to be indicated in this section.
|
||||
|
||||
### [PurplePanda](https://github.com/carlospolop/purplepanda)
|
||||
|
||||
@@ -71,7 +71,7 @@ python3 main.py -e -p google #Enumerate the env
|
||||
|
||||
### [Prowler](https://github.com/prowler-cloud/prowler)
|
||||
|
||||
यह **AWS, GCP & Azure** को सपोर्ट करता है। प्रत्येक provider को कॉन्फ़िगर करने का तरीका देखें: [https://docs.prowler.cloud/en/latest/#aws](https://docs.prowler.cloud/en/latest/#aws)
|
||||
यह **AWS, GCP & Azure** को सपोर्ट करता है। प्रत्येक प्रदाता को कॉन्फ़िगर करने का तरीका देखें: [https://docs.prowler.cloud/en/latest/#aws](https://docs.prowler.cloud/en/latest/#aws)
|
||||
```bash
|
||||
# Install
|
||||
pip install prowler
|
||||
@@ -170,7 +170,7 @@ steampipe check all
|
||||
|
||||
<summary>सभी प्रोजेक्ट्स की जाँच करें</summary>
|
||||
|
||||
सभी प्रोजेक्ट्स की जाँच करने के लिए आपको `gcp.spc` फ़ाइल जनरेट करनी होगी जिसमें उन सभी प्रोजेक्ट्स का उल्लेख हो जिन्हें टेस्ट करना है। आप नीचे दिए गए स्क्रिप्ट के निर्देशों का पालन कर सकते हैं।
|
||||
सभी प्रोजेक्ट्स की जाँच करने के लिए आपको उन सभी प्रोजेक्ट्स को इंगित करने वाली `gcp.spc` फ़ाइल जनरेट करनी होगी जिन्हें टेस्ट करना है। आप निम्नलिखित स्क्रिप्ट में दिए निर्देशों का पालन कर सकते हैं।
|
||||
```bash
|
||||
FILEPATH="/tmp/gcp.spc"
|
||||
rm -rf "$FILEPATH" 2>/dev/null
|
||||
@@ -194,11 +194,11 @@ echo "Copy $FILEPATH in ~/.steampipe/config/gcp.spc if it was correctly generate
|
||||
```
|
||||
</details>
|
||||
|
||||
**अन्य GCP insights** (सेवाओं को enumerate करने के लिए उपयोगी) जाँचने के लिए उपयोग करें: [https://github.com/turbot/steampipe-mod-gcp-insights](https://github.com/turbot/steampipe-mod-gcp-insights)
|
||||
देखने के लिए **अन्य GCP insights** (सेवाओं को सूचीबद्ध करने के लिए उपयोगी) उपयोग करें: [https://github.com/turbot/steampipe-mod-gcp-insights](https://github.com/turbot/steampipe-mod-gcp-insights)
|
||||
|
||||
Terraform GCP code जाँचने के लिए: [https://github.com/turbot/steampipe-mod-terraform-gcp-compliance](https://github.com/turbot/steampipe-mod-terraform-gcp-compliance)
|
||||
Terraform GCP code देखने के लिए: [https://github.com/turbot/steampipe-mod-terraform-gcp-compliance](https://github.com/turbot/steampipe-mod-terraform-gcp-compliance)
|
||||
|
||||
Steampipe के अधिक GCP plugins: [https://github.com/turbot?q=gcp](https://github.com/turbot?q=gcp)
|
||||
Steampipe के और GCP plugins: [https://github.com/turbot?q=gcp](https://github.com/turbot?q=gcp)
|
||||
{{#endtab }}
|
||||
|
||||
{{#tab name="AWS" }}
|
||||
@@ -225,7 +225,7 @@ cd steampipe-mod-aws-compliance
|
||||
steampipe dashboard # To see results in browser
|
||||
steampipe check all --export=/tmp/output4.json
|
||||
```
|
||||
Terraform AWS code देखने के लिए: [https://github.com/turbot/steampipe-mod-terraform-aws-compliance](https://github.com/turbot/steampipe-mod-terraform-aws-compliance)
|
||||
Terraform AWS code की जाँच के लिए: [https://github.com/turbot/steampipe-mod-terraform-aws-compliance](https://github.com/turbot/steampipe-mod-terraform-aws-compliance)
|
||||
|
||||
Steampipe के और AWS प्लगइन्स: [https://github.com/orgs/turbot/repositories?q=aws](https://github.com/orgs/turbot/repositories?q=aws)
|
||||
{{#endtab }}
|
||||
@@ -234,15 +234,15 @@ Steampipe के और AWS प्लगइन्स: [https://github.com/orgs/t
|
||||
### [~~cs-suite~~](https://github.com/SecurityFTW/cs-suite)
|
||||
|
||||
AWS, GCP, Azure, DigitalOcean.\
|
||||
यह python2.7 की आवश्यकता रखता है और ऐसा लगता है कि इसे मेंटेन नहीं किया जा रहा है।
|
||||
यह python2.7 की आवश्यकता रखता है और ऐसा लगता है कि यह मेंटेन नहीं किया जा रहा है।
|
||||
|
||||
### Nessus
|
||||
|
||||
Nessus में _**Audit Cloud Infrastructure**_ स्कैन है जो इनका समर्थन करता है: AWS, Azure, Office 365, Rackspace, Salesforce. एक **Client Id** प्राप्त करने के लिए **Azure** में कुछ अतिरिक्त कॉन्फ़िगरेशन की आवश्यकता होती है।
|
||||
Nessus में _**Audit Cloud Infrastructure**_ स्कैन है जो समर्थित है: AWS, Azure, Office 365, Rackspace, Salesforce. **Azure** में कुछ अतिरिक्त कॉन्फ़िगरेशन की आवश्यकता होती है ताकि **Client Id** प्राप्त किया जा सके।
|
||||
|
||||
### [**cloudlist**](https://github.com/projectdiscovery/cloudlist)
|
||||
|
||||
Cloudlist Cloud Providers से Assets (Hostnames, IP Addresses) प्राप्त करने के लिए एक **multi-cloud tool for getting Assets** है।
|
||||
Cloudlist एक **multi-cloud tool for getting Assets** (Hostnames, IP Addresses) है जो क्लाउड प्रदाताओं से जानकारी प्राप्त करता है।
|
||||
|
||||
{{#tabs }}
|
||||
{{#tab name="Cloudlist" }}
|
||||
@@ -265,7 +265,7 @@ cloudlist -config </path/to/config>
|
||||
|
||||
### [**cartography**](https://github.com/lyft/cartography)
|
||||
|
||||
Cartography एक Python टूल है जो इन्फ्रास्ट्रक्चर संसाधनों और उनके आपसी रिश्तों को Neo4j डेटाबेस द्वारा संचालित एक सहज ग्राफ़ दृश्य में समाहित करता है।
|
||||
Cartography एक Python टूल है जो इन्फ्रास्ट्रक्चर संसाधन और उनके बीच के संबंधों को एक सहज ग्राफ़ दृश्य में समेकित करता है, जिसे Neo4j डेटाबेस संचालित करता है।
|
||||
|
||||
{{#tabs }}
|
||||
{{#tab name="Install" }}
|
||||
@@ -302,7 +302,7 @@ ghcr.io/lyft/cartography \
|
||||
|
||||
### [**starbase**](https://github.com/JupiterOne/starbase)
|
||||
|
||||
Starbase सेवाओं और प्रणालियों — जिनमें क्लाउड इन्फ्रास्ट्रक्चर, SaaS applications, सुरक्षा नियंत्रण और अन्य शामिल हैं — से संपत्तियाँ और संबंध इकट्ठा करता है और उन्हें Neo4j डेटाबेस द्वारा समर्थित एक सहज ग्राफ दृश्य में प्रस्तुत करता है।
|
||||
Starbase क्लाउड इंफ्रास्ट्रक्चर, SaaS applications, security controls, और अन्य सेवाओं व सिस्टमों से assets और relationships इकट्ठा करके Neo4j database द्वारा समर्थित एक सहज ग्राफ़ व्यू में प्रस्तुत करता है।
|
||||
|
||||
{{#tabs }}
|
||||
{{#tab name="Install" }}
|
||||
@@ -361,7 +361,7 @@ uri: bolt://localhost:7687
|
||||
|
||||
### [**SkyArk**](https://github.com/cyberark/SkyArk)
|
||||
|
||||
स्कैन किए गए AWS या Azure environment में सबसे अधिक privileged users का पता लगाएं, जिनमें AWS Shadow Admins भी शामिल हैं। यह powershell का उपयोग करता है।
|
||||
स्कैन किए गए AWS या Azure वातावरण में सबसे अधिक विशेषाधिकार प्राप्त उपयोगकर्ताओं का पता लगाएँ, जिसमें AWS Shadow Admins भी शामिल हैं। यह powershell का उपयोग करता है।
|
||||
```bash
|
||||
Import-Module .\SkyArk.ps1 -force
|
||||
Start-AzureStealth
|
||||
@@ -372,13 +372,13 @@ Scan-AzureAdmins
|
||||
```
|
||||
### [Cloud Brute](https://github.com/0xsha/CloudBrute)
|
||||
|
||||
एक टूल जो top cloud providers (Amazon, Google, Microsoft, DigitalOcean, Alibaba, Vultr, Linode) पर किसी company (target) की infrastructure, files और apps खोजने के लिए है।
|
||||
एक टूल जो कंपनी (target) की infrastructure, files और apps को शीर्ष क्लाउड प्रदाताओं (Amazon, Google, Microsoft, DigitalOcean, Alibaba, Vultr, Linode) पर खोजने के लिए है।
|
||||
|
||||
### [CloudFox](https://github.com/BishopFox/cloudfox)
|
||||
|
||||
- CloudFox cloud infrastructure में exploitable attack paths खोजने के लिए एक टूल है (वर्तमान में केवल AWS & Azure समर्थित हैं, GCP जल्द जोड़ा जाएगा)।
|
||||
- यह एक enumeration टूल है जो manual pentesting की पूरकता के लिए बनाया गया है।
|
||||
- यह cloud environment के भीतर किसी भी डेटा को create या modify नहीं करता।
|
||||
- CloudFox एक टूल है जो cloud infrastructure में exploitable attack paths खोजने के लिए है (वर्तमान में केवल AWS & Azure समर्थित हैं, GCP जल्द आ रहा है)।
|
||||
- यह एक enumeration टूल है जो manual pentesting को complement करने के लिए बनाया गया है।
|
||||
- यह क्लाउड environment के भीतर किसी भी डेटा को create या modify नहीं करता/करती।
|
||||
|
||||
### More lists of cloud security tools
|
||||
|
||||
@@ -410,12 +410,12 @@ aws-security/
|
||||
azure-security/
|
||||
{{#endref}}
|
||||
|
||||
### Attack Graph
|
||||
## सामान्य क्लाउड सुरक्षा विशेषताएँ
|
||||
|
||||
[**Stormspotter** ](https://github.com/Azure/Stormspotter) Azure subscription में resources का “attack graph” बनाता है। यह red teams और pentesters को tenant के भीतर attack surface और pivot अवसरों को दृश्य रूप से देखने में सक्षम बनाता है, और आपके defenders को incident response कार्यों को तेजी से व्यवस्थित और प्राथमिकता देने में बहुत मदद करता है।
|
||||
### कन्फिडेंशियल कंप्यूटिंग
|
||||
|
||||
### Office365
|
||||
|
||||
आपको **Global Admin** या कम से कम **Global Admin Reader** की आवश्यकता है (ध्यान दें कि Global Admin Reader कुछ हद तक सीमित है)। हालाँकि, ये सीमाएँ कुछ PS modules में दिखाई देती हैं और इन्हें features को **via the web application** के माध्यम से एक्सेस करके बायपास किया जा सकता है।
|
||||
{{#ref}}
|
||||
confidential-computing/luks2-header-malleability-null-cipher-abuse.md
|
||||
{{#endref}}
|
||||
|
||||
{{#include ../banners/hacktricks-training.md}}
|
||||
|
||||
Reference in New Issue
Block a user