User should have a 'Delete Security Solution' activity log alert configured
Warning: This rule will be deprecated 18 December 2023 as part of the update to Azure CIS version 2.0.0
Description
Create an activity log alert for the Delete Security Solution event.
Rationale
By monitoring deletion of security solution events, you gain insight into changes to the active security solutions and may reduce the time it takes to detect suspicious activity.
From the console
- Navigate to Monitor.
- Select Alerts.
- Click On New Alert Rule.
- Under Scope, click Select resource.
- Select the appropriate subscription under Filter by subscription.
- Select Security Solutions under Filter by resource type.
- Select All for Filter by location.
- Click on the subscription resource from the entries populated under Resource.
- Click Done.
- Verify that Selection preview shows Security Solutions and your selected subscription name.
- Under Condition, click Add Condition.
- Select Delete Security Solutions signal.
- Click Done.
- Under Action group, select Add action groups and either complete the creation process or select the appropriate action group.
- Under Alert rule details, enter Alert rule name and Description.
- Select appropriate resource group to save the alert to.
- Click on the Enable alert rule upon creation checkbox.
- Click Create alert rule.
From the command line
az account get-access-token --query "{subscription:subscription,accessToken:accessToken}" --out tsv | xargs -L1 bash -c 'curl -X PUT -H "Authorization: Bearer $1" -H "Content-Type: application/json" https://management.azure.com/subscriptions/$0/resourceGroups/<Resource_Group_ To Create_Alert_In>/providers/microsoft.insights/activityLogAlerts/<Unique_Alert _Name>?api-version=2017-04-01 -d@"input.json"'
where input.json
contains the Request body JSON data as mentioned below.
{
"location": "Global",
"tags": {},
"properties": {
"scopes": [
"/subscriptions/<Subscription_ID>"
],
"enabled": true,
"condition": {
"allOf": [
{
"containsAny": null,
"equals": "Security",
"field": "category"
},
{
"containsAny": null,
"equals": "Microsoft.Security/securitySolutions/delete",
"field": "operationName"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/<Subscription_ID>/resourceGroups/<Resource_Group_For_Alert_Gr oup>/providers/microsoft.insights/actionGroups/<Alert_Group>",
"webhookProperties": null
}
]
},
}
}
References
- https://azure.microsoft.com/en-us/updates/classic-alerting-monitoring-retirement
- https://docs.microsoft.com/en-in/azure/azure-monitor/platform/alerts-activity-log
- https://docs.microsoft.com/en-in/rest/api/monitor/activitylogalerts/createorupdate
- https://docs.microsoft.com/en-in/rest/api/monitor/activitylogalerts/listbysubscriptionid
- https://docs.microsoft.com/en-us/azure/security/benchmarks/security-controls-v2-logging-threat-detection#lt-4-enable-logging-for-azure-resources
CIS Controls
Version 7: 6.3 Enable Detailed Logging. Enable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.