AWS Concurrent Sessions From Different Ips
Description
The following analytic identifies an AWS IAM account with concurrent sessions originating from more than one unique IP address within a 5-minute window. It leverages AWS CloudTrail logs, specifically the DescribeEventAggregates event, to detect this behavior. This activity is significant as it may indicate a session hijacking attack, where an adversary uses stolen session cookies to access AWS resources from a different location. If confirmed malicious, this could allow unauthorized access to sensitive corporate resources, leading to potential data breaches or further exploitation within the AWS environment.
Query · spl
`cloudtrail` eventName = DescribeEventAggregates src_ip!="AWS Internal"
| bin span=5m _time
| rename user_name as user
| stats min(_time) as firstTime max(_time) as lastTime values(user_agent) as user_agent values(signature) as signature values(src) as src values(dest) as dest dc(src) as distinct_ip_count
BY _time user vendor_account
vendor_region vendor_product
| where distinct_ip_count > 1
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `aws_concurrent_sessions_from_different_ips_filter`
Implementation guide
You must install Splunk AWS Add on and Splunk App for AWS. This search works with AWS CloudTrail logs.
Known false positives
- A user with concurrent sessions from different Ips may also represent the legitimate use of more than one device. Filter as needed and/or customize the threshold to fit your environment.
Analyst notes
Known false positives: A user with concurrent sessions from different Ips may also represent the legitimate use of more than one device. Filter as needed and/or customize the threshold to fit your environment.