This article is contributed. See the original author and article here.








This document is provided “as is.” MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.  This document does not provide you with any legal rights to any intellectual property in any Microsoft product.  You may copy and use this document for your internal, reference purposes.



 


As announced at Ignite 2021, Azure Defender for DNS is available in Public Preview. This new Azure Defender plan provides threat detection for azure resources connected to the Azure DNS, the intent is to detect malicious communication from an Azure resource and malicious DNS servers trying to compromise with an Azure resource. To learn more about Azure Defender for DNS, read our official documentation. During the public preview time you can enable Azure Defender for DNS without any additional charge, just go to Price & settings, select the subscription, change the plan to ON (as shown below) and click Save to commit the change.


 


Fig1.JPG


 


Now that you have this plan set to ON, you can use the steps below to validate this threat detection:



  1. Provision a new VM and keep the default TCP/IP configuration (by default all VMs will connect to Azure DNS).

  2. Connect to this machine using RDP.

  3. Create a file on this machine called DNSAlertSim.ps1 and paste the content below in this file:


 

Resolve-DnsName bbcnewsv2vjtpsuy.onion.to
Resolve-DnsName all.mainnet.ethdisco.net
Resolve-DnsName micros0ft.com 
Resolve-DnsName 164e9408d12a701d91d206c6ab192994.info 

For($i=0; $i -le 150; $i++) {
$rand = -join ((97..122) | Get-Random -Count 32 | % {[char]$_})
Resolve-DnsName "$rand.com"
}

$rand = -join ((97..122) | Get-Random -Count 63 | % {[char]$_})
Resolve-DnsName "$rand.contoso.com"

For($i=0; $i -le 1000; $i++) {

$rand = -join ((97..122) | Get-Random -Count 63 | % {[char]$_})
Resolve-DnsName "$rand.contoso.com"
}

Resolve-DnsName reseed.i2p-projekt.de 

Write-Host -NoNewLine 'Press any key to continue...';
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');

 



  1. Save this file

  2. Execute DNSAlertSim.ps1


After some minutes you should see Azure Defender for DNS alerts showing up on your dashboard, similar to the one below:


 


Fig2.JPG


 


For a complete list of all analytics available for Azure Defender for DNS, read this documentation.


 


Reviewers


Tal Rosler, Program Manager


Script by John Booth, Senior Software Engineer


 

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.