Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 38 ยท Shared Responsibility and Threats

The Cloud Threat Landscape

A defender's tour of the main cloud threats: credential theft, misconfiguration, insecure APIs, insider risk, supply chain, DDoS and cryptojacking, with log-based detection practice.

To defend a cloud environment you need a realistic picture of who attacks it and how. This lesson is written for defenders: it describes the common threats at a level that helps you recognize and prevent them, without any step-by-step attack instructions. We finish by writing a small detector that spots two of these threats in a log.

Who are the threat actors?

  • Opportunistic attackers. Automated scanners constantly look for open storage, exposed admin panels and leaked keys. If you are exposed, you will be found within minutes or hours.
  • Organized criminals. Motivated by money: stealing data for extortion, running ransomware, abusing your compute for cryptocurrency mining, or sending spam and phishing from your account.
  • Insiders. Employees or contractors who misuse access, deliberately or by mistake. Mistakes are far more common than malice.
  • State-sponsored groups. Patient, well-resourced attackers who go after specific organizations for espionage or disruption.
  • Your own automation. A buggy script with admin rights can do more damage than most attackers.

The most common threats

Top cloud threats

Misconfiguration Open storage, wide rules
Credential theft Leaked keys, phishing
Insecure APIs Weak auth, no limits
Supply chain Poisoned dependencies

Notice how many are about configuration and identity.

1 / 2
  1. Misconfiguration. Publicly readable storage, databases open to the world, overly permissive security group rules, disabled logging. See misconfiguration and exposed storage.
  2. Credential theft and abuse. Phishing, malware on a developer laptop, access keys pushed to a public repository, tokens in logs. A stolen credential lets an attacker act as you.
  3. Insecure interfaces and APIs. Management and application APIs without proper authentication, authorization or rate limits.
  4. Excessive permissions and privilege escalation. A low-privilege identity that can grant itself more rights is a path to full account takeover.
  5. Supply chain attacks. Malicious or compromised libraries, container images and build tools that your pipeline trusts.
  6. Cryptojacking and resource abuse. Attackers start large numbers of compute instances in your account. The sign is often a surprise bill.
  7. Denial of service. Floods of traffic or expensive requests that make a service unavailable.
  8. Data exfiltration and ransomware. Copying data out, or encrypting or deleting it and demanding payment.
  9. Insider threats and accidents. Deleting the wrong resource, sharing the wrong file.
  10. Lateral movement. Once inside one workload, moving to others through shared roles, flat networks or reused secrets.

An attack path in outline

Most incidents follow a similar shape. Knowing it tells you where to place controls.

flowchart LR
    A["Initial access<br/>leaked key, exposed service"] --> B["Discovery<br/>list what the identity can see"]
    B --> C["Privilege escalation<br/>find broader permissions"]
    C --> D["Persistence<br/>new keys, backdoor roles"]
    D --> E["Impact<br/>data theft, mining, deletion"]

Each arrow is a chance to detect or block: MFA and key hygiene at A, least privilege at B and C, alerts on IAM changes at D, backups and egress controls at E.

What defenders look for

Detection is about spotting behavior that normal users do not show. Typical signals in cloud audit logs:

  • Logins from a country the user never uses, or many failed logins followed by a success.
  • API calls that list everything (users, buckets, roles) in quick succession.
  • Creation of new access keys or roles, or changes to logging settings.
  • A burst of instance creation in an unusual region.
  • Large downloads from storage by an identity that rarely reads it.

Runnable example: detect two threat signals in a log

The log below is made up. The program finds a possible brute-force-then-success pattern and a suspicious burst of instance launches. Real detection systems apply the same idea to millions of events.

Python Spot suspicious events in an audit log

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The addresses use ranges reserved for documentation (203.0.113.0/24, 198.51.100.0/24, 192.0.2.0/24), so they never point at a real machine.

Building defenses from the threat list

Threat First controls to apply
Misconfiguration Secure defaults, policy-as-code checks, continuous posture scanning
Credential theft MFA, short-lived credentials, secret scanning, no keys in code
Insecure APIs Authentication, authorization, throttling, input validation
Privilege escalation Least privilege, permission boundaries, alerts on IAM changes
Supply chain Pinned and verified dependencies, image scanning, signed artifacts
Cryptojacking Budgets and alerts, quotas, restricting unused regions
DDoS CDN, rate limiting, autoscaling, managed DDoS protection
Ransomware and deletion Versioning, immutable backups, tested restore

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which threat is the most common root cause of cloud breaches?

    Open resources, leaked keys and excessive permissions account for most incidents.
  2. 2. A sudden burst of instance creation in an unused region is often a sign of:

    Attackers who gain credentials often start many compute instances to mine cryptocurrency.
  3. 3. Which control directly reduces the damage from a stolen access key?

    Short-lived credentials expire quickly and limited permissions restrict what the thief can do.
  4. 4. Why do the example logs use addresses like 203.0.113.9?

    Using documentation ranges avoids pointing at real systems when showing examples.

Summary

  • Threat actors range from automated scanners to insiders; most attacks are opportunistic and target configuration and identity.
  • Major threats: misconfiguration, credential theft, insecure APIs, privilege escalation, supply chain, resource abuse, DDoS, ransomware and insiders.
  • Attacks follow a path from initial access to impact, and each step can be detected or blocked.
  • Audit logs reveal behavior that normal users do not show; simple rules already catch useful patterns.

Next: Misconfiguration and Exposed Storage