Subscription has an Azure Monitor Activity Log alert for Microsoft.Security/securitySolutions delete operations
Azure activity log alerts monitor deletions of Security Solutions by targeting the operation Microsoft.Security/securitySolutions/delete at subscription scope.
Identifies whether notifications are configured for security solution removal events.
Risk
Without this alert, unauthorized or accidental deletions of security tooling may go unnoticed, reducing the availability of protections and the integrity of monitoring. Adversaries can evade defenses, prolong dwell time, and enable data exfiltration under reduced visibility.
Run this check with Prowler
Run in Prowler Cloudprowler azure --checks monitor_alert_delete_security_solutionRecommendation
Configure a dedicated activity log alert for Microsoft.Security/securitySolutions/delete and route it to resilient action groups (email, chat, ticketing, SIEM). Apply least privilege and resource locks to deter tampering. Test alerting routinely and integrate it into defense-in-depth monitoring.
Remediation
CLI
az monitor activity-log alert create -g <example_resource_name> -n <example_resource_name> --condition operationName=Microsoft.Security/securitySolutions/delete --scope /subscriptions/<example_resource_id>Terraform
# Activity Log Alert for Security Solution delete
resource "azurerm_monitor_activity_log_alert" "<example_resource_name>" {
name = "<example_resource_name>"
resource_group_name = "<example_resource_name>"
scopes = ["/subscriptions/<example_resource_id>"]
criteria {
operation_name = "Microsoft.Security/securitySolutions/delete" # Critical: alerts on delete operation
}
}NativeIaC
// Activity Log Alert for Security Solution delete
resource alert 'Microsoft.Insights/activityLogAlerts@2020-10-01' = {
name: '<example_resource_name>'
location: 'global'
properties: {
enabled: true
scopes: [ subscription().id ]
condition: {
allOf: [
{
field: 'operationName'
equals: 'Microsoft.Security/securitySolutions/delete' // Critical: alerts on Security Solution delete
}
]
}
}
}Other
Check Code
from prowler.lib.check.models import Check, Check_Report_Azure
from prowler.providers.azure.services.monitor.lib.monitor_alerts import check_alert_rule
from prowler.providers.azure.services.monitor.monitor_client import monitor_client
class monitor_alert_delete_security_solution(Check):
def execute(self) -> Check_Report_Azure:
findings = []
for (
subscription_id,
activity_log_alerts,
) in monitor_client.alert_rules.items():
subscription_name = monitor_client.subscriptions.get(
subscription_id, subscription_id
)
for alert_rule in activity_log_alerts:
if check_alert_rule(
alert_rule, "Microsoft.Security/securitySolutions/delete"
):
report = Check_Report_Azure(
metadata=self.metadata(), resource=alert_rule
)
report.subscription = subscription_id
report.status = "PASS"
report.status_extended = f"There is an alert configured for deleting Security Solution in subscription {subscription_name} ({subscription_id})."
break
else:
report = Check_Report_Azure(metadata=self.metadata(), resource={})
report.subscription = subscription_id
report.resource_name = subscription_id
report.resource_id = f"/subscriptions/{subscription_id}"
report.status = "FAIL"
report.status_extended = f"There is not an alert for deleting Security Solution in subscription {subscription_name} ({subscription_id})."
findings.append(report)
return findingsReferences
- https://www.trendmicro.com/cloudoneconformity/knowledge-base/azure/ActivityLog/delete-security-solution-alert.html
- https://learn.microsoft.com/en-in/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule?tabs=activity-log
- https://learn.microsoft.com/en-us/cli/azure/monitor/activity-log/alert?view=azure-cli-latest
- https://azure.microsoft.com/en-us/updates/classic-alerting-monitoring-retirement