LoFP LoFP / using multiple aws accounts and roles is perfectly valid behavior. it's suspicious when an account requests privileges of an account it hasn't before. you should validate with the account owner that this is a legitimate request.

Techniques

Sample rules

AWS Cross Account Activity From Previously Unseen Account

Description

The following analytic identifies AssumeRole events where an IAM role in a different AWS account is accessed for the first time. It detects this activity by analyzing authentication logs and comparing the requesting and requested account IDs, flagging new cross-account activities. This behavior is significant because unauthorized cross-account access can indicate potential lateral movement or privilege escalation attempts. If confirmed malicious, an attacker could gain unauthorized access to resources in another account, potentially leading to data exfiltration, service disruption, or further compromise of the AWS environment.

Detection logic


| tstats min(_time) as firstTime max(_time) as lastTime from datamodel=Authentication where Authentication.signature=AssumeRole by Authentication.vendor_account Authentication.user Authentication.src Authentication.user_role 
| `drop_dm_object_name(Authentication)` 
| rex field=user_role "arn:aws:sts:*:(?<dest_account>.*):" 
| where vendor_account != dest_account 
| rename vendor_account as requestingAccountId dest_account as requestedAccountId 
| lookup previously_seen_aws_cross_account_activity requestingAccountId, requestedAccountId, OUTPUTNEW firstTime 
| eval status = if(firstTime > relative_time(now(), "-24h@h"),"New Cross Account Activity","Previously Seen") 
|  where status = "New Cross Account Activity" 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `aws_cross_account_activity_from_previously_unseen_account_filter`