turbot/steampipe-mod-azure-compliance

Control: 2.1.11 Ensure That Microsoft Defender for DNS Is Set To 'On'

Description

Microsoft Defender for DNS scans all network traffic exiting from within a subscription.

DNS lookups within a subscription are scanned and compared to a dynamic list of websites that might be potential security threats. These threats could be a result of a security breach within your services, thus scanning for them could prevent a potential security threat from being introduced.

Remediation

From Azure Portal

  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. Select On under Status for DNS.
  6. Select Save.

From Azure CLI

Enable Standard pricing tier for DNS:

az security pricing create -n 'DNS' --tier 'Standard'

From Powershell

Enable Standard pricing tier for DNS:

Set-AzSecurityPricing -Name 'DNS' -PricingTier 'Standard'

Default Value

By default, Microsoft Defender for DNS is not enabled.

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.cis_v200_2_1_11

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.cis_v200_2_1_11 --share

SQL

This control uses a named query:

select
sub_pricing.id as resource,
case
when pricing_tier = 'Standard' then 'ok'
else 'alarm'
end as status,
case
when pricing_tier = 'Standard' then 'Azure Defender on for DNS.'
else 'Azure Defender off for DNS.'
end as reason
, sub.display_name as subscription
from
azure_security_center_subscription_pricing sub_pricing
right join azure_subscription sub on sub_pricing.subscription_id = sub.subscription_id
where
name = 'Dns';

Tags