Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

GCP IAM - Service Account Keys Enumeration

Back
Id7ad3cfed-18c0-44af-9e9d-9fb5472a2321
RulenameGCP IAM - Service Account Keys Enumeration
DescriptionDetects possible service account keys enumeration.
SeverityLow
TacticsDiscovery
TechniquesT1069
Required data connectorsGCPIAMDataConnector
KindScheduled
Query frequency12h
Query period12h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformIAM/Analytic Rules/GCPIAMServiceAccountKeysEnumeration.yaml
Version1.0.0
Arm template7ad3cfed-18c0-44af-9e9d-9fb5472a2321.json
Deploy To Azure
let threshold = 5;
GCP_IAM
| where PayloadMethodname =~ 'google.iam.admin.v1.ListServiceAccountsKeys'
| summarize count() by PayloadAuthenticationinfoPrincipalemail, bin(TimeGenerated, 1h)
| where count_ > threshold
| extend AccountCustomEntity = PayloadAuthenticationinfoPrincipalemail
kind: Scheduled
queryPeriod: 12h
description: |
    'Detects possible service account keys enumeration.'
tactics:
- Discovery
id: 7ad3cfed-18c0-44af-9e9d-9fb5472a2321
requiredDataConnectors:
- connectorId: GCPIAMDataConnector
  dataTypes:
  - GCP_IAM
relevantTechniques:
- T1069
severity: Low
version: 1.0.0
status: Available
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: FullName
    columnName: AccountCustomEntity
name: GCP IAM - Service Account Keys Enumeration
triggerOperator: gt
query: |
  let threshold = 5;
  GCP_IAM
  | where PayloadMethodname =~ 'google.iam.admin.v1.ListServiceAccountsKeys'
  | summarize count() by PayloadAuthenticationinfoPrincipalemail, bin(TimeGenerated, 1h)
  | where count_ > threshold
  | extend AccountCustomEntity = PayloadAuthenticationinfoPrincipalemail  
queryFrequency: 12h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformIAM/Analytic Rules/GCPIAMServiceAccountKeysEnumeration.yaml
triggerThreshold: 0
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/7ad3cfed-18c0-44af-9e9d-9fb5472a2321')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/7ad3cfed-18c0-44af-9e9d-9fb5472a2321')]",
      "properties": {
        "alertRuleTemplateName": "7ad3cfed-18c0-44af-9e9d-9fb5472a2321",
        "customDetails": null,
        "description": "'Detects possible service account keys enumeration.'\n",
        "displayName": "GCP IAM - Service Account Keys Enumeration",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "FullName"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformIAM/Analytic Rules/GCPIAMServiceAccountKeysEnumeration.yaml",
        "query": "let threshold = 5;\nGCP_IAM\n| where PayloadMethodname =~ 'google.iam.admin.v1.ListServiceAccountsKeys'\n| summarize count() by PayloadAuthenticationinfoPrincipalemail, bin(TimeGenerated, 1h)\n| where count_ > threshold\n| extend AccountCustomEntity = PayloadAuthenticationinfoPrincipalemail\n",
        "queryFrequency": "PT12H",
        "queryPeriod": "PT12H",
        "severity": "Low",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Discovery"
        ],
        "techniques": [
          "T1069"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}