Skip to content

Commit 4f2d064

Browse files
authored
Branch was auto-updated.
2 parents 55deed2 + c3689f0 commit 4f2d064

29 files changed

+1054
-98
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: ASL AWS CloudTrail
2+
id: 1dcf9cfb-0e91-44c6-81b3-61b2574ec898
3+
version: 1
4+
date: '2025-01-14'
5+
author: Patrick Bareiss, Splunk
6+
description: Data source object for ASL AWS CloudTrail
7+
source: aws_asl
8+
sourcetype: aws:asl
9+
separator: api.operation
10+
supported_TA:
11+
- name: Splunk Add-on for AWS
12+
url: https://splunkbase.splunk.com/app/1876
13+
version: 7.9.0

detections/cloud/asl_aws_concurrent_sessions_from_different_ips.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
name: ASL AWS Concurrent Sessions From Different Ips
22
id: b3424bbe-3204-4469-887b-ec144483a336
3-
version: 5
3+
version: 6
44
date: '2024-09-30'
55
author: Patrick Bareiss, Splunk
66
status: production
77
type: Anomaly
88
description: The following analytic identifies an AWS IAM account with concurrent sessions originating from more than one unique IP address within a 5-minute span. This detection leverages AWS CloudTrail logs, specifically the `DescribeEventAggregates` API call, to identify multiple IP addresses associated with the same user session. This behavior 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 activity could allow unauthorized access to sensitive corporate resources, leading to potential data breaches or further exploitation.
9-
data_source: []
10-
search: '`amazon_security_lake` api.operation=DescribeEventAggregates src_endpoint.domain!="AWS Internal" | bin span=5m _time | stats values(src_endpoint.ip) as src_ip dc(src_endpoint.ip) as distinct_ip_count by _time identity.user.credential_uid identity.user.name | where distinct_ip_count > 1 | rename identity.user.name as user | `asl_aws_concurrent_sessions_from_different_ips_filter`'
9+
data_source:
10+
- ASL AWS CloudTrail
11+
search: '`amazon_security_lake` api.operation=DescribeEventAggregates src_endpoint.domain!="AWS Internal" | bin span=5m _time | stats values(src_endpoint.ip) as src_ip dc(src_endpoint.ip) as distinct_ip_count by _time actor.user.uid | where distinct_ip_count > 1 | rename actor.user.uid as user | `asl_aws_concurrent_sessions_from_different_ips_filter`'
1112
how_to_implement: The detection is based on Amazon Security Lake events from Amazon Web Services (AWS), which is a centralized data lake that provides security-related data from AWS services. To use this detection, you must ingest CloudTrail logs from Amazon Security Lake into Splunk. To run this search, ensure that you ingest events using the latest version of Splunk Add-on for Amazon Web Services (https://splunkbase.splunk.com/app/1876) or the Federated Analytics App.
1213
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.
1314
references:
@@ -42,25 +43,23 @@ tags:
4243
type: User
4344
role:
4445
- Victim
45-
product:
46-
- Splunk Enterprise
47-
- Splunk Enterprise Security
48-
- Splunk Cloud
4946
required_fields:
5047
- api.operation
51-
- actor.user.account_uid
52-
- actor.user.name
5348
- actor.user.uid
5449
- http_request.user_agent
5550
- src_endpoint.ip
5651
- src_endpoint.domain
5752
- cloud.region
53+
product:
54+
- Splunk Enterprise
55+
- Splunk Enterprise Security
56+
- Splunk Cloud
5857
risk_score: 42
5958
security_domain: threat
6059
manual_test: Can't be tested automatically because of time span.
6160
tests:
6261
- name: True Positive Test
6362
attack_data:
6463
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1185/aws_concurrent_sessions_from_different_ips/asl_ocsf_cloudtrail.json
65-
sourcetype: aws:cloudtrail:lake
64+
sourcetype: aws:asl
6665
source: aws_asl
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: ASL AWS Create Access Key
2+
id: 81a9f2fe-1697-473c-af1d-086b0d8b63c8
3+
version: 1
4+
date: '2024-12-12'
5+
author: Patrick Bareiss, Splunk
6+
status: production
7+
type: Hunting
8+
description: The following analytic identifies the creation of AWS IAM access keys by a user for another user, which can indicate privilege escalation. It leverages AWS CloudTrail logs to detect instances where the user creating the access key is different from the user for whom the key is created. This activity is significant because unauthorized access key creation can allow attackers to establish persistence or exfiltrate data via AWS APIs. If confirmed malicious, this could lead to unauthorized access to AWS services, data exfiltration, and long-term persistence in the environment.
9+
data_source:
10+
- ASL AWS CloudTrail
11+
search: '`amazon_security_lake` api.operation=CreateAccessKey | fillnull | stats count min(_time) as firstTime max(_time) as lastTime by api.operation actor.user.uid actor.user.account.uid http_request.user_agent src_endpoint.ip cloud.region | rename actor.user.uid as user, src_endpoint.ip as src_ip, cloud.region as region, http_request.user_agent as user_agent | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` |`asl_aws_create_access_key_filter`'
12+
how_to_implement: The detection is based on Amazon Security Lake events from Amazon Web Services (AWS), which is a centralized data lake that provides security-related data from AWS services. To use this detection, you must ingest CloudTrail logs from Amazon Security Lake into Splunk. To run this search, ensure that you ingest events using the latest version of Splunk Add-on for Amazon Web Services (https://splunkbase.splunk.com/app/1876) or the Federated Analytics App.
13+
known_false_positives: While this search has no known false positives, it is possible that an AWS admin has legitimately created keys for another user.
14+
references:
15+
- https://bishopfox.com/blog/privilege-escalation-in-aws
16+
- https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation-part-2/
17+
tags:
18+
analytic_story:
19+
- AWS IAM Privilege Escalation
20+
asset_type: AWS Account
21+
confidence: 90
22+
impact: 70
23+
message: User $user$ is attempting to create access keys
24+
mitre_attack_id:
25+
- T1136.003
26+
- T1136
27+
observable:
28+
- name: src_ip
29+
type: IP Address
30+
role:
31+
- Attacker
32+
- name: user
33+
type: User
34+
role:
35+
- Victim
36+
product:
37+
- Splunk Enterprise
38+
- Splunk Enterprise Security
39+
- Splunk Cloud
40+
required_fields:
41+
- api.operation
42+
- actor.user.uid
43+
- actor.user.account.uid
44+
- http_request.user_agent
45+
- src_endpoint.ip
46+
- src_endpoint.domain
47+
- cloud.region
48+
risk_score: 63
49+
security_domain: network
50+
tests:
51+
- name: True Positive Test
52+
attack_data:
53+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/aws_createaccesskey/asl_ocsf_cloudtrail.json
54+
sourcetype: aws:asl
55+
source: aws_asl
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: ASL AWS Create Policy Version to allow all resources
2+
id: 22cc7a62-3884-48c4-82da-592b8199b72f
3+
version: 1
4+
date: '2024-12-12'
5+
author: Patrick Bareiss, Splunk
6+
status: production
7+
type: TTP
8+
description: The following analytic identifies the creation of a new AWS IAM policy version that allows access to all resources. It detects this activity by analyzing AWS CloudTrail logs for the CreatePolicyVersion event with a policy document that grants broad permissions. This behavior is significant because it violates the principle of least privilege, potentially exposing the environment to misuse or abuse. If confirmed malicious, an attacker could gain extensive access to AWS resources, leading to unauthorized actions, data exfiltration, or further compromise of the AWS environment.
9+
data_source:
10+
- ASL AWS CloudTrail
11+
search: '`amazon_security_lake` api.operation=CreatePolicy | spath input=api.request.data | spath input=policyDocument | regex Statement{}.Action="\*" | regex Statement{}.Resource="\*" | fillnull | stats count min(_time) as firstTime max(_time) as lastTime by api.operation actor.user.uid actor.user.account.uid http_request.user_agent src_endpoint.ip cloud.region api.request.data | rename actor.user.uid as user, src_endpoint.ip as src_ip, cloud.region as region, http_request.user_agent as user_agent | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`|`asl_aws_create_policy_version_to_allow_all_resources_filter`'
12+
how_to_implement: The detection is based on Amazon Security Lake events from Amazon Web Services (AWS), which is a centralized data lake that provides security-related data from AWS services. To use this detection, you must ingest CloudTrail logs from Amazon Security Lake into Splunk. To run this search, ensure that you ingest events using the latest version of Splunk Add-on for Amazon Web Services (https://splunkbase.splunk.com/app/1876) or the Federated Analytics App.
13+
known_false_positives: While this search has no known false positives, it is possible that an AWS admin has legitimately created a policy to allow a user to access all resources. That said, AWS strongly advises against granting full control to all AWS resources and you must verify this activity.
14+
references:
15+
- https://bishopfox.com/blog/privilege-escalation-in-aws
16+
- https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation-part-2/
17+
drilldown_searches:
18+
- name: View the detection results for - "$user$"
19+
search: '%original_detection_search% | search user = "$user$"'
20+
earliest_offset: $info_min_time$
21+
latest_offset: $info_max_time$
22+
- name: View risk events for the last 7 days for - "$user$"
23+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
24+
earliest_offset: $info_min_time$
25+
latest_offset: $info_max_time$
26+
tags:
27+
analytic_story:
28+
- AWS IAM Privilege Escalation
29+
asset_type: AWS Account
30+
confidence: 70
31+
impact: 70
32+
message: User $user$ created a policy version that allows them to access any resource in their account.
33+
mitre_attack_id:
34+
- T1078.004
35+
- T1078
36+
observable:
37+
- name: user
38+
type: User
39+
role:
40+
- Victim
41+
product:
42+
- Splunk Enterprise
43+
- Splunk Enterprise Security
44+
- Splunk Cloud
45+
required_fields:
46+
- api.operation
47+
- actor.user.account.uid
48+
- api.request.data
49+
- actor.user.uid
50+
- http_request.user_agent
51+
- src_endpoint.ip
52+
- src_endpoint.domain
53+
- cloud.region
54+
risk_score: 49
55+
security_domain: network
56+
tests:
57+
- name: True Positive Test
58+
attack_data:
59+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/aws_create_policy_version/asl_ocsf_cloudtrail.json
60+
sourcetype: aws:asl
61+
source: aws_asl
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: ASL AWS Credential Access GetPasswordData
2+
id: a79b607a-50cc-4704-bb9d-eff280cb78c2
3+
version: 1
4+
date: '2024-12-12'
5+
author: Patrick Bareiss, Splunk
6+
status: production
7+
type: Anomaly
8+
description: The following analytic identifiesGetPasswordData API calls in your AWS account. It leverages CloudTrail logs from Amazon Security Lake to detect this activity by counting the distinct instance IDs accessed. This behavior is significant as it may indicate an attempt to retrieve encrypted administrator passwords for running Windows instances, which is a critical security concern. If confirmed malicious, attackers could gain unauthorized access to administrative credentials, potentially leading to full control over the affected instances and further compromise of the AWS environment.
9+
data_source:
10+
- ASL AWS CloudTrail
11+
search: '`amazon_security_lake` api.operation=GetPasswordData | spath input=api.request.data | fillnull | stats count min(_time) as firstTime max(_time) as lastTime by api.operation actor.user.uid actor.user.account.uid http_request.user_agent src_endpoint.ip cloud.region instanceId | rename actor.user.uid as user, src_endpoint.ip as src_ip, cloud.region as region, http_request.user_agent as user_agent | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` |`asl_aws_credential_access_getpassworddata_filter`'
12+
how_to_implement: The detection is based on Amazon Security Lake events from Amazon Web Services (AWS), which is a centralized data lake that provides security-related data from AWS services. To use this detection, you must ingest CloudTrail logs from Amazon Security Lake into Splunk. To run this search, ensure that you ingest events using the latest version of Splunk Add-on for Amazon Web Services (https://splunkbase.splunk.com/app/1876) or the Federated Analytics App.
13+
known_false_positives: Administrator tooling or automated scripts may make these calls but it is highly unlikely to make several calls in a short period of time.
14+
references:
15+
- https://attack.mitre.org/techniques/T1552/
16+
- https://stratus-red-team.cloud/attack-techniques/AWS/aws.credential-access.ec2-get-password-data/
17+
drilldown_searches:
18+
- name: View the detection results for - "$user$"
19+
search: '%original_detection_search% | search user_arn = "$user$"'
20+
earliest_offset: $info_min_time$
21+
latest_offset: $info_max_time$
22+
- name: View risk events for the last 7 days for - "$user$"
23+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
24+
earliest_offset: $info_min_time$
25+
latest_offset: $info_max_time$
26+
tags:
27+
analytic_story:
28+
- AWS Identity and Access Management Account Takeover
29+
asset_type: AWS Account
30+
confidence: 70
31+
impact: 70
32+
message: User $user$ is seen to make `GetPasswordData` API calls
33+
mitre_attack_id:
34+
- T1586
35+
- T1586.003
36+
- T1110
37+
- T1110.001
38+
observable:
39+
- name: src_ip
40+
type: IP Address
41+
role:
42+
- Attacker
43+
- name: user
44+
type: User
45+
role:
46+
- Victim
47+
product:
48+
- Splunk Enterprise
49+
- Splunk Enterprise Security
50+
- Splunk Cloud
51+
required_fields:
52+
- api.operation
53+
- actor.user.uid
54+
- actor.user.account.uid
55+
- http_request.user_agent
56+
- src_endpoint.ip
57+
- src_endpoint.domain
58+
- cloud.region
59+
risk_score: 49
60+
security_domain: threat
61+
tests:
62+
- name: True Positive Test
63+
attack_data:
64+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1552/aws_getpassworddata/asl_ocsf_cloudtrail.json
65+
sourcetype: aws:asl
66+
source: aws_asl
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: ASL AWS Credential Access RDS Password reset
2+
id: d15e9bd9-ef64-4d84-bc04-f62955a9fee8
3+
version: 1
4+
date: '2024-12-12'
5+
author: Patrick Bareiss, Splunk
6+
status: production
7+
type: TTP
8+
description: The following analytic detects the resetting of the master user password for an Amazon RDS DB instance. It leverages AWS CloudTrail logs from Amazon Security Lake to identify events where the `ModifyDBInstance` API call includes a new `masterUserPassword` parameter. This activity is significant because unauthorized password resets can grant attackers access to sensitive data stored in production databases, such as credit card information, PII, and healthcare data. If confirmed malicious, this could lead to data breaches, regulatory non-compliance, and significant reputational damage. Immediate investigation is required to determine the legitimacy of the password reset.
9+
data_source:
10+
- ASL AWS CloudTrail
11+
search: '`amazon_security_lake` api.operation=ModifyDBInstance OR api.operation=ModifyDBCluster | spath input=api.request.data | search masterUserPassword=* | fillnull | stats count min(_time) as firstTime max(_time) as lastTime by api.operation actor.user.uid actor.user.account.uid http_request.user_agent src_endpoint.ip cloud.region api.request.data | rename actor.user.uid as user, src_endpoint.ip as src_ip, cloud.region as region, http_request.user_agent as user_agent | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` |`asl_aws_credential_access_rds_password_reset_filter`'
12+
how_to_implement: The detection is based on Amazon Security Lake events from Amazon Web Services (AWS), which is a centralized data lake that provides security-related data from AWS services. To use this detection, you must ingest CloudTrail logs from Amazon Security Lake into Splunk. To run this search, ensure that you ingest events using the latest version of Splunk Add-on for Amazon Web Services (https://splunkbase.splunk.com/app/1876) or the Federated Analytics App.
13+
known_false_positives: Users may genuinely reset the RDS password.
14+
references:
15+
- https://aws.amazon.com/premiumsupport/knowledge-center/reset-master-user-password-rds
16+
drilldown_searches:
17+
- name: View the detection results for - "$user$"
18+
search: '%original_detection_search% | search database_id = "$user$"'
19+
earliest_offset: $info_min_time$
20+
latest_offset: $info_max_time$
21+
- name: View risk events for the last 7 days for - "$user$"
22+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
23+
earliest_offset: $info_min_time$
24+
latest_offset: $info_max_time$
25+
tags:
26+
analytic_story:
27+
- AWS Identity and Access Management Account Takeover
28+
asset_type: AWS Account
29+
confidence: 70
30+
impact: 70
31+
message: User $user$ is seen to reset the password for database
32+
mitre_attack_id:
33+
- T1586
34+
- T1586.003
35+
- T1110
36+
observable:
37+
- name: user
38+
type: User
39+
role:
40+
- Victim
41+
- name: src_ip
42+
type: IP Address
43+
role:
44+
- Attacker
45+
product:
46+
- Splunk Enterprise
47+
- Splunk Enterprise Security
48+
- Splunk Cloud
49+
required_fields:
50+
- api.operation
51+
- api.request.data
52+
- actor.user.uid
53+
- actor.user.account.uid
54+
- http_request.user_agent
55+
- src_endpoint.ip
56+
- src_endpoint.domain
57+
- cloud.region
58+
risk_score: 49
59+
security_domain: threat
60+
tests:
61+
- name: True Positive Test
62+
attack_data:
63+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.002/aws_rds_password_reset/asl_ocsf_cloudtrail.json
64+
sourcetype: aws:asl
65+
source: aws_asl

0 commit comments

Comments
 (0)