Several deny actions registered
| Id | f8dad4e9-3f19-4d70-ab7f-8f19ccd43a3e |
| Rulename | Several deny actions registered |
| Description | Identifies attack pattern when attacker tries to move, or scan, from resource to resource on the network and creates an incident when a source has more than 1 registered deny action in Azure Firewall. |
| Severity | Medium |
| Tactics | Discovery LateralMovement CommandAndControl |
| Techniques | T1046 T1071 T1210 |
| Required data connectors | AzureFirewall |
| Kind | Scheduled |
| Query frequency | 1h |
| Query period | 1h |
| Trigger threshold | 1 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Firewall/Analytic Rules/SeveralDenyActionsRegistered.yaml |
| Version | 1.1.1 |
| Arm template | f8dad4e9-3f19-4d70-ab7f-8f19ccd43a3e.json |
let threshold = 1;
union isfuzzy=true(
AZFWApplicationRule
| where Action == "Deny"
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"]),
(AZFWNetworkRule
| where Action == "Deny"
| extend Fqdn = DestinationIp
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"]),
(AZFWFlowTrace
| where Action == "Deny"
| extend Fqdn = DestinationIp
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"]),
(AZFWIdpsSignature
| where Action == "Deny"
| extend Fqdn = DestinationIp
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"]),
(AzureDiagnostics
| where OperationName in ("AzureFirewallApplicationRuleLog","AzureFirewallNetworkRuleLog")
| extend msg_s_replaced0 = replace(@"\s\s",@" ",msg_s)
| extend msg_s_replaced1 = replace(@"\.\s",@" ",msg_s_replaced0)
| extend msg_a = split(msg_s_replaced1," ")
| extend srcAddr_a = split(msg_a[3],":") , destAddr_a = split(msg_a[5],":")
| extend Protocol = tostring(msg_a[0]), SourceIp = tostring(srcAddr_a[0]), srcPort = tostring(srcAddr_a[1]), DestinationIp = tostring(destAddr_a[0]), destPort = tostring(destAddr_a[1]), Action = tostring(msg_a[7])
| where Action == "Deny"
| extend Fqdn = iff(DestinationIp matches regex "\\d+\\.\\d+\\.\\d+\\.\\d+","",DestinationIp)
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"])
relevantTechniques:
- T1046
- T1071
- T1210
queryFrequency: 1h
description: |
'Identifies attack pattern when attacker tries to move, or scan, from resource to resource on the network and creates an incident when a source has more than 1 registered deny action in Azure Firewall.'
severity: Medium
entityMappings:
- fieldMappings:
- identifier: Address
columnName: SourceIp
entityType: IP
- fieldMappings:
- identifier: Url
columnName: Fqdn
entityType: URL
triggerThreshold: 1
tactics:
- Discovery
- LateralMovement
- CommandAndControl
requiredDataConnectors:
- dataTypes:
- AzureDiagnostics
- AZFWApplicationRule
- AZFWNetworkRule
- AZFWFlowTrace
- AZFWIdpsSignature
connectorId: AzureFirewall
queryPeriod: 1h
id: f8dad4e9-3f19-4d70-ab7f-8f19ccd43a3e
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Firewall/Analytic Rules/SeveralDenyActionsRegistered.yaml
query: |
let threshold = 1;
union isfuzzy=true(
AZFWApplicationRule
| where Action == "Deny"
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"]),
(AZFWNetworkRule
| where Action == "Deny"
| extend Fqdn = DestinationIp
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"]),
(AZFWFlowTrace
| where Action == "Deny"
| extend Fqdn = DestinationIp
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"]),
(AZFWIdpsSignature
| where Action == "Deny"
| extend Fqdn = DestinationIp
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"]),
(AzureDiagnostics
| where OperationName in ("AzureFirewallApplicationRuleLog","AzureFirewallNetworkRuleLog")
| extend msg_s_replaced0 = replace(@"\s\s",@" ",msg_s)
| extend msg_s_replaced1 = replace(@"\.\s",@" ",msg_s_replaced0)
| extend msg_a = split(msg_s_replaced1," ")
| extend srcAddr_a = split(msg_a[3],":") , destAddr_a = split(msg_a[5],":")
| extend Protocol = tostring(msg_a[0]), SourceIp = tostring(srcAddr_a[0]), srcPort = tostring(srcAddr_a[1]), DestinationIp = tostring(destAddr_a[0]), destPort = tostring(destAddr_a[1]), Action = tostring(msg_a[7])
| where Action == "Deny"
| extend Fqdn = iff(DestinationIp matches regex "\\d+\\.\\d+\\.\\d+\\.\\d+","",DestinationIp)
| summarize StartTime = min(TimeGenerated), count() by SourceIp, Fqdn, Action, Protocol
| where count_ >= ["threshold"])
name: Several deny actions registered
version: 1.1.1
kind: Scheduled
status: Available