Skip to content

SetDefaultPolicyVersion

AWS

SetDefaultPolicyVersion

service: AWS - IAM
techniques:

Event

Sets the default version of an IAM managed policy, changing which version of the policy is active for all attached entities.

Security Context

  • Switching the default policy version activates a pre-staged set of permissions, allowing an attacker to escalate privileges by reverting to or activating a version with broader access.
  • This is a known IAM privilege escalation technique — an adversary creates a permissive policy version and then sets it as default to immediately gain elevated access across all attached principals.

Log Source

CloudTrail

Sample Event

Adversarial. Draco rolls a customer-managed policy back to a previously-permissive version: arn:aws:iam::555123456789:policy/OccamyPipelinePolicy version v1 (which, before being patched in v2, granted s3:* on *). Because the policy is attached to multiple service roles, switching the default version v3 → v1 instantly re-grants permissive access across every attached principal — without any AttachPolicy / PutPolicy event firing. T1098.

{
"eventVersion": "1.09",
"userIdentity": {
"type": "IAMUser",
"principalId": "AIDADRAC0MALF0YBADGY",
"arn": "arn:aws:iam::555123456789:user/draco",
"accountId": "555123456789",
"accessKeyId": "AKIADRAC0MALF0YEXAMP5",
"userName": "draco",
"sessionContext": {
"attributes": {
"creationDate": "2026-04-15T18:51:02Z",
"mfaAuthenticated": "false"
}
}
},
"eventTime": "2026-04-15T20:31:09Z",
"eventSource": "iam.amazonaws.com",
"eventName": "SetDefaultPolicyVersion",
"awsRegion": "us-east-1",
"sourceIPAddress": "203.0.113.66",
"userAgent": "aws-cli/1.18.147 Python/3.7.10 Linux/5.4.0-1045-aws botocore/1.18.6",
"requestParameters": {
"policyArn": "arn:aws:iam::555123456789:policy/OccamyPipelinePolicy",
"versionId": "v1"
},
"responseElements": null,
"requestID": "90000000-0000-4000-8000-000110101100",
"eventID": "90000000-0000-4000-8000-000110101101",
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "555123456789",
"eventCategory": "Management",
"tlsDetails": {
"tlsVersion": "TLSv1.3",
"cipherSuite": "TLS_AES_128_GCM_SHA256",
"clientProvidedHostHeader": "iam.amazonaws.com"
}
}

MITRE ATT&CK Mapping

Tactics: Privilege Escalation

Techniques:
  • T1098 — Account Manipulation — Adversaries may manipulate accounts to maintain and/or elevate access to victim systems. Account manipulation may consist of any action that preserves or modifies adversary access to a compromised account, such as modifying credentials or permission groups. These actions could also include accoun...