Course contentsShow
← Security
Lesson 1758 of 3,05235. Cloud Security - IAMFree lesson

Credential Creation and Rotation Abuse

Creating access keys, passwords, or rotating credentials for privileged users to establish persistent elevated access.

Credential Creation and Rotation Abuse

What you'll learn: How attackers exploit IAM permissions to create or rotate credentials for privileged accounts, establishing persistent backdoor access.

The Attack Concept

Imagine you have permission to reset someone else's password or create a spare key to their office. Even if you're not supposed to be that person, controlling their credentials gives you all their access. That's credential creation and rotation abuse in cloud IAM.

Attackers with certain IAM permissions—but not necessarily high privileges initially—can create new access keys, rotate passwords, or generate service account keys for more privileged identities. This transforms a limited foothold into persistent, elevated access.

Common Abuse Patterns

Password and Access Key Creation

If you have iam:CreateAccessKey or iam:CreateLoginProfile permissions for a target user, you can generate new credentials without invalidating the old ones. The legitimate user keeps working normally while you maintain a backdoor.

Credential Rotation Exploitation

Permissions like iam:UpdateAccessKey or service account key creation allow attackers to rotate credentials for privileged accounts. In some cases, they can even create credentials for roles they shouldn't directly assume.

Service Account Key Generation

In GCP, iam.serviceAccountKeys.create lets you mint keys for service accounts with broad permissions. Unlike temporary credentials, these keys are long-lived and easily exfiltrated.

Why It's Dangerous

This technique provides persistence (survives session expiration), stealth (legitimate credentials aren't disrupted), and elevation (access to higher-privileged identities). Organizations often miss these secondary credentials in access reviews.

Key Takeaway: Permissions to create or rotate credentials for other identities are equivalent to having those identities' access—treat them as high-risk and monitor credential lifecycle events closely.