Cloud Reconnaissance
Before attacking a cloud infrastructure you must discover what the organization uses and what it has exposed: which provider, which public resources (buckets, functions, APIs), which domains point to cloud services, and which credentials they’ve leaked. Much of it is passive recon (see Passive Reconnaissance), but here it’s specifically aimed at identifying and enumerating cloud assets within an authorized scope.
Threat model
Section titled “Threat model”Cloud recon looks for three things: which provider the organization uses (to apply the right methodology), what is exposed without authentication (buckets, functions, snapshots), and which credentials have leaked (the shortest path in). None of this touches systems intrusively in its passive phase: it relies on DNS, certificates, search engines, and public repositories. The authenticated phase begins only once you hold legitimate credentials within scope.
flowchart TD
A[Target: org/domain] --> B[Identify provider]
B -->|DNS/CNAME, headers, IP ranges| C[AWS / Azure / GCP]
A --> D[Find public resources]
D -->|cloud_enum, GrayhatWarfare| E[Buckets, functions, apps]
A --> F[Find leaked credentials]
F -->|trufflehog, gitleaks| G[Keys/SA JSON]
G --> H[Authenticated access]
C --> H
E --> H
H --> I[Enumerate identity and permissions]
Theory: identify the provider and assets
Section titled “Theory: identify the provider and assets”DNS signals, headers, and IP ranges give away the provider:
# DNS/CNAME reveal the providerdig CNAME target.com # *.amazonaws.com, *.azurewebsites.net, *.cloudfront.net...# headers: Server, x-amz-*, x-azure-*, x-goog-*curl -sI https://target.com | grep -iE 'amz|azure|goog|cloudfront|server'# certificates (crt.sh) and web fingerprint (see recon-fingerprint)Useful tells: *.s3.amazonaws.com and x-amz-request-id (AWS); *.blob.core.windows.net and *.azurewebsites.net (Azure); *.storage.googleapis.com and *.run.app (GCP). To learn whether an IP belongs to a provider, all three publish their ranges (AWS ip-ranges.json, Azure Service Tags, GCP cloud.json).
Public resources and storage
Section titled “Public resources and storage”Buckets and containers follow predictable naming patterns (company-backups, company-dev). See Buckets and Public Storage for exploitation; here, discovery:
# mass multi-cloud discovery by keywordcloud_enum -k target # S3 + Azure Blob + GCS at once# typical endpoints# AWS S3: https://<bucket>.s3.amazonaws.com# Azure Blob: https://<account>.blob.core.windows.net/<container># GCS: https://storage.googleapis.com/<bucket># search engines for already-indexed buckets# GrayhatWarfare -> buckets.grayhatwarfare.comExposed serverless, apps, and APIs
Section titled “Exposed serverless, apps, and APIs”# subdomains and CNAMEs pointing to cloud services (see recon-subdominios)# *.azurewebsites.net, *.lambda-url.<region>.on.aws, *.cloudfunctions.net, *.run.app# fingerprint and content discovery (see recon-content)ffuf -u https://<app>.azurewebsites.net/FUZZ -w wordlist.txtRed Team
Section titled “Red Team”Leaked credentials (vector #1)
Section titled “Leaked credentials (vector #1)”A leaked AWS key or service account JSON is direct access, the most impactful and frequent cloud finding (see Source Code OSINT):
# in repos and codetrufflehog github --org target --only-verifiedgitleaks detect --source . --report-format json# patterns to search (grep/regex)# AKIA[0-9A-Z]{16} -> AWS Access Key ID# "type": "service_account" -> GCP service account key (JSON)# also in .env, logs, dumps, Pastebin, open bucketsAuthenticated enumeration (with credentials)
Section titled “Authenticated enumeration (with credentials)”If you get in-scope credentials, enumerate who you are and what you can do:
# AWSaws sts get-caller-identity # who am I? (ARN, Account ID)aws iam get-account-authorization-details # policies (if allowed)# Azureaz account show ; az ad signed-in-user show# GCPgcloud auth list ; gcloud projects listMulti-cloud audit tools: ScoutSuite and Prowler for overall posture; enumerate-iam and Pacu to learn what an AWS identity actually allows; ROADrecon and AzureHound for Azure tenants.
IDs and tenants without credentials
Section titled “IDs and tenants without credentials”# Azure tenant ID and whether the domain uses Entra/O365 (see cloud-m365)curl -s "https://login.microsoftonline.com/target.com/.well-known/openid-configuration" | jq .# AWS Account ID can sometimes be inferred from an ARN, error, or bucketBlue Team
Section titled “Blue Team”- Don’t expose resources publicly by default; unpredictable bucket names are not a defense (use policies and Block Public Access).
- Secret scanning in repos and GitHub push protection; rotate immediately any credential that may have leaked.
- Reduce the surface: don’t leave dev functions/APIs/services accessible; review DNS/CNAMEs pointing to cloud (risk of Subdomain takeover).
- CSPM/ASM to continuously inventory exposed cloud assets (Prowler, ScoutSuite).
- Monitor the organization’s appearance in bucket search engines (GrayhatWarfare) and in leaks.
Checklist
Section titled “Checklist”- Identify the provider(s) by DNS/CNAME/headers
- Discover buckets/blobs/GCS (cloud_enum, GrayhatWarfare)
- Enumerate exposed serverless/apps/APIs (Content Discovery)
- Hunt for leaked credentials (trufflehog/gitleaks, Source Code OSINT)
- With credentials: identity and permissions (sts/az/gcloud)
- Account ID / tenant ID identified
- Automated audit (ScoutSuite/Prowler)
- Inventory of cloud assets for the attack phase