|
| 1 | +id: 9129a43e-e204-4a9a-969e-d8861ce3437c |
| 2 | +name: GCP Audit Logs - DNSSEC Disabled on Managed DNS Zone |
| 3 | +description: | |
| 4 | + 'Detects when DNSSEC (DNS Security Extensions) is disabled on a Google Cloud DNS managed zone. |
| 5 | + DNSSEC provides cryptographic authentication of DNS data, preventing DNS spoofing and cache poisoning attacks. |
| 6 | + Adversaries may disable DNSSEC to enable DNS-based command and control, phishing campaigns, or |
| 7 | + to redirect traffic to malicious infrastructure without cryptographic validation. |
| 8 | + This rule monitors DNS zone patch operations where DNSSEC state changes from ON to OFF.' |
| 9 | +severity: High |
| 10 | +status: Available |
| 11 | +requiredDataConnectors: |
| 12 | + - connectorId: GCPAuditLogsDefinition |
| 13 | + dataTypes: |
| 14 | + - GCPAuditLogs |
| 15 | +queryFrequency: 1h |
| 16 | +queryPeriod: 1h |
| 17 | +triggerOperator: gt |
| 18 | +triggerThreshold: 0 |
| 19 | +tactics: |
| 20 | + - DefenseEvasion |
| 21 | + - CommandAndControl |
| 22 | + - ResourceDevelopment |
| 23 | +relevantTechniques: |
| 24 | + - T1562.001 |
| 25 | + - T1071.004 |
| 26 | + - T1584.002 |
| 27 | +tags: |
| 28 | + - GCP |
| 29 | + - DNS |
| 30 | + - DNSSEC |
| 31 | + - Cloud Security |
| 32 | +query: | |
| 33 | + GCPAuditLogs |
| 34 | + | where ServiceName == "dns.googleapis.com" |
| 35 | + | where MethodName in ("dns.managedZones.update", "dns.managedZones.patch") |
| 36 | + | where GCPResourceType == "dns_managed_zone" and Severity == "NOTICE" |
| 37 | + | extend |
| 38 | + ResponseJson = parse_json(Response), |
| 39 | + RequestMetadataJson = parse_json(RequestMetadata), |
| 40 | + AuthInfoJson = parse_json(AuthenticationInfo) |
| 41 | + | extend ZoneContext = ResponseJson.operation.zoneContext |
| 42 | + | where isnotempty(ZoneContext) |
| 43 | + | extend |
| 44 | + OldDnsSecState = tostring(ZoneContext.oldValue.dnssecConfig.state), |
| 45 | + NewDnsSecState = tostring(ZoneContext.newValue.dnssecConfig.state) |
| 46 | + | where OldDnsSecState == "ON" and NewDnsSecState == "OFF" |
| 47 | + | extend |
| 48 | + ManagedZoneName = extract(@"managedZones/([^/]+)", 1, GCPResourceName), |
| 49 | + DnsName = tostring(ResponseJson.managedZone.dnsName), |
| 50 | + ZoneId = tostring(ResponseJson.managedZone.id), |
| 51 | + ZoneDescription = tostring(ResponseJson.managedZone.description), |
| 52 | + Visibility = tostring(ResponseJson.managedZone.visibility), |
| 53 | + OperationId = tostring(ResponseJson.operation.id), |
| 54 | + CallerIpAddress = tostring(RequestMetadataJson.callerIp), |
| 55 | + AuthEmail = tostring(AuthInfoJson.principalEmail) |
| 56 | + | extend |
| 57 | + AccountName = tostring(split(PrincipalEmail, "@")[0]), |
| 58 | + AccountUPNSuffix = tostring(split(PrincipalEmail, "@")[1]) |
| 59 | + | project TimeGenerated, |
| 60 | + PrincipalEmail, |
| 61 | + AuthEmail, |
| 62 | + ProjectId, |
| 63 | + ManagedZoneName, |
| 64 | + DnsName, |
| 65 | + ResourceName = GCPResourceName, |
| 66 | + Visibility, |
| 67 | + ZoneId, |
| 68 | + ZoneDescription, |
| 69 | + OperationId, |
| 70 | + CallerIpAddress, |
| 71 | + MethodName, |
| 72 | + ServiceName, |
| 73 | + Severity, |
| 74 | + LogName, |
| 75 | + InsertId, |
| 76 | + AccountName, |
| 77 | + AccountUPNSuffix |
| 78 | +entityMappings: |
| 79 | + - entityType: Account |
| 80 | + fieldMappings: |
| 81 | + - identifier: FullName |
| 82 | + columnName: PrincipalEmail |
| 83 | + - identifier: Name |
| 84 | + columnName: AccountName |
| 85 | + - identifier: UPNSuffix |
| 86 | + columnName: AccountUPNSuffix |
| 87 | + - entityType: IP |
| 88 | + fieldMappings: |
| 89 | + - identifier: Address |
| 90 | + columnName: CallerIpAddress |
| 91 | + - entityType: CloudApplication |
| 92 | + fieldMappings: |
| 93 | + - identifier: Name |
| 94 | + columnName: ProjectId |
| 95 | + - identifier: InstanceName |
| 96 | + columnName: ResourceName |
| 97 | + - entityType: DNS |
| 98 | + fieldMappings: |
| 99 | + - identifier: DomainName |
| 100 | + columnName: DnsName |
| 101 | +customDetails: |
| 102 | + ProjectId: ProjectId |
| 103 | + ManagedZoneName: ManagedZoneName |
| 104 | + DnsName: DnsName |
| 105 | + ResourceName: ResourceName |
| 106 | + Visibility: Visibility |
| 107 | + ZoneId: ZoneId |
| 108 | +alertDetailsOverride: |
| 109 | + alertDisplayNameFormat: "DNSSEC Disabled on DNS Zone {{ManagedZoneName}} ({{DnsName}}) by {{PrincipalEmail}}" |
| 110 | + alertDescriptionFormat: |- |
| 111 | + User {{PrincipalEmail}} disabled DNSSEC on DNS managed zone {{ManagedZoneName}} ({{DnsName}}). |
| 112 | + This action removes cryptographic validation of DNS responses and may indicate an attempt to facilitate DNS-based attacks. |
| 113 | + Investigate immediately to determine if this change was authorized and assess potential security impact. |
| 114 | + Review DNS query logs for suspicious activity and consider re-enabling DNSSEC if unauthorized. |
| 115 | +version: 1.0.0 |
| 116 | +kind: Scheduled |
0 commit comments