Validating Azure Defender for DNS Alerts

Published Mar 22 2021 08:41 AM 3,687 Views
Microsoft

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

 

1 Comment
%3CLINGO-SUB%20id%3D%22lingo-sub-2227845%22%20slang%3D%22en-US%22%3EValidating%20Azure%20Defender%20for%20DNS%20Alerts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2227845%22%20slang%3D%22en-US%22%3E%20%3CP%3EThis%20document%20is%20provided%20%E2%80%9Cas%20is.%E2%80%9D%20MICROSOFT%20MAKES%20NO%20WARRANTIES%2C%20EXPRESS%20OR%20IMPLIED%2C%20IN%20THIS%20DOCUMENT.%26nbsp%3B%20This%20document%20does%20not%20provide%20you%20with%20any%20legal%20rights%20to%20any%20intellectual%20property%20in%20any%20Microsoft%20product.%26nbsp%3B%20You%20may%20copy%20and%20use%20this%20document%20for%20your%20internal%2C%20reference%20purposes.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-security-center%2Fazure-defender-and-security-center-ignite-2021-announcements%2Fba-p%2F2172231%22%20target%3D%22_blank%22%3Eannounced%20at%20Ignite%202021%3C%2FA%3E%2C%26nbsp%3BAzure%20Defender%20for%20DNS%20is%20available%20in%20Public%20Preview.%20This%20new%20Azure%20Defender%20plan%20provides%20threat%20detection%20for%20azure%20resources%20connected%20to%20the%20Azure%20DNS%2C%20the%20intent%20is%20to%20detect%20malicious%20communication%20from%20an%20Azure%20resource%20and%20malicious%20DNS%20servers%20trying%20to%20compromise%20with%20an%20Azure%20resource.%20To%20learn%20more%20about%20Azure%20Defender%20for%20DNS%2C%20read%20our%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsecurity-center%2Fdefender-for-dns-introduction%22%20rel%3D%22noopener%20noreferrer%22%20target%3D%22_blank%22%3Eofficial%20documentation%3C%2FA%3E.%20During%20the%20public%20preview%20time%20you%20can%20enable%20Azure%20Defender%20for%20DNS%20without%20any%20additional%20charge%2C%20just%20go%20to%20Price%20%26amp%3B%20settings%2C%20select%20the%20subscription%2C%20change%20the%20plan%20to%20ON%20(as%20shown%20below)%20and%20click%20Save%20to%20commit%20the%20change.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20that%20you%20have%20this%20plan%20set%20to%20ON%2C%20you%20can%20use%20the%20steps%20below%20to%20validate%20this%20threat%20detection%3A%3C%2FP%3EProvision%20a%20new%20VM%20and%20keep%20the%20default%20TCP%2FIP%20configuration%20(by%20default%20all%20VMs%20will%20connect%20to%20Azure%20DNS).%20Connect%20to%20this%20machine%20using%20RDP.%20Create%20a%20file%20on%20this%20machine%20called%20DNSAlertSim.ps1%20and%20paste%20the%20content%20below%20in%20this%20file%3A%3CP%3E%26nbsp%3B%3C%2FP%3EResolve-DnsName%20bbcnewsv2vjtpsuy.onion.to%20Resolve-DnsName%20all.mainnet.ethdisco.net%20Resolve-DnsName%20micros0ft.com%20Resolve-DnsName%20164e9408d12a701d91d206c6ab192994.info%20For(%24i%3D0%3B%20%24i%20-le%20150%3B%20%24i%2B%2B)%20%7B%20%24rand%20%3D%20-join%20((97..122)%20%7C%20Get-Random%20-Count%2032%20%7C%20%25%20%7B%5Bchar%5D%24_%7D)%20Resolve-DnsName%20%22%24rand.com%22%20%7D%20%24rand%20%3D%20-join%20((97..122)%20%7C%20Get-Random%20-Count%2063%20%7C%20%25%20%7B%5Bchar%5D%24_%7D)%20Resolve-DnsName%20%22%24rand.contoso.com%22%20For(%24i%3D0%3B%20%24i%20-le%201000%3B%20%24i%2B%2B)%20%7B%20%24rand%20%3D%20-join%20((97..122)%20%7C%20Get-Random%20-Count%2063%20%7C%20%25%20%7B%5Bchar%5D%24_%7D)%20Resolve-DnsName%20%22%24rand.contoso.com%22%20%7D%20Resolve-DnsName%20reseed.i2p-projekt.de%20Write-Host%20-NoNewLine%20'Press%20any%20key%20to%20continue...'%3B%20%24null%20%3D%20%24Host.UI.RawUI.ReadKey('NoEcho%2CIncludeKeyDown')%3B%3CP%3E%26nbsp%3B%3C%2FP%3ESave%20this%20file%20Execute%20DNSAlertSim.ps1%3CP%3EAfter%20some%20minutes%20you%20should%20see%20Azure%20Defender%20for%20DNS%20alerts%20showing%20up%20on%20your%20dashboard%2C%20similar%20to%20the%20one%20below%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20a%20complete%20list%20of%20all%20analytics%20available%20for%20Azure%20Defender%20for%20DNS%2C%20read%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsecurity-center%2Falerts-reference%23alerts-dns%22%20rel%3D%22noopener%20noreferrer%22%20target%3D%22_blank%22%3Ethis%20documentation%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EReviewers%3C%2FP%3E%3CP%3ETal%20Rosler%2C%20Program%20Manager%3C%2FP%3E%3CP%3EScript%20by%20John%20Booth%2C%20Senior%20Software%20Engineer%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2227845%22%20slang%3D%22en-US%22%3E%3CP%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2540329%22%20slang%3D%22en-US%22%3ERe%3A%20Validating%20Azure%20Defender%20for%20DNS%20Alerts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2540329%22%20slang%3D%22en-US%22%3E%3CP%3E%40Sakariye2333%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1081915%22%20target%3D%22_blank%22%3E%40lajaceloowgamicrosoftcom%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1077522%22%20target%3D%22_blank%22%3E%40zakisinaiisamsungcom%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F124214%22%20target%3D%22_blank%22%3E%40Yuri%20Diogenes%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1045153%22%20target%3D%22_blank%22%3E%40lajacelowga-samsung%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F282024%22%20target%3D%22_blank%22%3E%40Godaddy65%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F772901%22%20target%3D%22_blank%22%3E%40AZGOD%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F260341%22%20target%3D%22_blank%22%3E%40uc2go_wordpresscom%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F79817%22%20target%3D%22_blank%22%3E%40microsoft%3C%2FA%3E%26nbsp%3B%3Ca%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F73893%22%3E%40azure%3C%2Fa%3E.com%3C%2FP%3E%3C%2FLINGO-BODY%3E
Co-Authors
Version history
Last update:
‎Mar 22 2021 08:41 AM
Updated by:
www.000webhost.com