Skip to content

Commit 1d086b4

Browse files
authored
Merge branch 'rba_migration' into strict_yml_from_rba
2 parents 05f7a6e + 9c5b3aa commit 1d086b4

File tree

39 files changed

+1719
-346
lines changed

39 files changed

+1719
-346
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
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Azure Monitor Activity
2+
id: 1997a515-a61a-4f78-ada9-54af34c764f2
3+
version: 1
4+
date: '2025-01-13'
5+
author: Bhavin Patel, Splunk
6+
description: Data source object for Azure Monitor Activity. The Splunk Add-on for Microsoft Cloud Services add-on is required to ingest In-Tune audit logs via Azure EventHub. To configure this logging, visit Intune > Tenant administration > Diagnostic settings > Add diagnostic settings & send events to the activity audit event hub.
7+
source: Azure AD
8+
sourcetype: azure:monitor:activity
9+
separator: operationName
10+
supported_TA:
11+
- name: Splunk Add-on for Microsoft Cloud Services
12+
url: https://splunkbase.splunk.com/app/3110
13+
version: 5.4.1
14+
fields:
15+
- column
16+
- action
17+
- category
18+
- change_type
19+
- command
20+
- correlationId
21+
- dataset_name
22+
- date_hour
23+
- date_mday
24+
- date_minute
25+
- date_month
26+
- date_second
27+
- date_wday
28+
- date_year
29+
- date_zone
30+
- dest
31+
- dvc
32+
- eventtype
33+
- host
34+
- identity
35+
- image_id
36+
- index
37+
- instance_type
38+
- linecount
39+
- object
40+
- object_attrs
41+
- object_category
42+
- object_id
43+
- object_path
44+
- operationName
45+
- properties.ActivityDate
46+
- properties.ActivityResultStatus
47+
- properties.ActivityType
48+
- properties.Actor.ActorType
49+
- properties.Actor.Application
50+
- properties.Actor.ApplicationName
51+
- properties.Actor.IsDelegatedAdmin
52+
- properties.Actor.Name
53+
- properties.Actor.ObjectId
54+
- properties.Actor.PartnerTenantId
55+
- properties.Actor.UPN
56+
- properties.Actor.UserPermissions{}
57+
- properties.AdditionalDetails
58+
- properties.AuditEventId
59+
- properties.Category
60+
- properties.RelationId
61+
- properties.TargetDisplayNames{}
62+
- properties.TargetObjectIds{}
63+
- properties.Targets{}.ModifiedProperties{}.Name
64+
- properties.Targets{}.ModifiedProperties{}.New
65+
- properties.Targets{}.ModifiedProperties{}.Old
66+
- properties.Targets{}.Name
67+
- punct
68+
- resourceId
69+
- resource_provider
70+
- response_body
71+
- result
72+
- resultDescription
73+
- resultType
74+
- result_id
75+
- source
76+
- sourcetype
77+
- splunk_server
78+
- splunk_server_group
79+
- src
80+
- status
81+
- tag
82+
- tag::action
83+
- tag::eventtype
84+
- tag::object_category
85+
- tenantId
86+
- time
87+
- timeendpos
88+
- timestartpos
89+
- user
90+
- user_name
91+
- user_type
92+
- vendor_account
93+
- vendor_product
94+
- vendor_region
95+
- _time
96+
example_log: '{"time": "2024-04-29T13:30:28.8622000Z", "tenantId": "26db52ee-c1b5-4c96-a0d4-129e25dc0388", "category": "AuditLogs", "operationName": "createDeviceHealthScript DeviceHealthScript", "properties": {"ActivityDate": "4/29/2024 1:30:28 PM", "ActivityResultStatus": 1, "ActivityType": 0, "Actor": {"ActorType": 1, "Application": "5926fc8e-304e-4f59-8bed-58ca97cc39a4", "ApplicationName": "Microsoft Intune portal extension", "IsDelegatedAdmin": false, "Name": null, "ObjectId": "cf2ef473-7d3b-4f14-961c-2e470e9a70f2", "PartnerTenantId": "00000000-0000-0000-0000-000000000000", "UserPermissions": ["*"], "UPN": "[email protected]"}, "AdditionalDetails": "", "AuditEventId": "3e7e790e-f15a-4c2c-a91a-516483bb4e37", "Category": 3, "RelationId": null, "TargetDisplayNames": ["<null>"], "TargetObjectIds": ["b16fcad4-b9f5-46fe-9bf0-841cd9be7bc9"], "Targets": [{"ModifiedProperties": [{"Name": "DeviceManagementAPIVersion", "Old": null, "New": "5024-02-13"}], "Name": null}]}, "resultType": "Success", "resultDescription": "None", "correlationId": "949ac544-b4e5-4576-a117-915c47c0ee00", "identity": "[email protected]"}'

detections/cloud/asl_aws_concurrent_sessions_from_different_ips.yml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,12 @@ date: '2024-11-14'
55
author: Patrick Bareiss, Splunk
66
status: production
77
type: Anomaly
8-
description: The following analytic identifies an AWS IAM account with concurrent
9-
sessions originating from more than one unique IP address within a 5-minute span.
10-
This detection leverages AWS CloudTrail logs, specifically the `DescribeEventAggregates`
11-
API call, to identify multiple IP addresses associated with the same user session.
12-
This behavior is significant as it may indicate a session hijacking attack, where
13-
an adversary uses stolen session cookies to access AWS resources from a different
14-
location. If confirmed malicious, this activity could allow unauthorized access
15-
to sensitive corporate resources, leading to potential data breaches or further
16-
exploitation.
17-
data_source: []
18-
search: '`amazon_security_lake` api.operation=DescribeEventAggregates src_endpoint.domain!="AWS
19-
Internal" | bin span=5m _time | stats values(src_endpoint.ip) as src_ip dc(src_endpoint.ip)
20-
as distinct_ip_count by _time identity.user.credential_uid identity.user.name |
21-
where distinct_ip_count > 1 | rename identity.user.name as user | `asl_aws_concurrent_sessions_from_different_ips_filter`'
22-
how_to_implement: The detection is based on Amazon Security Lake events from Amazon
23-
Web Services (AWS), which is a centralized data lake that provides security-related
24-
data from AWS services. To use this detection, you must ingest CloudTrail logs from
25-
Amazon Security Lake into Splunk. To run this search, ensure that you ingest events
26-
using the latest version of Splunk Add-on for Amazon Web Services (https://splunkbase.splunk.com/app/1876)
27-
or the Federated Analytics App.
28-
known_false_positives: A user with concurrent sessions from different Ips may also
29-
represent the legitimate use of more than one device. Filter as needed and/or customize
30-
the threshold to fit your environment.
8+
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+
- 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`'
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: 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.
3114
references:
3215
- https://attack.mitre.org/techniques/T1185/
3316
- https://breakdev.org/evilginx-2-next-generation-of-phishing-2fa-tokens/
@@ -72,7 +55,6 @@ tags:
7255
tests:
7356
- name: True Positive Test
7457
attack_data:
75-
- data:
76-
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1185/aws_concurrent_sessions_from_different_ips/asl_ocsf_cloudtrail.json
77-
sourcetype: aws:cloudtrail:lake
58+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1185/aws_concurrent_sessions_from_different_ips/asl_ocsf_cloudtrail.json
59+
sourcetype: aws:asl
7860
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

0 commit comments

Comments
 (0)