Description:

An Activity Log Alert for Create or Update Security Solution ensures that any action to create or update a Security Solution in your Azure environment triggers a notification. Security Solutions in Azure, such as Microsoft Defender for Cloud or other third-party security services, are critical for maintaining the security posture of your environment. Creating or updating these solutions can significantly impact your security settings, so monitoring these changes is essential to ensure that they are made intentionally and securely.

By creating an Activity Log Alert for Create or Update Security Solution events, you can ensure that any changes to security configurations are tracked and prompt immediate response if needed.

Rationale:

By setting up an Activity Log Alert for Create or Update Security Solution actions, you can:

  • Monitor the creation and updates to security solutions.

  • Track changes to security settings and ensure that any updates are authorized and legitimate.

  • Improve security by notifying administrators when critical security solutions are created or updated, reducing the risk of misconfiguration or unauthorized changes.

  • Support compliance by maintaining an audit trail of changes to security solutions.

Impact:

Configuring an Activity Log Alert for Create or Update Security Solution ensures you are notified immediately when a security solution is created or updated. This helps you maintain control over the security posture of your environment. However, this may generate alerts when security solutions are intentionally created or updated, so it is important to handle these notifications appropriately.

Default Value:

By default, there are no Activity Log Alerts configured for Create or Update Security Solution actions. You need to manually create and configure these alerts to track and respond to such events.

Pre-requisites:

  • Azure subscription.

  • Owner or Contributor role permissions to create Activity Log Alerts.

  • Azure Monitor enabled for logging.

  • Log Analytics workspace (optional, for storing telemetry data).

  • Security solutions such as Microsoft Defender for Cloud or third-party security solutions deployed in your environment.

Audit:

  1. Sign in to Azure portal as an Owner, Contributor, or Monitoring Contributor.

  2. Navigate to Azure Monitor and review the Activity Log Alerts to ensure that alerts for Create or Update Security Solution actions are configured.

  3. Verify that the configured alert is properly notifying users of Security Solution creation or updates.

Implementation Steps (Automated):

  1. Sign in to Azure portal:

    • Use an account with Owner, Contributor, or Monitoring Contributor permissions.

  2. Navigate to Azure Monitor:

    • In the Azure portal, go to Azure Monitor and select Activity Log under Monitoring.

  3. Create a New Alert for Create or Update Security Solution:

    • In Activity Log Alerts, click on + New alert rule.

    • Under Scope, select your subscription or resource group.

    • Under Condition, choose Activity Log as the signal type.

    • Set the Event Category to Write and the Resource Type to Microsoft.Security/solutions or the specific security solution you are using (e.g., Microsoft Defender for Cloud).

    • Filter further by Operation Name: Create Security Solution or Update Security Solution.

  4. Example of criteria:

    • Event Category: Write

    • Operation Name: Create Security Solution, Update Security Solution

    • Resource Type: Microsoft.Security/solutions

  5. Set Up Action Group:

    • Under Action Group, either select an existing action group or create a new one to define how the alert will notify you (e.g., via Email, SMS, Webhook).

    • You can send notifications to security teams or administrators whenever a Security Solution is created or updated.

  6. Review and Create:

    • Review the configuration and ensure the alert is set to notify you when a Security Solution is created or updated.

    • Click Create to save the alert rule.

Automate Alert Creation Using Azure CLI: To automate the creation of an Activity Log Alert for Create or Update Security Solution using Azure CLI, run the following command:

az monitor activity-log alert create \

    --name "CreateOrUpdateSecuritySolutionAlert" \

    --resource-group <Resource-Group-Name> \

    --condition "operationName in ['Create Security Solution', 'Update Security Solution']" \

    --action-group <Action-Group-ID> \

    --description "Alert for creation or update of Security Solution" \

    --enabled true

  1.  Replace <Resource-Group-Name> and <Action-Group-ID> with the appropriate values for your environment.

  2. Test the Alert:

    • After configuring the Activity Log Alert, test it by creating or updating a Security Solution and ensuring that the alert is triggered and the notification is sent to the designated recipients.

  3. Monitor and Review Alerts:

    • Use Azure Monitor to track the alert history and ensure that it is functioning as expected.

    • Review the alert history to verify that Security Solution creation or update events are being logged.

Backout Plan (Automated):

  1. Sign in to Azure portal:

    • Use an account with Owner, Contributor, or Monitoring Contributor permissions.

  2. Navigate to Azure Monitor:

    • Go to Azure Monitor in the Azure portal.

  3. Delete or Modify the Alert:

    • In Activity Log Alerts, locate the Create or Update Security Solution alert you created.

    • Select the alert and either delete it or modify its parameters as needed (e.g., change the notification action group, adjust alert criteria).

  4. Verify Alert Removal:

    • After removing or modifying the alert, ensure that it no longer triggers notifications for Create or Update Security Solution events.

  5. Test the Backout:

    • Test the configuration by creating or updating a Security Solution to ensure that the alert no longer triggers or functions as expected after the backout.

References: