0Pricing
Ethical Hacking Academy · Lesson

Cloud Attack Surface

AWS, Azure, GCP.

Cloud Attack Surface is a free Ethical Hacking Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Is the Cloud Attack Surface?

The cloud attack surface is the total set of points where an attacker could try to enter or extract data from a cloud environment. Unlike on-prem networks, the cloud surface is defined mostly by configuration and identity, not physical perimeter.

  • Public-facing APIs and management consoles
  • Identity and access management (IAM)
  • Storage buckets, databases, and serverless functions
  • Network exposure (security groups, load balancers)

A single misconfigured setting can expose an entire account.

The Big Three: AWS, Azure, GCP

Most cloud pentests target one of the three major providers. Each has its own identity model and terminology, but the attack patterns rhyme.

  • AWS — IAM users/roles, S3, EC2, Lambda
  • Azure — Entra ID (Azure AD), Blob Storage, VMs, Functions
  • GCP — IAM service accounts, Cloud Storage, Compute Engine

Learning one deeply makes the others easier, because the core concepts (identity, compute, storage, network) map across all of them.

The Shared Responsibility Model

Cloud providers secure the infrastructure; the customer secures what they put in it. This is the shared responsibility model, and almost every cloud breach happens on the customer side.

  • Provider: physical data centers, hypervisor, managed service patching
  • Customer: IAM policies, data, OS patching (IaaS), network config

As a pentester, you focus on the customer's responsibilities, because that is where the exploitable mistakes live.

Enumerating Cloud Identity

The first job in a cloud assessment is figuring out who you are and what you can do with the credentials you have. The AWS CLI exposes the caller identity instantly.

If a key is over-permissive, this single identity can pivot across the whole account.

# Confirm which AWS identity a credential belongs to
aws sts get-caller-identity

# Example output
# {
#   "UserId": "AIDA...",
#   "Account": "123456789012",
#   "Arn": "arn:aws:iam::123456789012:user/devuser"
# }

Public vs Private Surface

Cloud resources can be reachable from the public internet or only from inside a virtual network. Misconfigured exposure is one of the most common findings.

  • Security groups / NSGs open to 0.0.0.0/0
  • Storage buckets set to public read
  • Databases with public endpoints enabled
  • Management ports (22, 3389, 5432) exposed

Mapping which resources are public is the foundation of cloud recon.

Discovering Resources From Outside

Even without credentials, attackers enumerate a target's cloud footprint. Predictable naming and DNS leak a surprising amount.

Tools brute-force bucket and storage names based on the company name and common patterns.

# Resolve a cloud-hosted hostname to map provider/region
nslookup assets.example.com

# Probe a guessed S3 bucket name
curl -s -o /dev/null -w '%{http_code}\n' https://example-backups.s3.amazonaws.com/

The Management Plane vs Data Plane

Two distinct attack layers exist in every cloud account:

  • Management/control plane — the APIs that create, modify, and delete resources (e.g. iam:CreateUser, ec2:RunInstances)
  • Data plane — access to the data inside resources (reading an S3 object, querying a DB)

Compromising the management plane is usually game over, because the attacker can grant themselves any data-plane access they want.

Logging and Detection Surface

Cloud actions are logged centrally. As a pentester you must know these exist because defenders watch them, and finding them disabled is itself a finding.

  • AWS CloudTrail — records all API calls
  • Azure Activity Log / Monitor
  • GCP Cloud Audit Logs

An account with logging disabled or not monitored is a high-risk finding even before any exploitation.

# Check whether CloudTrail logging is active
aws cloudtrail describe-trails
aws cloudtrail get-trail-status --name my-trail

Common Cloud Entry Points

Most cloud compromises start from one of a handful of footholds:

  • Leaked access keys in Git repos, CI logs, or mobile apps
  • Over-permissive IAM roles attached to compromised servers
  • SSRF reaching the instance metadata service
  • Public storage buckets exposing secrets or backups

Recognizing these patterns lets you prioritize where to look first.

Mapping the Surface Methodically

A structured approach keeps a cloud assessment thorough. Automated tools enumerate the entire account once you have credentials.

Tools like ScoutSuite and Prowler audit configuration across services and flag risks automatically.

# Audit an AWS account for misconfigurations (read-only)
prowler aws

# Multi-cloud configuration review
scout aws

Scope and Authorization First

Cloud testing must stay inside the engagement's authorization. Providers also have rules of engagement.

  • Confirm the exact accounts, subscriptions, or projects in scope
  • Avoid actions that affect other tenants or shared infrastructure
  • Never run denial-of-service style tests without explicit written approval

Unauthorized cloud testing can violate provider terms and local law.

Quick Check

Under the shared responsibility model, which side is responsible for IAM policies and data configuration?

Recap: Cloud Attack Surface

You learned what defines the cloud attack surface and how it differs from traditional networks.

  • The surface is shaped by identity and configuration, not a physical perimeter
  • AWS, Azure, and GCP share the same core concepts: identity, compute, storage, network
  • The shared responsibility model puts config and data on the customer
  • Distinguish the management plane from the data plane
  • Always confirm scope and authorization before testing

Next, we drill into IAM misconfigurations, the heart of cloud attacks.

Frequently asked questions

Is the “Cloud Attack Surface” lesson free?

Yes — the full text of “Cloud Attack Surface” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.

What will I learn in “Cloud Attack Surface”?

AWS, Azure, GCP. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Ethical Hacking Academy?

No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Cloud Attack Surface” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Ethical Hacking Academy lesson?

Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Cloud Attack Surface
  2. IAM Misconfigurations
  3. S3 and Storage Exposure
  4. Metadata and SSRF
← Back to Ethical Hacking Academy