| name | cis-azure-foundations-6.1.2.3 |
| description | Ensure Activity Log Alert exists for Create or Update Network Security Group |
| category | cis-azure-foundations |
| version | 5.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","logging","monitoring","activity-log-alerts","nsg","network"] |
| cis_id | 6.1.2.3 |
| cis_benchmark | CIS Microsoft Azure Foundations Benchmark v5.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | ["cis-azure-foundations-6.1.2.4"] |
| prerequisites | [] |
| severity_boost | {} |
Ensure that Activity Log Alert exists for Create or Update Network Security Group
Description
Create an Activity Log Alert for the Create or Update Network Security Group event.
Rationale
Monitoring for Create or Update Network Security Group events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.
Impact
None identified.
Audit Procedure
Using Azure Portal
- Navigate to the
Monitor blade.
- Click on
Alerts.
- In the Alerts window, click on
Alert rules.
- Ensure an alert rule exists where the Condition column contains
Operation name=Microsoft.Network/networkSecurityGroups/write.
- Click on the Alert
Name associated with the previous step.
- Ensure the
Condition panel displays the text Whenever the Activity Log has an event with Category='Administrative', Operation name='Create or Update Network Security Group' and does not filter on Level, Status or Caller.
- Ensure the
Actions panel displays an Action group is assigned to notify the appropriate personnel in your organization.
Using Azure CLI
az monitor activity-log alert list --subscription <subscription ID> --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}"
Look for Microsoft.Network/networkSecurityGroups/write in the output.
Using PowerShell
Get-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match "Microsoft.Network/networkSecurityGroups/write"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf
Expected Result
An activity log alert rule should exist with the operation name Microsoft.Network/networkSecurityGroups/write and an action group assigned.
Remediation
Remediate from Azure Portal
- Navigate to the
Monitor blade.
- Select
Alerts.
- Select
Create.
- Select
Alert rule.
- Choose a subscription.