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])
id: 2530a631-9605-404d-ae58-58ef1f91b17c
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformIAM/Analytic Rules/GCPIAMDisableDataAccessLogging.yaml
requiredDataConnectors:
- dataTypes:
- GCP_IAM
connectorId: GCPIAMDataConnector
description: |
'Detects when Data Access Logging is disabled.'
severity: Medium
queryPeriod: 1h
kind: Scheduled
tactics:
- DefenseEvasion
queryFrequency: 1h
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])
version: 1.0.1
triggerThreshold: 0
name: GCP IAM - Disable Data Access Logging
entityMappings:
- entityType: Account
fieldMappings:
- columnName: PayloadAuthenticationinfoPrincipalemail
identifier: FullName
- columnName: AccountName
identifier: Name
- columnName: AccountUPNSuffix
identifier: UPNSuffix
- entityType: IP
fieldMappings:
- columnName: SrcIpAddr
identifier: Address
status: Available
relevantTechniques:
- T1562
{
"$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/2530a631-9605-404d-ae58-58ef1f91b17c')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/2530a631-9605-404d-ae58-58ef1f91b17c')]",
"properties": {
"alertRuleTemplateName": "2530a631-9605-404d-ae58-58ef1f91b17c",
"customDetails": null,
"description": "'Detects when Data Access Logging is disabled.'\n",
"displayName": "GCP IAM - Disable Data Access Logging",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "PayloadAuthenticationinfoPrincipalemail",
"identifier": "FullName"
},
{
"columnName": "AccountName",
"identifier": "Name"
},
{
"columnName": "AccountUPNSuffix",
"identifier": "UPNSuffix"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "SrcIpAddr",
"identifier": "Address"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformIAM/Analytic Rules/GCPIAMDisableDataAccessLogging.yaml",
"query": "GCP_IAM\n| where PayloadMethodname == 'SetIamPolicy'\n| extend s = parse_json(todynamic(PayloadRequestPolicyAuditconfigs))[0]['auditLogConfigs']\n| where isempty(s)\n| extend AccountName = tostring(split(PayloadAuthenticationinfoPrincipalemail, \"@\")[0]), AccountUPNSuffix = tostring(split(PayloadAuthenticationinfoPrincipalemail, \"@\")[1])\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"DefenseEvasion"
],
"techniques": [
"T1562"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}