From 99e073c951453f41e294eea38610d35b16a4c55b Mon Sep 17 00:00:00 2001 From: P4T12ICK Date: Thu, 22 Jun 2023 16:32:20 +0200 Subject: [PATCH 1/4] Improve description --- detections/cloud/asl_aws_createaccesskey.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/detections/cloud/asl_aws_createaccesskey.yml b/detections/cloud/asl_aws_createaccesskey.yml index b735fa3f8b..6662de2633 100644 --- a/detections/cloud/asl_aws_createaccesskey.yml +++ b/detections/cloud/asl_aws_createaccesskey.yml @@ -5,10 +5,16 @@ date: '2022-05-23' author: Patrick Bareiss, Splunk status: experimental type: Hunting -description: This search looks for AWS CloudTrail events where a user A who has already - permission to create access keys, makes an API call to create access keys for another - user B. Attackers have been know to use this technique for Privilege Escalation - in case new victim(user B) has more permissions than old victim(user B) +description: This detection rule monitors for the creation of AWS Identity and Access Management (IAM) access keys. + An IAM access key consists of an access key ID and secret access key, which are used to sign programmatic requests to AWS services. + While IAM access keys can be legitimately used by developers and administrators for API access, their creation can also be indicative + of malicious activity. Attackers who have gained unauthorized access to an AWS environment might create access keys as a means to + establish persistence or to exfiltrate data through the APIs. Moreover, because access keys can be used to authenticate with AWS + services without the need for further interaction, they can be particularly appealing for bad actors looking to operate under the radar. + Consequently, it's important to vigilantly monitor and scrutinize access key creation events, especially if they are associated with + unusual activity or are created by users who don't typically perform these actions. This hunting query while identify when a user A + creates a IAM access key for a user B which can be a sign for malicious activity. Hunting queries are designed to be executed + manual during threat hunting. data_source: [] search: '`amazon_security_lake` api.operation=CreateAccessKey http_request.user_agent!=console.amazonaws.com api.response.error=null | rename unmapped{}.key as unmapped_key , unmapped{}.value as unmapped_value From 5ad9ac276e1c5a445938fae18cfd816e8066552d Mon Sep 17 00:00:00 2001 From: P4T12ICK Date: Thu, 22 Jun 2023 16:34:18 +0200 Subject: [PATCH 2/4] Improve description --- detections/cloud/aws_createaccesskey.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/detections/cloud/aws_createaccesskey.yml b/detections/cloud/aws_createaccesskey.yml index 3dd9b86c77..e263a6f6da 100644 --- a/detections/cloud/aws_createaccesskey.yml +++ b/detections/cloud/aws_createaccesskey.yml @@ -5,10 +5,16 @@ date: '2022-03-03' author: Bhavin Patel, Splunk status: production type: Hunting -description: This search looks for AWS CloudTrail events where a user A who has already - permission to create access keys, makes an API call to create access keys for another - user B. Attackers have been know to use this technique for Privilege Escalation - in case new victim(user B) has more permissions than old victim(user B) +description: This detection rule monitors for the creation of AWS Identity and Access Management (IAM) access keys. + An IAM access key consists of an access key ID and secret access key, which are used to sign programmatic requests to AWS services. + While IAM access keys can be legitimately used by developers and administrators for API access, their creation can also be indicative + of malicious activity. Attackers who have gained unauthorized access to an AWS environment might create access keys as a means to + establish persistence or to exfiltrate data through the APIs. Moreover, because access keys can be used to authenticate with AWS + services without the need for further interaction, they can be particularly appealing for bad actors looking to operate under the radar. + Consequently, it's important to vigilantly monitor and scrutinize access key creation events, especially if they are associated with + unusual activity or are created by users who don't typically perform these actions. This hunting query while identify when a user A + creates a IAM access key for a user B which can be a sign for malicious activity. Hunting queries are designed to be executed + manual during threat hunting. data_source: [] search: '`cloudtrail` eventName = CreateAccessKey userAgent !=console.amazonaws.com errorCode = success | eval match=if(match(userIdentity.userName,requestParameters.userName),1,0) From 2daaf1e7c0ae2f6261188268dd1baadd250b805a Mon Sep 17 00:00:00 2001 From: Bhavin Patel Date: Thu, 22 Jun 2023 14:38:03 -0700 Subject: [PATCH 3/4] Update asl_aws_createaccesskey.yml --- detections/cloud/asl_aws_createaccesskey.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/detections/cloud/asl_aws_createaccesskey.yml b/detections/cloud/asl_aws_createaccesskey.yml index 6662de2633..acdb12b90f 100644 --- a/detections/cloud/asl_aws_createaccesskey.yml +++ b/detections/cloud/asl_aws_createaccesskey.yml @@ -12,8 +12,8 @@ description: This detection rule monitors for the creation of AWS Identity and A establish persistence or to exfiltrate data through the APIs. Moreover, because access keys can be used to authenticate with AWS services without the need for further interaction, they can be particularly appealing for bad actors looking to operate under the radar. Consequently, it's important to vigilantly monitor and scrutinize access key creation events, especially if they are associated with - unusual activity or are created by users who don't typically perform these actions. This hunting query while identify when a user A - creates a IAM access key for a user B which can be a sign for malicious activity. Hunting queries are designed to be executed + unusual activity or are created by users who don't typically perform these actions. This hunting query identifies when a potentially compromised user + creates a IAM access key for another user who may have higher privilleges, which can be a sign for privilege escalation. Hunting queries are designed to be executed manual during threat hunting. data_source: [] search: '`amazon_security_lake` api.operation=CreateAccessKey http_request.user_agent!=console.amazonaws.com api.response.error=null From a6ed42aef448dadda28b4a90cc6090da1eee9189 Mon Sep 17 00:00:00 2001 From: Bhavin Patel Date: Thu, 22 Jun 2023 14:38:19 -0700 Subject: [PATCH 4/4] Update aws_createaccesskey.yml --- detections/cloud/aws_createaccesskey.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/detections/cloud/aws_createaccesskey.yml b/detections/cloud/aws_createaccesskey.yml index e263a6f6da..1181ecea20 100644 --- a/detections/cloud/aws_createaccesskey.yml +++ b/detections/cloud/aws_createaccesskey.yml @@ -5,15 +5,15 @@ date: '2022-03-03' author: Bhavin Patel, Splunk status: production type: Hunting -description: This detection rule monitors for the creation of AWS Identity and Access Management (IAM) access keys. +This detection rule monitors for the creation of AWS Identity and Access Management (IAM) access keys. An IAM access key consists of an access key ID and secret access key, which are used to sign programmatic requests to AWS services. While IAM access keys can be legitimately used by developers and administrators for API access, their creation can also be indicative of malicious activity. Attackers who have gained unauthorized access to an AWS environment might create access keys as a means to establish persistence or to exfiltrate data through the APIs. Moreover, because access keys can be used to authenticate with AWS services without the need for further interaction, they can be particularly appealing for bad actors looking to operate under the radar. Consequently, it's important to vigilantly monitor and scrutinize access key creation events, especially if they are associated with - unusual activity or are created by users who don't typically perform these actions. This hunting query while identify when a user A - creates a IAM access key for a user B which can be a sign for malicious activity. Hunting queries are designed to be executed + unusual activity or are created by users who don't typically perform these actions. This hunting query identifies when a potentially compromised user + creates a IAM access key for another user who may have higher privilleges, which can be a sign for privilege escalation. Hunting queries are designed to be executed manual during threat hunting. data_source: [] search: '`cloudtrail` eventName = CreateAccessKey userAgent !=console.amazonaws.com