ورقة مساعدة لسرد أصول السحابة Cloudlist
نظرة عامة
Cloudlist هي أداة متعددة السحابات طورتها Project Discovery لسرد الأصول من مختلف مزودي الخدمات السحابية. تم تصميمها لمساعدة فرق الأمن على تعزيز جهودهم في إدارة سطح الهجوم من خلال اكتشاف ومراقبة الأصول السحابية عبر مزودي خدمات متعددين، بما في ذلك AWS وAzure وGCP وDigitalOcean وLinode وAlibaba Cloud وغيرها.
ما يميز Cloudlist عن الأدوات الخاصة بمزود معين هو واجهتها الموحدة للاستعلام من مزودي السحابة المتعددين في وقت واحد. هذا يبسط بشكل كبير عملية الحفاظ على جرد الأصول السحابية، خاصة للمؤسسات التي تستخدم مزودي سحابة متعددين. توفر Cloudlist مخرجات متسقة بغض النظر عن المزود، مما يجعل دمجها في سير عمل الأمن وأنابيب الأتمتة أكثر سهولة.
Cloudlist مخصصة بشكل أساسي للفرق الزرقاء للحفاظ على الرؤية في بنيتهم التحتية السحابية، لكنها قيمة أيضًا للفرق الحمراء واختبار الاختراق الذين يحتاجون إلى فهم سطح هجوم المؤسسة. من خلال توفير نظرة شاملة للأصول السحابية، تساعد Cloudlist المتخصصين الأمنيين على تحديد المخاطر الأمنية المحتملة، مثل الخدمات المكشوفة أو الموارد المكونة بشكل غير صحيح أو النشر غير المصرح به.
Would you like me to continue with the remaining sections?```bash
Install using Go (requires Go 1.20 or later)
go install -v github.com/projectdiscovery/cloudlist/cmd/cloudlist@latest
Verify installation
cloudlist -version
### Using Docker
```bash
# Pull the latest Docker image
docker pull projectdiscovery/cloudlist:latest
# Run Cloudlist using Docker
docker run -it projectdiscovery/cloudlist:latest -h
Using Homebrew (macOS)
# Install using Homebrew
brew install cloudlist
# Verify installation
cloudlist -version
Using PDTM (Project Discovery Tools Manager)
# Install PDTM first if not already installed
go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest
# Install Cloudlist using PDTM
pdtm -i cloudlist
# Verify installation
cloudlist -version
On Kali Linux
# Install using apt
sudo apt install cloudlist
# Verify installation
cloudlist -version
Basic Usage
Listing Cloud Assets
# List assets from all configured providers
cloudlist
# List assets from a specific provider
cloudlist -provider aws
# List assets from multiple providers
cloudlist -provider aws,azure,gcp
Output Options
# Save results to a file
cloudlist -o results.txt
# Output in JSON format
cloudlist -json -o results.json
# Silent mode (only results)
cloudlist -silent
Provider Configuration
AWS Configuration
# Add AWS provider with access key and secret key
cloudlist -add aws -aws-access-key AKIAIOSFODNN7EXAMPLE -aws-secret-key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
# Add AWS provider with profile
cloudlist -add aws -aws-profile default
# Add AWS provider with session token
cloudlist -add aws -aws-access-key AKIAIOSFODNN7EXAMPLE -aws-secret-key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY -aws-session-token AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4Olgk
Azure Configuration
# Add Azure provider with client ID, client secret, and tenant ID
cloudlist -add azure -azure-client-id 00000000-0000-0000-0000-000000000000 -azure-client-secret EXAMPLE-SECRET -azure-tenant-id 00000000-0000-0000-0000-000000000000
# Add Azure provider with subscription ID
cloudlist -add azure -azure-client-id 00000000-0000-0000-0000-000000000000 -azure-client-secret EXAMPLE-SECRET -azure-tenant-id 00000000-0000-0000-0000-000000000000 -azure-subscription-id 00000000-0000-0000-0000-000000000000
GCP Configuration
# Add GCP provider with service account key file
cloudlist -add gcp -gcp-service-account-key /path/to/service-account-key.json
# Add GCP provider with credentials file
cloudlist -add gcp -gcp-credentials-file /path/to/credentials.json
# Add GCP provider with project ID
cloudlist -add gcp -gcp-service-account-key /path/to/service-account-key.json -gcp-project-id example-project-id
DigitalOcean Configuration
# Add DigitalOcean provider with API token
cloudlist -add digitalocean -do-token YOUR_DIGITALOCEAN_API_TOKEN
Linode Configuration
# Add Linode provider with API token
cloudlist -add linode -linode-token YOUR_LINODE_API_TOKEN
Alibaba Cloud Configuration
# Add Alibaba Cloud provider with access key and secret key
cloudlist -add alibaba -alibaba-access-key YOUR_ALIBABA_ACCESS_KEY -alibaba-secret-key YOUR_ALIBABA_SECRET_KEY
# Add Alibaba Cloud provider with region
cloudlist -add alibaba -alibaba-access-key YOUR_ALIBABA_ACCESS_KEY -alibaba-secret-key YOUR_ALIBABA_SECRET_KEY -alibaba-region cn-hangzhou
Cloudflare Configuration
# Add Cloudflare provider with API token
cloudlist -add cloudflare -cloudflare-token YOUR_CLOUDFLARE_API_TOKEN
# Add Cloudflare provider with API key and email
cloudlist -add cloudflare -cloudflare-key YOUR_CLOUDFLARE_API_KEY -cloudflare-email your-email@example.com
Advanced Usage
Provider Management
# List configured providers
cloudlist -list
# Remove a provider
cloudlist -remove aws
# Remove all providers
cloudlist -remove-all
Filtering Options
# Filter by resource type
cloudlist -resource-type instance
# Filter by multiple resource types
cloudlist -resource-type instance,storage
# Filter by tag
cloudlist -tag key=value
# Filter by multiple tags
cloudlist -tag key1=value1,key2=value2
Resource Types
# List specific resource types
cloudlist -resource-type instance # List only instances
cloudlist -resource-type storage # List only storage resources
cloudlist -resource-type network # List only network resources
cloudlist -resource-type database # List only database resources
cloudlist -resource-type container # List only container resources
cloudlist -resource-type function # List only serverless functions
Output Formatting
# Format output as IP:port
cloudlist -format "\\\\{\\\\{.IP\\\\}\\\\}:\\\\{\\\\{.Port\\\\}\\\\}"
# Format output as hostname and IP
cloudlist -format "\\\\{\\\\{.Hostname\\\\}\\\\} (\\\\{\\\\{.IP\\\\}\\\\})"
# Format output as JSON with specific fields
cloudlist -json -format "\\\\{\\\\{.ID\\\\}\\\\},\\\\{\\\\{.Name\\\\}\\\\},\\\\{\\\\{.IP\\\\}\\\\},\\\\{\\\\{.Provider\\\\}\\\\}"
Integration with Other Tools
Pipeline with HTTPX
# List cloud assets and probe for HTTP services
cloudlist -silent|httpx -silent
# List cloud assets, filter by port, and probe for HTTP services
cloudlist -silent|grep ":80"|httpx -silent
Pipeline with Nuclei
# List cloud assets, probe for HTTP services, and scan for vulnerabilities
cloudlist -silent|httpx -silent|nuclei -t cves/
# List cloud assets from specific provider and scan for vulnerabilities
cloudlist -provider aws -silent|httpx -silent|nuclei -t exposures/
Pipeline with Naabu
# List cloud assets and scan for open ports
cloudlist -silent|naabu -silent
# List cloud assets and scan for specific ports
cloudlist -silent|naabu -p 80,443,8080 -silent
Output Customization
Custom Output Format
# Output only IP addresses
cloudlist -silent -format "\\\\{\\\\{.IP\\\\}\\\\}"
# Output hostname and provider
cloudlist -silent -format "\\\\{\\\\{.Hostname\\\\}\\\\} (\\\\{\\\\{.Provider\\\\}\\\\})"
# Output JSON with specific fields
cloudlist -json -format "\\\\{\\\\{.ID\\\\}\\\\},\\\\{\\\\{.Name\\\\}\\\\},\\\\{\\\\{.IP\\\\}\\\\},\\\\{\\\\{.Provider\\\\}\\\\}"
Filtering Output
# Filter by IP address
cloudlist -silent|grep "192.168"
# Filter by hostname
cloudlist -silent|grep "example.com"
# Filter by provider
cloudlist -silent|grep "aws"
# Filter by port
cloudlist -silent|grep ":443"
Advanced Filtering
Provider-Specific Filtering
# Filter AWS resources by region
cloudlist -provider aws -silent|grep "us-east-1"
# Filter Azure resources by resource group
cloudlist -provider azure -silent|grep "production-rg"
# Filter GCP resources by project
cloudlist -provider gcp -silent|grep "example-project"
Resource Type Filtering
# Filter by instance type
cloudlist -silent|grep "t2.micro"
# Filter by storage type
cloudlist -silent|grep "s3"
# Filter by database type
cloudlist -silent|grep "rds"
Troubleshooting
Common Issues
-
Authentication Issues
# Verify provider configuration cloudlist -list # Update provider credentials cloudlist -remove aws cloudlist -add aws -aws-access-key NEW_ACCESS_KEY -aws-secret-key NEW_SECRET_KEY -
Rate Limiting
# Reduce concurrency cloudlist -concurrency 5 # Add delay between requests cloudlist -delay 2 -
Permission Issues
# Check if credentials have sufficient permissions # For AWS, ensure the IAM user/role has the necessary read permissions # For Azure, ensure the service principal has the Reader role # For GCP, ensure the service account has the necessary viewer roles -
No Results
# Check if provider is configured correctly cloudlist -list # Try a different provider cloudlist -provider azure # Check if resources exist in the account
Debugging
# Enable verbose mode
cloudlist -v
# Show debug information
cloudlist -debug
# Check provider configuration
cloudlist -list
Configuration
Configuration File
Cloudlist uses a configuration file located at $HOME/.config/cloudlist/config.yaml. You can customize various settings in this file:
# Example configuration file
providers:
- id: aws
aws:
access_key: AKIAIOSFODNN7EXAMPLE
secret_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- id: azure
azure:
client_id: 00000000-0000-0000-0000-000000000000
client_secret: EXAMPLE-SECRET
tenant_id: 00000000-0000-0000-0000-000000000000
- id: gcp
gcp:
service_account_key: /path/to/service-account-key.json
Environment Variables
# Set Cloudlist configuration via environment variables
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AZURE_CLIENT_ID=00000000-0000-0000-0000-000000000000
export AZURE_CLIENT_SECRET=EXAMPLE-SECRET
export AZURE_TENANT_ID=00000000-0000-0000-0000-000000000000
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
Reference
Command Line Options
| علم | وصف |
|---|---|
-provider | مزود(مزودون) لسرد الأصول من |
-resource-type | نوع/أنواع المورد للسرد |
-tag | وسم/وسوم للتصفية حسب الموارد |
-format | تنسيق المخرجات المخصص |
-o, -output | ملف للكتابة إليه |
-json | اكتب المخرجات بتنسيق JSON |
-silent | قواعد: |
- أظهر فقط النتائج في المخرجات |
|
-v, -verbose| إظهار المخرجات التفصيلية | |-debug| إظهار معلومات التصحيح | |-concurrency| عدد الطلبات المتزامنة | |-delay| التأخير بين الطلبات بالثواني | |-add| أضف مزود جديد | |-remove| إزالة مزود الخدمة | |-remove-all| إزالة جميع المزودين | |-list| قائمة مزودي الخدمات المكونة | |-version| أظهر إصدار Cloudlist |
Provider-Specific Options
AWS Options
| علم | وصف |
|---|---|
-aws-access-key | مفتاح وصول AWS |
-aws-secret-key | مفتاح سر AWS |
-aws-session-token | رمز جلسة AWS |
-aws-profile | اسم ملف تعريف AWS |
-aws-region | منطقة AWS |
Azure Options
| علم | وصف |
|---|---|
-azure-client-id | معرف عميل Azure |
-azure-client-secret | سر العميل Azure |
-azure-tenant-id | معرف مستأجر Azure |
-azure-subscription-id | معرف اشتراك Azure |
GCP Options
| علم | وصف |
|---|---|
-gcp-service-account-key | ملف مفتاح حساب خدمة GCP |
-gcp-credentials-file | ملف اعتماد GCP |
-gcp-project-id | معرف مشروع GCP |
DigitalOcean Options
| علم | وصف |
|---|---|
-do-token | رمز واجهة برمجة التطبيقات الخاصة بـ DigitalOcean |
Linode Options
| علم | وصف |
|---|---|
-linode-token | رمز واجهة برمجة التطبيقات Linode |
Alibaba Cloud Options
| علم | وصف |
|---|---|
-alibaba-access-key | مفتاح الوصول لـ Alibaba Cloud |
-alibaba-secret-key | مفتاح سر Alibaba Cloud |
-alibaba-region | منطقة Alibaba Cloud |
| علم | وصف |
|---|---|
-cloudflare-token | رمز واجهة برمجة التطبيقات Cloudflare |
-cloudflare-key | مفتاح واجهة برمجة التطبيقات Cloudflare |
-cloudflare-email | بريد Cloudflare |
| مزود | وصف |
|---|---|
aws | Amazon Web Services خدمات |
azure | مايكروسوفت أزور |
gcp | منصة Google Cloud Platform |
digitalocean | DigitalOcean |
linode | لينود |
alibaba | Alibaba Cloud (سحابة علي بابا) |
cloudflare | كلاودفلير |
| نوع | وصف |
|---|---|
instance | الآلات الافتراضية والنسخ |
storage | موارد التخزين (مثل S3 buckets، Azure Blobs) |
network | موارد الشبكة (مثل: موازنات الحمل، VPCs) |
database | موارد قاعدة البيانات (مثل RDS، Azure SQL) |
container | موارد الحاويات (مثل ECS، AKS) |
function | الدوال بدون خادم (مثل Lambda، Azure Functions) |
يوفر هذا الدليل المرجعي مرجعًا شاملًا لاستخدام Cloudlist، بدءًا من سرد الأصول الأساسية وحتى التصفية المتقدمة والتكامل مع الأدوات الأخرى. للحصول على أحدث المعلومات، يرجى دائمًا الرجوع إلى الوثائق الرسمية.