| ID | Technique | Tactic |
|---|
Detection: AWS Cross Account Activity From Previously Unseen Account
REMOVED DETECTION
This detection has been removed from the Splunk Threat Research content library and is no longer maintained or supported.
Reason: Detection deprecated as it no longer effectively identifies the intended malicious activity
Removed in version: 5.4.0
If you have any questions or concerns, please reach out to us at research@splunk.com.
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.
Search
1
2| 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
3| `drop_dm_object_name(Authentication)`
4| rex field=user_role "arn:aws:sts:*:(?<dest_account>.*):"
5| where vendor_account != dest_account
6| rename vendor_account as requestingAccountId dest_account as requestedAccountId
7| lookup previously_seen_aws_cross_account_activity requestingAccountId, requestedAccountId, OUTPUTNEW firstTime
8| eval status = if(firstTime > relative_time(now(), "-24h@h"),"New Cross Account Activity","Previously Seen")
9| where status = "New Cross Account Activity"
10| `security_content_ctime(firstTime)`
11| `security_content_ctime(lastTime)`
12| `aws_cross_account_activity_from_previously_unseen_account_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| AWS CloudTrail | 'aws:cloudtrail' |
'aws_cloudtrail' |
Macros Used
| Name | Value |
|---|---|
| drop_dm_object_name | `` |
| aws_cross_account_activity_from_previously_unseen_account_filter | `` |
aws_cross_account_activity_from_previously_unseen_account_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | N/A |
| Earliest Time | N/A |
| Latest Time | N/A |
| Schedule Window | N/A |
| Creates Finding (Notable) | No |
| Creates Intermediate Finding (Risk Event) | No |
Implementation
You must be ingesting your cloud infrastructure logs from your cloud provider. You should run the baseline search Previously Seen AWS Cross Account Activity - Initial to build the initial table of source IP address, geographic locations, and times. You must also enable the second baseline search Previously Seen AWS Cross Account Activity - Update to keep this table up to date and to age out old data. You can also provide additional filtering for this search by customizing the aws_cross_account_activity_from_previously_unseen_account_filter macro.
Known False Positives
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.
Associated Analytic Story
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | Not Applicable | N/A | N/A | N/A |
| Unit | Not Applicable | N/A | N/A |
N/A |
| Integration | Not Applicable | N/A | N/A |
N/A |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 5