Detection rules › Kusto

GCP IAM - Disable Data Access Logging

Status
available
Severity
medium
Time window
1h
Source
github.com/Azure/Azure-Sentinel

'Detects when Data Access Logging is disabled.'

MITRE ATT&CK coverage

TacticTechniques
Defense Impairment

Rules detecting the same action

These rules filter on the same operation.

Rule body

id: 2530a631-9605-404d-ae58-58ef1f91b17c
name: GCP IAM - Disable Data Access Logging
description: |
  'Detects when Data Access Logging is disabled.'
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: GCPIAMDataConnector
    dataTypes:
      - GCP_IAM
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - DefenseEvasion
relevantTechniques:
  - T1562
query: |
  GCP_IAM
  | where PayloadMethodname == 'SetIamPolicy'
  | extend s = parse_json(todynamic(PayloadRequestPolicyAuditconfigs))[0]['auditLogConfigs']
  | where isempty(s)
  | extend AccountName = tostring(split(PayloadAuthenticationinfoPrincipalemail, "@")[0]), AccountUPNSuffix = tostring(split(PayloadAuthenticationinfoPrincipalemail, "@")[1])
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: FullName
        columnName: PayloadAuthenticationinfoPrincipalemail
      - identifier: Name
        columnName: AccountName
      - identifier: UPNSuffix
        columnName: AccountUPNSuffix
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: SrcIpAddr
version: 1.0.1
kind: Scheduled

Stages and Predicates

Stage 1: source

GCP_IAM

Stage 2: where

| where PayloadMethodname == 'SetIamPolicy'

Stage 3: extend

| extend s = parse_json(todynamic(PayloadRequestPolicyAuditconfigs))[0]['auditLogConfigs']

Stage 4: where

| where isempty(s)

Stage 5: extend

| extend AccountName = tostring(split(PayloadAuthenticationinfoPrincipalemail, "@")[0]), AccountUPNSuffix = tostring(split(PayloadAuthenticationinfoPrincipalemail, "@")[1])

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
PayloadMethodnameeq
  • SetIamPolicy
field:"gcp::method_name" kind:eq value:"SetIamPolicy"
sis_null
  • (no value, null check)
field:"s" kind:is_null

Output fields

These fields are emitted when the rule matches.

FieldSource
sextend
AccountNameextend
AccountUPNSuffixextend