DET-124 · human · confidence High

Role Assumption From Unknown Accounts

Alert on AssumeRole calls into your accounts from AWS accounts outside the organization and partner list.

Even if a trust change was missed, its use is logged. CloudTrail in the target account records AssumeRole with the caller's account ID. Comparing that ID with the organization and approved partners catches backdoor trust being used.

When an unknown account shows up, review which role it used, what it did with the session, and who last edited that role's trust policy. The editor is often the insider. Treat any role that accepted the call as compromised until the trust is cleaned up.

Data sources
AWS CloudTrail
Platforms
AWS

Logic

index=cloudtrail eventSource=sts.amazonaws.com eventName=AssumeRole
| eval caller_acct=coalesce('userIdentity.accountId', mvindex(split('userIdentity.arn', ":"), 4))
| search NOT [| inputlookup org_accounts.csv | rename account_id AS caller_acct] NOT [| inputlookup approved_partners.csv | rename account_id AS caller_acct]
| stats count values(requestParameters.roleArn) as roles by caller_acct sourceIPAddress

False positives

New partner integrations not yet added to the list.

Catches 2 techniques