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 Enumeration

Back
Id50e0437e-912d-4cd0-ac19-fef0aebdd3d7
RulenameGCP IAM - Service Account Enumeration
DescriptionDetects possible service account enumeration.
SeverityLow
TacticsDiscovery
TechniquesT1087
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/GCPIAMServiceAccountEnumeration.yaml
Version1.0.0
Arm template50e0437e-912d-4cd0-ac19-fef0aebdd3d7.json
Deploy To Azure
let threshold = 5;
GCP_IAM
| where PayloadMethodname =~ 'google.iam.admin.v1.ListServiceAccounts'
| summarize count() by PayloadAuthenticationinfoPrincipalemail, bin(TimeGenerated, 1h)
| where count_ > threshold
| extend AccountCustomEntity = PayloadAuthenticationinfoPrincipalemail
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: FullName
    columnName: AccountCustomEntity
queryFrequency: 12h
name: GCP IAM - Service Account Enumeration
kind: Scheduled
tactics:
- Discovery
triggerThreshold: 0
query: |
  let threshold = 5;
  GCP_IAM
  | where PayloadMethodname =~ 'google.iam.admin.v1.ListServiceAccounts'
  | summarize count() by PayloadAuthenticationinfoPrincipalemail, bin(TimeGenerated, 1h)
  | where count_ > threshold
  | extend AccountCustomEntity = PayloadAuthenticationinfoPrincipalemail  
relevantTechniques:
- T1087
triggerOperator: gt
queryPeriod: 12h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformIAM/Analytic Rules/GCPIAMServiceAccountEnumeration.yaml
severity: Low
status: Available
id: 50e0437e-912d-4cd0-ac19-fef0aebdd3d7
requiredDataConnectors:
- connectorId: GCPIAMDataConnector
  dataTypes:
  - GCP_IAM
version: 1.0.0
description: |
    'Detects possible service account enumeration.'
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/50e0437e-912d-4cd0-ac19-fef0aebdd3d7')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/50e0437e-912d-4cd0-ac19-fef0aebdd3d7')]",
      "properties": {
        "alertRuleTemplateName": "50e0437e-912d-4cd0-ac19-fef0aebdd3d7",
        "customDetails": null,
        "description": "'Detects possible service account enumeration.'\n",
        "displayName": "GCP IAM - Service Account Enumeration",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "FullName"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformIAM/Analytic Rules/GCPIAMServiceAccountEnumeration.yaml",
        "query": "let threshold = 5;\nGCP_IAM\n| where PayloadMethodname =~ 'google.iam.admin.v1.ListServiceAccounts'\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",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Discovery"
        ],
        "techniques": [
          "T1087"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}