This detection identifies adversaries establishing persistence or lateral movement by modifying firewall rules to open new network ports and allow specific traffic flows. Proactively hunting for these changes in Azure Sentinel is critical because attackers often manipulate firewalls early in an engagement to create covert communication channels that bypass standard egress monitoring.
rule firewallOpener
{
meta:
copyright = "2015 Novetta Solutions"
author = "Novetta Threat Research & Interdiction Group - [email protected]"
strings:
$ = "%sd.e%sc n%ssh%srewa%s ad%s po%sop%sing T%s %d \"%s\""
condition:
any of them
}
This YARA rule can be deployed in the following contexts:
Here are 4 specific false positive scenarios for the firewallOpener detection rule in an enterprise environment, including suggested filters or exclusions:
Patch Management Deployment via SCCM/Intune
System account or specific service accounts (e.g., NT SERVICE\ccmexec) located in the C:\Windows\CCM\ directory, specifically during defined maintenance hours (e.g., 02:00–06:00 UTC).Database High-Availability Failover Scripts
netsh or modify the Windows Filtering Platform (WFP) directly.\Program Files\Microsoft SQL Server\MSSQL*\MSSQL* where the parent process is a scheduled Task (svchost.exe -k LocalService) and the action involves port ranges typically used by SQL replication (e.g., 5022, 1433).Endpoint Detection and Response (EDR) Agent Self-Configuration