AWSCloudTrail - IAM Privilege Escalation by Instance Profile Attachment
Identifies RemoveRoleFromInstanceProfile followed by AddRoleToInstanceProfile from the same source and identity, which may indicate privilege escalation by attaching a higher-privileged role to an instance profile.…
Description
Identifies RemoveRoleFromInstanceProfile followed by AddRoleToInstanceProfile from the same source and identity, which may indicate privilege escalation by attaching a higher-privileged role to an instance profile. AWS Instance Profile: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html
Detection logic
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source service
- awscloudtrail
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
No references are available for this detection.
From the source
- At source
- Open at source
- Upstream identifier
- e1a91db8-f2b3-4531-bff6-da133d4f4f1a
- Tagged by the source as
- PrivilegeEscalation
Licence
- Published under
- MIT LicenseRead the licence
- Attribution
- Required
- Obtained under
- MITRead the origin licence
Authorship
- Published
- Aug 29, 2026
- Version
- 1