DNS Shell – Tool to Compromise & Maintain Control of Victim Machines

December 31, 2017 | Views: 5687

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

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 I have used Kali Linux(Attacker Machine) and Victim Machine (Windows 10)


  • Download the DNS SHELL tool here.
  • Execute the command: python DNS-SHELL.py


  • 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

  • Above Figure is Recursive mode.
  • Recursive Command Executed: Python DNS-Shell.py -l -r <Domain Name>

NOTE: Command to be executed for direct mode: Python DNS-Shell.py -l -d

  • Above figure shows recursive mode has generated payload.

Victims Machine

  • Run & Execute the Command with CMDPowershell.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.Happy Hacking !!!

Please visit www.gbhackers.com for Daily Hacking news, Tutorials, and more Infosec Resources.

Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge



Is Linux Worth Learning in 2020?
Views: 213 / December 14, 2019
How do I Get MTA Certified?
Views: 822 / December 12, 2019
How much does your PAM software really cost?
Views: 1274 / December 10, 2019
How Do I Get into Android Development?
Views: 1652 / December 8, 2019

We recommend always using caution when following any link

Are you sure you want to continue?