Detection rules › Kusto

GCP IAM - Service Account Enumeration

Status
available
Severity
low
Time window
1h
Group by
PayloadAuthenticationinfoPrincipalemail
Source
github.com/Azure/Azure-Sentinel

'Detects possible service account enumeration.'

MITRE ATT&CK coverage

TacticTechniques
DiscoveryT1087 Account Discovery

Rule body kusto

id: 50e0437e-912d-4cd0-ac19-fef0aebdd3d7
name: GCP IAM - Service Account Enumeration
description: |
  'Detects possible service account enumeration.'
severity: Low
status: Available
requiredDataConnectors:
  - connectorId: GCPIAMDataConnector
    dataTypes:
      - GCP_IAM
queryFrequency: 12h
queryPeriod: 12h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Discovery
relevantTechniques:
  - T1087
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
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: FullName
        columnName: AccountCustomEntity
version: 1.0.0
kind: Scheduled

Stages and Predicates

Parameters

let threshold = 5;

Stage 1: source

GCP_IAM

Stage 2: where

| where PayloadMethodname =~ 'google.iam.admin.v1.ListServiceAccounts'

Stage 3: summarize

| summarize count() by PayloadAuthenticationinfoPrincipalemail, bin(TimeGenerated, 1h)

Stage 4: where

| where count_ > threshold

Stage 5: extend

| extend AccountCustomEntity = PayloadAuthenticationinfoPrincipalemail

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
PayloadMethodnameeq
  • google.iam.admin.v1.ListServiceAccounts
count_gt
  • 5 transforms: cased

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
PayloadAuthenticationinfoPrincipalemailsummarize
AccountCustomEntityextend