AWS CreateLoginProfile
Description
The following analytic identifies the creation of a login profile for one AWS user by another, followed by a console login from the same source IP. It uses AWS CloudTrail logs to correlate the CreateLoginProfile and ConsoleLogin events based on the source IP and user identity. This activity is significant as it may indicate privilege escalation, where an attacker creates a new login profile to gain unauthorized access. If confirmed malicious, this could allow the attacker to escalate privileges and maintain persistent access to the AWS environment.
Query · spl
`cloudtrail` eventName = CreateLoginProfile
| rename requestParameters.userName as new_login_profile
| table src_ip eventName new_login_profile userIdentity.userName
| join new_login_profile src_ip [
| search `cloudtrail` eventName = ConsoleLogin
| rename userIdentity.userName as new_login_profile
| stats count values(eventName) min(_time) as firstTime max(_time) as lastTime
BY eventSource aws_account_id errorCode
user_agent eventID awsRegion
userIdentity.principalId user_arn new_login_profile
src_ip dest vendor_account
vendor_region vendor_product
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`]
| rename user_arn as user
| `aws_createloginprofile_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
- While this search has no known false positives, it is possible that an AWS admin has legitimately created a login profile for another user.
Analyst notes
Known false positives: While this search has no known false positives, it is possible that an AWS admin has legitimately created a login profile for another user.