Editja

Ixxerja permezz ta’


Simulate alerts for SQL servers on machines

Microsoft Defender for Cloud provides a SQL simulated alert feature that helps organizations and security teams validate deployment and test the preparedness of security teams detection, response, and automation workflows without creating actual security risks.

The simulation injects telemetry records on target machines (Azure Virtual Machines (VMs) or Arc-connected machines) through a custom script extension named Sql-SimulateAlert. The simulated alerts include full runtime context such as host, SQL instance, database, and process information, so you can validate your end-to-end security response flows. This process is safe and non-intrusive, ensuring your resources remain secure.

You can simulate the following security scenarios:

  • Brute force authentication
  • Authentication from suspicious application
  • SQL injection
  • Principal anomaly
  • Shell external source anomaly
  • Shell obfuscation

The simulation runs locally on the machine through the Custom Script Extension without executing external malicious payloads. All generated alerts contain complete machine and resource identifiers, SQL instance names, database information, process details, and telemetry data required by playbooks and security automation workflows.

Prerequisites

Simulate alerts

The SqlAlertSimulationClient extracts template parameters from the target resource, including subscription, resource group, machine name, location, and the presence of the Defender extension.

SqlAlertSimulationClient builds an Azure Resource Manager (ARM) template that deploys or re-uses a custom script extension on the machine. The extension runs a PowerShell command that invokes the Defender for SQL simulate helper with the requested attack parameters. The helper generates alert telemetry that flows into Defender for Cloud, triggering alerts that downstream automation and mobilization connectors can consume.

  1. Sign in to the Azure portal.

  2. Search for and select Azure SQL.

  3. Select SQL Server on Azure VMS or SQL Server instances (Azure Arc).

    Screenshot that shows how to navigate to your SQL virtual machine.

  4. Select the relevant database.

  5. Select Security > Microsoft Defender for Cloud.

  6. Select Simulate alert.

    Screenshot that shows where the simulate alert button is located.

  7. Select an alert type.

    Screenshot that shows the different types of alerts that can be selected.

  8. Enter the required information for the selected alert type. For example, username and password for authentication attacks.

  9. Select Simulate Alert.

The alert appears after a few minutes and you can use it to validate your security monitoring setup.

Verify that the alert is generated

After you simulate an alert, verify that the alert is generated.

  1. In the Azure portal, search for and select Azure SQL.

  2. Select SQL Server on Azure VMS or SQL Server instances (Azure Arc).

  3. Select the relevant database.

  4. Select Security > Microsoft Defender for Cloud.

  5. Select Check for alerts on this resource in Microsoft Defender for Cloud.

    Screenshot that shows where to locate the Check for alerts on this resource in Microsoft Defender for Cloud button is located.

Verify that the simulated alert appears in the list of alerts for the resource and manage and respond to the security alert.

Next step