Learning path
M3

Cloud & Identity Attack Paths

Attackers rarely break in with one big exploit — they chain small misconfigurations. See the moves, and you can break the chain at any link.

Legal & ethical use

This lesson demonstrates offensive techniques for educational purposes and authorized security testing only. Using them against systems you do not own or lack explicit written permission to test is illegal under computer-misuse laws worldwide, including Turkey’s Penal Code (Law No. 5237, arts. 243-245). The authors and PrimeThreat accept no liability for any misuse of or damage arising from this material.

SSRF → metadata → cloud takeover

A single server-side request forgery reaches the instance metadata service and walks out with cloud credentials.

1T1190

Exploit public app (SSRF)

A URL parameter the app fetches lets the attacker point it inward.

2T1552.005

Hit metadata (169.254.169.254)

IMDSv1 answers without authentication and returns role credentials.

3T1078.004

Use the stolen role creds

The instance role’s access key, secret, and session token now act as a valid cloud account.

4T1530

Over-privileged role reads data

The role can list and read storage it never needed — exfil the buckets.

Break the chain

Enforce IMDSv2 (session-token required), scope instance roles to least privilege, block egress to 169.254.169.254 from app code, and validate/allow-list outbound URLs.

Seen in the wild

Capital One (2019) — SSRF + IMDSv1 + over-broad role exposed 100M+ records.

Leaked key → IAM privilege escalation

One long-lived access key in a repo or log becomes admin through a permissive IAM policy.

1T1552.001

Find a leaked credential

Committed to git, baked into an image, or printed in a log.

2T1087.004

Enumerate permissions

List roles, policies, and what this identity can touch.

3T1098

Abuse a privesc primitive

iam:PassRole + launch, or CreatePolicyVersion to grant itself more.

4T1098.001

Persist with a new key

Mint a fresh access key or backdoor a role to survive rotation.

Break the chain

Kill long-lived keys — use SSO and short-lived credentials. Secret-scan every commit and build, enforce least privilege, deny iam:PassRole broadly, and alert on new key / policy-version creation.

Seen in the wild

Uber (2016) — keys in a private repo led to 57M records.

Phishing → MFA fatigue → session theft

Weak MFA is bypassed by exhausting the user, then the live session is stolen outright.

1T1110

Get the password

Phish a credential or spray a reused one.

2T1621

Push-bomb the MFA prompt

Spam approval prompts until the tired user just taps “Approve”.

3T1539

Steal the session token

Lift the session cookie/token so MFA never matters again.

4T1078.004

Pivot to SaaS & cloud

Reuse the session across the IdP’s connected apps and consoles.

Break the chain

Use phishing-resistant MFA (FIDO2/passkeys) or number-matching, enforce conditional access (device + location), shorten session lifetimes, and alert on impossible-travel and new-device sign-ins.

Seen in the wild

Uber (2022) & 0ktapus — MFA fatigue and session theft across many orgs.

Exposed Kubernetes → cluster takeover

A reachable dashboard or vulnerable pod yields a service-account token with far too much power.

1T1190

Reach an exposed surface

Public dashboard, unauthenticated kubelet, or an RCE in a pod.

2T1552.001

Read the mounted SA token

Default-mounted token sits at a known path inside the container.

3T1078

Use over-broad RBAC

The token can list secrets or even acts as cluster-admin.

4T1552.007

Loot the cluster

Dump every secret, deploy workloads, reach the cloud control plane.

Break the chain

Tight RBAC (no default cluster-admin), set automountServiceAccountToken: false, enforce NetworkPolicy and Pod Security, never expose the dashboard/API publicly, and segment the control plane.

Seen in the wild

Tesla (2018) — exposed K8s dashboard led to cloud cryptomining.

Cloud IAM privilege-escalation primitives

The “abuse a primitive” step, named. A read-only foothold becomes admin through one of these.

iam:PassRole + compute

Pass a more-privileged role to a Lambda/EC2 you launch, then run as it.

CreatePolicyVersion

Attach a new default version of a policy you can edit — grant yourself *.

AssumeRole chaining

Hop role → role through trust policies until one is admin.

Attach managed policy

iam:AttachUserPolicy lets a weak user bolt on AdministratorAccess.

The controls that cut every chain

A few high-leverage defenses appear in every breaker above. Invest here first.

Least privilege, always

Most chains end because a role could do something it never needed.

Short-lived credentials

SSO + temporary tokens beat long-lived keys that leak and persist.

Phishing-resistant MFA

FIDO2/passkeys remove push-fatigue and most credential phishing.

Segmentation & egress control

Default-deny outbound stops SSRF→metadata and data exfil paths.

Detect the pivot

Alert on new keys, policy changes, impossible travel, metadata calls.

Assume breach, limit blast radius

Design so one compromised identity can’t reach the whole estate.

See the full attacker lifecycle

These chains are slices of a bigger pattern. Next: the end-to-end attack lifecycle and the defender/IR cycles that answer it.

Go to Flows →