From 56fc99f152e471bb593fdcc4b5afdc67a48a0e9d Mon Sep 17 00:00:00 2001 From: Brent Murphy <56412096+bm11100@users.noreply.github.com> Date: Thu, 24 Sep 2020 10:15:15 -0400 Subject: [PATCH] [New Rule] GCP IAM Service Account Key Deletion (#309) * Create credential_access_gcp_iam_service_account_key_deletion.toml * remove extra word in fp info * linting --- ..._gcp_iam_service_account_key_deletion.toml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 rules/gcp/credential_access_gcp_iam_service_account_key_deletion.toml diff --git a/rules/gcp/credential_access_gcp_iam_service_account_key_deletion.toml b/rules/gcp/credential_access_gcp_iam_service_account_key_deletion.toml new file mode 100644 index 000000000..a46723910 --- /dev/null +++ b/rules/gcp/credential_access_gcp_iam_service_account_key_deletion.toml @@ -0,0 +1,54 @@ +[metadata] +creation_date = "2020/09/21" +ecs_version = ["1.6.0"] +maturity = "production" +updated_date = "2020/09/21" + +[rule] +author = ["Elastic"] +description = """ +Identifies the deletion of an Identity and Access Management (IAM) service account key in Google Cloud Platform (GCP). +Each service account is associated with two sets of public/private RSA key pairs that are used to authenticate. If a key +is deleted, the application will no longer be able to access Google Cloud resources using that key. A security best +practice is to rotate your service account keys regularly. +""" +false_positives = [ + """ + Service account key deletions may be done by a system or network administrator. Verify whether the user email, + resource name, and/or hostname should be making changes in your environment. Key deletions from unfamiliar users or + hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule. + """, +] +index = ["filebeat-*"] +language = "kuery" +license = "Elastic License" +name = "GCP IAM Service Account Key Deletion" +note = "The GCP Filebeat module must be enabled to use this rule." +references = [ + "https://cloud.google.com/iam/docs/service-accounts", + "https://cloud.google.com/iam/docs/creating-managing-service-account-keys", +] +risk_score = 21 +rule_id = "9890ee61-d061-403d-9bf6-64934c51f638" +severity = "low" +tags = ["Elastic", "GCP", "Continuous Monitoring", "SecOps", "Identity and Access"] +type = "query" + +query = ''' +event.module:googlecloud and event.dataset:googlecloud.audit and event.action:google.iam.admin.v*.DeleteServiceAccountKey and event.outcome:success +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1098" +name = "Account Manipulation" +reference = "https://attack.mitre.org/techniques/T1098/" + + +[rule.threat.tactic] +id = "TA0006" +name = "Credential Access" +reference = "https://attack.mitre.org/tactics/TA0006/" +