Detection: Network Security Group Deleted
Overview
Detect when an Azure Network Security Group (NSG) was deleted. NSGs are critical for managing inbound and outbound traffic to Azure resources, and their deletion can expose resources to unauthorized access or disrupt service availability. Monitoring these deletions ensures continued network security and operational stability.
References:
Usage
Run the detection in your terminal:
powerpipe detection run azure_activity_log_detections.detection.network_security_group_deleted
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe detection run azure_activity_log_detections.detection.network_security_group_deleted --share
SQL
This detection uses a named query:
select tp_timestamp as timestamp,operation_name as operation,resource_id as resource,caller as actor,tp_index::varchar as subscription_id,resource_group_name as resource_group,tp_id as source_id,status as event_status,*
from azure_activity_logwhere operation_name = 'Microsoft.Network/networkSecurityGroups/delete' and status = 'Succeeded'
order by timestamp desc;