Ensure that Microsoft Defender for SQL servers on machines is set to 'On'

MEDIUM

Description

Description:

Turning on Microsoft Defender for SQL servers on machines enables threat detection for SQL servers on machines, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.

Rationale:

Enabling Microsoft Defender for SQL servers on machines allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC).

Turning on Microsoft Defender for SQL servers on machines incurs an additional cost per resource.

Remediation

From Azure Console

  1. Go to 'Microsoft Defender for Cloud'
  2. Select 'Environment Settings' blade
  3. Click on the subscription name
  4. Select the 'Defender plans' blade
  5. On the line in the table for 'SQL Servers on machines' Select 'On' under 'Plan'.
  6. Select 'Save'

Using Azure Command Line Interface 2.0

Use the below command to enable Standard pricing tier for Storage

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/providers/Microsoft.Security/pr icings/SqlServerVirtualMachines?api-version=2018-06-01 -d@"input.json"'

Where input.json contains the Request body json data as mentioned below.

{ "id": "/subscriptions//providers/Microsoft.Security/pricings/SqlserverVirtualMachines", "name": "SqlserverVirtualMachines", "type": "Microsoft.Security/pricings", "properties": { "SqlserverVirtualMachines": "Standard" } }
.