Skip to content
Pwnversity
CLOUD-FUNDbasic · 6 min · upd. 2026-10

Cloud Security Fundamentals

The cloud changes the pentest rules: there’s no physical perimeter or servers to scan, but APIs, identities, and permissions. The central asset is no longer “root on a machine” but a set of credentials with certain permissions (IAM). Understanding the shared responsibility model, how authentication and authorization work, and where the typical flaws are is the basis of the whole Cloud area. This card is the map: the vectors, the cross-provider equivalences, and which specific card to jump to in each case.

In the cloud, the attacker almost never exploits a 0-day in the provider’s infrastructure: they abuse what the customer misconfigures. The goal is to obtain an identity (some credentials), figure out what it allows, and chain legitimate permissions up to account control. The assets at stake:

  • Identities and credentials: access keys, tokens, service accounts, managed identities. Their leakage is the number-one vector.
  • Data in public resources: buckets, snapshots, databases, and backups exposed without authentication.
  • Excessive permissions (IAM): an identity with more permissions than needed equals an admin password.
  • Control plane (API): everything goes through the provider’s APIs; whoever controls credentials with permissions controls resources.

The provider (AWS/Azure/GCP) secures the infrastructure (“security of the cloud”); you secure what you put inside (“security in the cloud”): configuration, IAM, data, code. Almost every cloud breach is the customer’s fault: public buckets, lax IAM, leaked credentials, misconfigured services. Cloud pentesting focuses there.

flowchart TB
    subgraph Provider["Provider (security OF the cloud)"]
        HW[Hardware, physical network, hypervisor, regions]
    end
    subgraph Customer["Customer (security IN the cloud)"]
        IAM[IAM and credentials]
        DATA[Data and encryption]
        CFG[Service configuration]
        CODE[App/function code]
    end
    HW --> Customer
    IAM --> Breaches[Almost every cloud breach]
    DATA --> Breaches
    CFG --> Breaches
    CODE --> Breaches

Identity is the new perimeter. What on-premise was “root on a server” is in the cloud “IAM credentials with permissions”. The mental mappings:

  • Network perimeter → identity is the perimeter.
  • Root on a server → IAM credentials with permissions.
  • Scanning ports → enumerating APIs and permissions.
  • Service exploit → permission abuse or misconfiguration.
  • Firewall → security groups and IAM policies.

The big three solve the same problems with different names. Knowing how to translate speeds up recon:

  • Identity: IAM User/Role (AWS) · Entra ID / Managed Identity (Azure) · IAM / Service Account (GCP).
  • Compute: EC2 · Virtual Machine · Compute Engine.
  • Storage: S3 · Blob Storage · Cloud Storage.
  • Serverless: Lambda · Functions · Cloud Functions / Cloud Run.
  • Metadata: 169.254.169.254 (AWS and Azure) · metadata.google.internal (GCP, resolves to the same IP).
  • Logging: CloudTrail · Activity Log · Cloud Audit Logs.

The general flow of an authorized cloud assessment, with the specific card for each step:

Ventana de terminal
# 1) Recon: identify provider and exposed assets (see cloud-recon)
dig CNAME target.com # *.amazonaws.com, *.azurewebsites.net...
curl -sI https://target.com | grep -iE 'amz|azure|goog|cloudfront'
# 2) Hunt for leaked credentials (vector #1)
trufflehog github --repo https://github.com/org/repo
# 3) With credentials: who am I and what can I do?
aws sts get-caller-identity
az account show
gcloud auth list

Entry vectors, by frequency and impact:

  1. Leaked credentials (GitHub, .env, logs, dumps) → direct access (see Source Code OSINT).
  2. Public resources (buckets, snapshots, DBs) → data leak (see Buckets and Public Storage).
  3. SSRF → metadata service → instance credentials (see Metadata Service (IMDS)).
  4. Misconfigured IAM → privilege escalation (see IAM Abuse and Privilege Escalation).
  5. Misconfigured services: serverless, containers, Kubernetes (see Kubernetes Pentesting).

Reference real case: Capital One (2019) chained an SSRF in a misconfigured WAF to the IMDSv1 of an EC2 instance, stole the role’s temporary credentials, and exfiltrated data of ~100 million customers from S3. It’s the textbook SSRF→IMDS→S3 chain.

  • Least privilege in IAM: no wildcards (*), scoped roles, periodic review with access analyzers.
  • No static credentials: use managed roles/identities, rotation, secrets in managers (Secrets Manager / Key Vault / Secret Manager).
  • Block public access by default (buckets, DBs); encryption at rest and in transit.
  • IMDSv2 mandatory on AWS (mitigates SSRF→metadata), hop limit set to 1.
  • Logging enabled and monitored: CloudTrail / Activity Log / Audit Logs; detection with GuardDuty / Defender for Cloud / Security Command Center.
  • CSPM (Cloud Security Posture Management) to detect misconfigurations continuously (Prowler, ScoutSuite, Steampipe).