More Info:
Monitoring for Delete Network Security Group Rule events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.Risk Level
LowAddress
Operational Maturity, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS AZURE
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- HIPAA
- ISO 27001
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration “Ensure Activity Log Alert exists for Delete Network Security Group Rule” for Azure using Azure console, follow the below steps:
- Log in to the Azure portal (https://portal.azure.com/).
- Select the subscription for which you want to remediate the misconfiguration.
- Click on the “Activity log alerts” option from the left-hand side menu.
- Click on the ”+ Add activity log alert” button to create a new alert.
- In the “Basics” tab, provide a name for the alert, select the subscription, and resource group for which you want to create the alert.
- In the “Condition” tab, select the “Delete Network Security Group Rule” option from the “Event name” dropdown.
- In the “Actions” tab, select the action you want to take when the alert is triggered. You can choose to send an email, a webhook, or a SMS message.
- In the “Review + create” tab, review the alert configuration and click on the “Create” button to create the alert.
Using CLI
Using CLI
To remediate the misconfiguration of missing Activity Log Alert for Delete Network Security Group Rule in AZURE using AZURE CLI, follow the below steps:Step 1: Open the AZURE CLI on your local machine or use the AZURE Cloud Shell.Step 2: Check if the Activity Log Alert exists for Delete Network Security Group Rule by running the following command:This command will list all the Activity Log Alerts that exist for the Delete Network Security Group Rule.Step 3: If the Activity Log Alert does not exist, create a new one by running the following command:Replace This command will list all the Activity Log Alerts that exist for the Delete Network Security Group Rule, and the newly created Activity Log Alert should be listed.By following these steps, you can remediate the misconfiguration of missing Activity Log Alert for Delete Network Security Group Rule in AZURE using AZURE CLI.
<alert-name> with the name you want to give to the new Activity Log Alert, <resource-group-name> with the name of the resource group where the security group is located, and <action-group-id> with the ID of the action group that should be notified when the Activity Log Alert is triggered.Step 4: Verify if the Activity Log Alert is created successfully by running the following command:Using Python
Using Python
To remediate the misconfiguration “Ensure Activity Log Alert exists for Delete Network Security Group Rule” in Azure using Python, you can follow the below steps:Step 1: Install the Azure Python SDK using the following command:Step 2: Authenticate to Azure using the Azure CLI or using a Service Principal.Step 3: Use the following Python code to create an Activity Log alert for the Delete Network Security Group Rule:In the above code, replace the placeholders
<Subscription_Id>, <Resource_Group_Name>, <Network_Security_Group_Name> and <Activity_Log_Alert_Name> with the appropriate values.This code will create an Activity Log Alert for the Delete Network Security Group Rule in Azure. When this rule is triggered, an email will be sent to the specified email address.Using Terraform
Using Terraform
terraform plan should show one new azurerm_monitor_activity_log_alert (and one new azurerm_monitor_action_group if you didn’t have one already) with criteria.operation_name = "Microsoft.Network/networkSecurityGroups/securityRules/delete".
