Analytic rule catalog
GCP Security Command Center - Detect Resources with Logging Disabled
Back
| Id | d1fe8d30-4852-463a-b6ee-3b459788b75d |
| Rulename | GCP Security Command Center - Detect Resources with Logging Disabled |
| Description | Detects Google Cloud resources where logging is disabled for services like (Cloud Storage buckets, Firewall rules, Cloud DNS networks) based on Google Cloud Security Command Center findings. |
| Severity | Medium |
| Tactics | DefenseEvasion |
| Techniques | T1562 |
| Required data connectors | GoogleSCCDefinition |
| Kind | Scheduled |
| Query frequency | 1h |
| Query period | 1h |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Google%20Cloud%20Platform%20Security%20Command%20Center/Analytic%20Rules/GCPLoggingDisabled.yaml |
| Version | 1.0.0 |
| Arm template | d1fe8d30-4852-463a-b6ee-3b459788b75d.json |
GoogleCloudSCC
| where tostring(Findings.state) == "ACTIVE"
| extend FindingCategory = tostring(Findings.category)
| where FindingCategory in ("BUCKET_LOGGING_DISABLED", "FIREWALL_RULE_LOGGING_DISABLED", "DNS_LOGGING_DISABLED")
| extend FindingsJson = parse_json(Findings)
| extend Resource = tostring(FindingsJson.resourceName),
ExternalUri = tostring(FindingsJson.externalUri),
Description = tostring(FindingsJson.description),
Severity = tostring(FindingsJson.severity),
ProjectName = extract(@"projects/([^/]+)", 1, tostring(FindingsJson.resourceName)),
ResourceType = extract(@"//([a-z0-9_.-]+)/", 1, tostring(FindingsJson.resourceName)),
SourceProps = parse_json(tostring(FindingsJson.sourceProperties))
// Normalize display-friendly resource id
| extend ResourceName = case(
Resource contains "firewalls/", extract(@"firewalls/([^/]+)", 1, Resource),
Resource contains "storage.googleapis.com/", extract(@'storage.googleapis.com/([^/\"]+)', 1, Resource),
Resource contains "networks/", extract(@"networks/([^/]+)", 1, Resource),
Resource
)
| project TimeGenerated, ProjectName, ResourceType, ResourceName, Resource, FindingCategory, Severity, ExternalUri, Description
tags:
- Logging
- GCP
version: 1.0.0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Google%20Cloud%20Platform%20Security%20Command%20Center/Analytic%20Rules/GCPLoggingDisabled.yaml
triggerThreshold: 0
requiredDataConnectors:
- dataTypes:
- GoogleCloudSCC
connectorId: GoogleSCCDefinition
tactics:
- DefenseEvasion
relevantTechniques:
- T1562
eventGroupingSettings:
aggregationKind: AlertPerResult
alertDetailsOverride:
alertDescriptionFormat: 'Resource {{ResourceName}} in project {{ProjectName}} (type: {{ResourceType}}) has logging disabled.'
alertDisplayNameFormat: 'GCP resources with logging disabled: {{ProjectName}} ({{ResourceType}})'
entityMappings:
- fieldMappings:
- identifier: Name
columnName: ResourceName
entityType: CloudApplication
description: |
Detects Google Cloud resources where logging is disabled for services like (Cloud Storage buckets, Firewall rules, Cloud DNS networks) based on Google Cloud Security Command Center findings.
triggerOperator: gt
kind: Scheduled
status: Available
queryFrequency: 1h
id: d1fe8d30-4852-463a-b6ee-3b459788b75d
name: GCP Security Command Center - Detect Resources with Logging Disabled
severity: Medium
query: |
GoogleCloudSCC
| where tostring(Findings.state) == "ACTIVE"
| extend FindingCategory = tostring(Findings.category)
| where FindingCategory in ("BUCKET_LOGGING_DISABLED", "FIREWALL_RULE_LOGGING_DISABLED", "DNS_LOGGING_DISABLED")
| extend FindingsJson = parse_json(Findings)
| extend Resource = tostring(FindingsJson.resourceName),
ExternalUri = tostring(FindingsJson.externalUri),
Description = tostring(FindingsJson.description),
Severity = tostring(FindingsJson.severity),
ProjectName = extract(@"projects/([^/]+)", 1, tostring(FindingsJson.resourceName)),
ResourceType = extract(@"//([a-z0-9_.-]+)/", 1, tostring(FindingsJson.resourceName)),
SourceProps = parse_json(tostring(FindingsJson.sourceProperties))
// Normalize display-friendly resource id
| extend ResourceName = case(
Resource contains "firewalls/", extract(@"firewalls/([^/]+)", 1, Resource),
Resource contains "storage.googleapis.com/", extract(@'storage.googleapis.com/([^/\"]+)', 1, Resource),
Resource contains "networks/", extract(@"networks/([^/]+)", 1, Resource),
Resource
)
| project TimeGenerated, ProjectName, ResourceType, ResourceName, Resource, FindingCategory, Severity, ExternalUri, Description
queryPeriod: 1h
customDetails:
Severity: Severity
ResourceType: ResourceType
ProjectName: ProjectName
ExternalUri: ExternalUri
FindingCategory: FindingCategory
Description: Description
{
"$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/d1fe8d30-4852-463a-b6ee-3b459788b75d')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/d1fe8d30-4852-463a-b6ee-3b459788b75d')]",
"properties": {
"alertDetailsOverride": {
"alertDescriptionFormat": "Resource {{ResourceName}} in project {{ProjectName}} (type: {{ResourceType}}) has logging disabled.",
"alertDisplayNameFormat": "GCP resources with logging disabled: {{ProjectName}} ({{ResourceType}})"
},
"alertRuleTemplateName": "d1fe8d30-4852-463a-b6ee-3b459788b75d",
"customDetails": {
"Description": "Description",
"ExternalUri": "ExternalUri",
"FindingCategory": "FindingCategory",
"ProjectName": "ProjectName",
"ResourceType": "ResourceType",
"Severity": "Severity"
},
"description": "Detects Google Cloud resources where logging is disabled for services like (Cloud Storage buckets, Firewall rules, Cloud DNS networks) based on Google Cloud Security Command Center findings.\n",
"displayName": "GCP Security Command Center - Detect Resources with Logging Disabled",
"enabled": true,
"entityMappings": [
{
"entityType": "CloudApplication",
"fieldMappings": [
{
"columnName": "ResourceName",
"identifier": "Name"
}
]
}
],
"eventGroupingSettings": {
"aggregationKind": "AlertPerResult"
},
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Google%20Cloud%20Platform%20Security%20Command%20Center/Analytic%20Rules/GCPLoggingDisabled.yaml",
"query": "GoogleCloudSCC\n| where tostring(Findings.state) == \"ACTIVE\"\n| extend FindingCategory = tostring(Findings.category)\n| where FindingCategory in (\"BUCKET_LOGGING_DISABLED\", \"FIREWALL_RULE_LOGGING_DISABLED\", \"DNS_LOGGING_DISABLED\")\n| extend FindingsJson = parse_json(Findings)\n| extend Resource = tostring(FindingsJson.resourceName),\n ExternalUri = tostring(FindingsJson.externalUri),\n Description = tostring(FindingsJson.description),\n Severity = tostring(FindingsJson.severity),\n ProjectName = extract(@\"projects/([^/]+)\", 1, tostring(FindingsJson.resourceName)),\n ResourceType = extract(@\"//([a-z0-9_.-]+)/\", 1, tostring(FindingsJson.resourceName)),\n SourceProps = parse_json(tostring(FindingsJson.sourceProperties))\n// Normalize display-friendly resource id\n| extend ResourceName = case(\n Resource contains \"firewalls/\", extract(@\"firewalls/([^/]+)\", 1, Resource),\n Resource contains \"storage.googleapis.com/\", extract(@'storage.googleapis.com/([^/\\\"]+)', 1, Resource),\n Resource contains \"networks/\", extract(@\"networks/([^/]+)\", 1, Resource),\n Resource\n )\n| project TimeGenerated, ProjectName, ResourceType, ResourceName, Resource, FindingCategory, Severity, ExternalUri, Description\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"DefenseEvasion"
],
"tags": [
"Logging",
"GCP"
],
"techniques": [
"T1562"
],
"templateVersion": "1.0.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}