RAWS playbook · Identity and access
Console or IAM Identity Center account takeover
The attacker signs in to the console as a person, with a phished password, a stolen session or a takeover at the identity provider. Many then register their own multi-factor authentication (MFA) device or change the password to keep access. Cut off the person's sessions and roles first, and keep the user and its CloudTrail record as evidence.
Look here
| Log | Search for |
|---|---|
CloudTrail, signin.amazonaws.com | Console sign-ins and whether MFA was used: ConsoleLogin with responseElements.ConsoleLogin and additionalEventData.MFAUsed. Search every Region where sign-ins land. Root sign-ins land in us-east-1, us-east-2 or us-west-2. IAM user sign-ins land in us-east-1, us-east-2, eu-north-1, ap-southeast-2 or the Region of a regional endpoint |
| CloudTrail Lake | Sign-ins without MFA since the start time: SELECT eventTime, userIdentity.arn, sourceIPAddress, userAgent, awsRegion FROM <event-data-store-id> WHERE eventName = 'ConsoleLogin' AND element_at(additionalEventData, 'MFAUsed') = 'No' AND eventTime > '<utc>' |
| CloudTrail, IAM Identity Center | Identity Center sign-ins and MFA registrations: CredentialChallenge, CredentialVerification and UserAuthentication, joined on AuthWorkflowID. DeviceEnrollmentRequired in UserAuthentication marks an MFA registration at sign-in |
| CloudTrail, IAM events | Changes to MFA devices, passwords and keys: CreateVirtualMFADevice, EnableMFADevice, DeactivateMFADevice, DeleteVirtualMFADevice, ResyncMFADevice, ChangePassword, UpdateLoginProfile, CreateAccessKey |
| CloudTrail, STS | Sign-ins of users federated from an external identity provider: AssumeRoleWithSAML |
| GuardDuty | Findings for unusual or suspicious sign-ins: UnauthorizedAccess:IAMUser/ConsoleLoginSuccess.B, InitialAccess:IAMUser/AnomalousBehavior, Policy:IAMUser/RootCredentialUsage |
Contain
| # | Item |
|---|---|
| 1 | Block the IAM user and keep it for evidence. The inline policy denies all actions: aws iam put-user-policy --user-name <user> --policy-name ir-deny-all --policy-document file://deny-all.json |
| 2 | Remove the IAM user's console password destructive: aws iam delete-login-profile --user-name <user> |
| 3 | Deactivate each access key of the IAM user: aws iam update-access-key --user-name <user> --access-key-id <access-key-id> --status Inactive |
| 4 | Deny an Identity Center user in every member account with a service control policy (SCP) that denies * on the user's identitystore:UserId. Keep the SCP in place for at least 12 hours. SCPs do not apply to the management account |
| 5 | Remove the Identity Center user's permission set assignments, group memberships and IAM role assignments in account access manager. A user with an open access portal session can assume new roles until that access is gone |
| 6 | Delete the Identity Center user's active sessions in the console, and only then choose Disable user access |
| 7 | Disable the user and revoke sessions at an external identity provider. See By identity provider |
| 8 | Revoke sessions on every role the user reached. The policy file denies * when aws:TokenIssueTime is before now: aws iam put-role-policy --role-name <role> --policy-name AWSRevokeOlderSessions --policy-document file://revoke.json |
Eradicate and recover
| # | Item |
|---|---|
| 1 | Deactivate each MFA device the attacker registered: aws iam deactivate-mfa-device --user-name <user> --serial-number <mfa-arn> |
| 2 | Delete each attacker virtual MFA device from the account destructive: aws iam delete-virtual-mfa-device --serial-number <mfa-arn> |
| 3 | Remove access keys, users and roles created during the session, after the evidence is exported |
| 4 | Remove permission set assignments the attacker added in Identity Center |
| 5 | Re-enroll the owner with a new password and a phishing-resistant MFA device before you lift the deny |
| 6 | Check the root user in every account for a password change, new MFA or new access keys |
Watch out
- The
aws:TokenIssueTimedeny has no effect on requests signed with the user's long-term access keys. Deactivate those keys as well. - Disabling an Identity Center user before deleting its sessions blocks session deletion in the console. Re-enable the user, delete the sessions, then disable the user again.
- Removing the SCP before 12 hours pass gives an open role session its permissions back.
AWS documentation: IAM Identity Center, revoke active IAM role sessions created by permission sets; IAM account access manager; CloudTrail console sign-in events. Checked October 2026.