Created
April 15, 2025 11:13
-
-
Save manasmbellani/702dce13fcc3baddf62b923a6f388771 to your computer and use it in GitHub Desktop.
Generate Domain Generated Algorithm DNS Domain Names to trigger Defender for DNS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for($i=0; $i -le 150; $i++) { | |
| $rand = -join ((97..122) | Get-Random -Count 32 | % {[char]$_}) | |
| Resolve-DnsName "$rand.com" -ErrorAction Ignore | |
| } | |
| for($i=0; $i -le 1000; $i++) { | |
| $rand = -join ((97..122) | Get-Random -Count 63 | % {[char]$_}) | |
| Resolve-DnsName "$rand.contoso.com" -ErrorAction Ignore | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment