Query Details
id: c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f
name: "Firewall Traffic to Threat Intelligence Flagged IP"
version: 1.0.0
kind: Scheduled
description: |
Correlates allowed firewall traffic (Fortinet, Palo Alto, Zscaler) against active Threat
Intelligence indicators from the ThreatIntelligenceIndicator table. Any allowed connection
to a TI-flagged IP is a high-confidence indicator of compromise, C2 communication, or
active exploitation attempt.
MITRE ATT&CK: T1071 (Application Layer Protocol), T1078 (Valid Accounts)
severity: High
requiredDataConnectors:
- connectorId: CommonSecurityEvents
dataTypes:
- CommonSecurityLog
- connectorId: ThreatIntelligence
dataTypes:
- ThreatIntelligenceIndicator
queryFrequency: 15m
queryPeriod: 1d
triggerOperator: gt
triggerThreshold: 0
tactics:
- CommandAndControl
- InitialAccess
relevantTechniques:
- T1071
- T1078
query: |
let TI_IPs =
ThreatIntelligenceIndicator
| where TimeGenerated > ago(30d)
| where Active == true
| where isnotempty(NetworkIP)
| summarize ThreatTypes = make_set(ThreatType), ConfidenceScore = max(ConfidenceScore)
by TI_IP = NetworkIP;
CommonSecurityLog
| where TimeGenerated > ago(1d)
| where DeviceVendor in ("Fortinet", "Palo Alto Networks", "Zscaler")
| where DeviceAction !in ("deny", "block", "drop", "BLOCK", "DROP", "Reset-Both")
| where isnotempty(DestinationIP) or isnotempty(SourceIP)
| extend CheckIP = iff(ipv4_is_private(DestinationIP) == false, DestinationIP, SourceIP)
| join kind=inner TI_IPs on $left.CheckIP == $right.TI_IP
| summarize
HitCount = count(),
InternalIPs = make_set(SourceIP, 20),
DeviceVendors = make_set(DeviceVendor),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated),
ThreatTypes = make_set(ThreatTypes),
ConfidenceScore = max(ConfidenceScore)
by TI_IP
| order by HitCount desc
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: TI_IP
customDetails:
HitCount: HitCount
ConfidenceScore: ConfidenceScore
alertDetailsOverride:
alertDisplayNameFormat: "TI Match - Firewall Allowed Traffic to {{TI_IP}}"
alertDescriptionFormat: "TI-flagged IP {{TI_IP}} (confidence: {{ConfidenceScore}}) was seen in {{HitCount}} allowed firewall events. Possible C2 communication or active IOC."
incidentConfiguration:
createIncident: true
groupingConfiguration:
enabled: true
reopenClosedIncident: false
lookbackDuration: PT12H
matchingMethod: Selected
groupByEntities:
- IP
groupByAlertDetails: []
groupByCustomDetails: []
This query is designed to detect potentially malicious activity by identifying allowed firewall traffic to IP addresses flagged by threat intelligence sources. Here's a simplified breakdown:
Purpose: The query checks for allowed connections from firewalls (Fortinet, Palo Alto, Zscaler) to IP addresses that are flagged as threats by threat intelligence data. Such connections could indicate a compromise, command-and-control (C2) communication, or an active exploitation attempt.
Data Sources: It uses two main data sources:
Process:
Output:
Alerting:
Severity and Techniques:
In summary, this query helps security teams quickly identify and respond to suspicious network activities involving known threat IPs, potentially preventing or mitigating security incidents.

David Alonso
Released: March 2, 2026
Tables
Keywords
Operators