Permission Boundary Bypass Techniques
What you'll learn: How attackers exploit misconfigurations in permission boundaries to gain access beyond intended restrictions.
What Are Permission Boundaries?
From your last lesson, you learned that permission boundaries act as a safety net—defining the maximum permissions an identity can have, even if broader policies are attached. Think of them as a fence around a playground: no matter how much access a policy grants, the boundary prevents you from leaving that enclosed area.
The Bypass Problem
Permission boundaries only work if they're applied correctly and comprehensively. Attackers look for gaps where boundaries either don't exist, aren't enforced, or contain overly permissive actions. Common bypass techniques include:
1. Creating Identities Without Boundaries
If an attacker has iam:CreateUser or iam:CreateRole permissions but the administrator forgot to require permission boundaries on new identities, the attacker can create a new user/role with full privileges—completely outside the boundary fence.
2. Modifying or Removing Boundaries
If an identity has iam:DeleteUserPermissionsBoundary or iam:PutUserPermissionsBoundary permissions, they might remove their own boundary or replace it with a more permissive one. It's like being able to move your own fence.
3. Exploiting Boundary Policy Wildcards
A boundary with overly broad permissions (like s3:* or iam:*) defeats the purpose. Attackers can perform dangerous actions that were supposed to be restricted.
4. Boundary-Free Service Roles
Creating service roles (like Lambda execution roles) without boundaries lets attackers pivot through that role to perform actions their own identity couldn't.
The Defense
Always combine permission boundaries with deny policies that prevent boundary modification and enforce boundary attachment on identity creation. Regularly audit which identities lack boundaries using Access Analyzer.
Key Takeaway:
Permission boundaries only protect when properly applied, non-removable, and genuinely restrictive—gaps in boundary coverage or enforcement are critical privilege escalation vectors.