8 Best CMD Commands Used In Hacking That You Should Know About

Learning to hack needs a user to have good knowledge of tools and options related to networking and understanding how most things related to networking and internet actually work. While Windows CMD is not the most powerful command terminal, it packs many commands that an aspiring ethical hacker should know. In this post, we will take a look at some of the best CMD commands used in hacking.

Keep in mind that after learning these commands, I am not claiming that you will become a hacker, instead, you will have a better knowledge of networking tools and terms that will help you in learning to become a good hacker. After all, I don’t want you to become a script kiddie.

Before we start taking a look at best CMD commands used in hacking, you will need to open the Windows Command Prompt with administrator privileges first. To do this, make sure that you are using an Administrator Windows profile and search for “cmd.exe” in the Start Menu.

Next right click on the first result and select Run as Administrator.

Now that Command Prompt is ready, we can take a look at some hacking commands for CMD.

Launching Command prompt with administrator privileges


nslookup is a command that can find you the IP address of any website. For example, to get the IP address of Microsoft.com, you will have to enter the following in the CMD prompt:

nslookup www.microsoft.com

Aside from domain names of a website, nslookup can be used to find the IP address of an email server too, for example, to get the IP address of example.com, you will have to enter the following:

nslookup (press enter)

set type=mx (press enter)

example.com (press enter)

Once you have entered the above in the command prompt, you should see the IP address of website’s mail server on your screen.


One of the most common CMD command used in hacking, Ping simply checks if your computer can reach a specified computer or not. It works by sending an ICMP echo request to the destination computer. If there is no response from ping or there is an error, it is likely that either the destination computer is offline/malfunctioned or there is some problem with your network.

To use ping in the command prompt you use the following syntax:

Ping x.x.x.x

Here, x.x.x.x is the IP address of destination computer. This can also be replaced with a domain name, such as

Ping www.example.com


It is one of the best CMD commands used in hacking. IPconfig shows you important information about your computer and your network, including DNS in use, your IP address, and your gateway etc.


Also, if you are using a dynamic IP address, you can change your IP address with following commands:




Route is an important command that shows you a routing table, gateway interfaces, and other important metrics. To see the routing table, enter the following in your command prompt:

route print


tracert command lets you know how a packet will reach its destination. In addition to letting you know the hops, tracert also shows you exactly how much time it took at every hop when reaching the destination IP address. For example, to see the hop table of an IP address enter the following:

tracert x.x.x.x

If you don’t know the IP address of destination website, you can also use its domain name.

tracert example.com


The arp command lets you simply know the arp table. Using ARP command you can also detect if someone has poisoned your LAN. To get the ARP table, you should enter the following in the command prompt and then press enter key:

arp -a


Netstat is useful in knowing some crucial information about your connection. With netstat, you can easily get your listening ports, open connections, and information above all available sharing folders. To get different types of stats, all you have to do is a use a different switch, for example:

netstat -a

will show you a list of all listening ports.

netstat -n

The above shows you a list of all open connections and the IP addresses.

To get all information at once, just use the switch -an with the command.

Netstat -an

net user

Windows PCs have the ability to let every user have a different user account with their personal folders, application data, and wallpapers. Net user command on CMD prompt lets you make changes to any account as long as you know their passwords. Additionally, net user lets you create and remove user accounts too. For example, to delete a user, you will have to enter the following:

net user (username) /delete

Do you know About other DOS commands used in Hacking?

Aside from some of these best CMD commands used in hacking, do you know about any other command that may come in handy for people learning to hack? share with us in the comments below…

NEXT STORY: AdBlock vs AdBlock Plus : Which One Should You Use?

Saurabh Tripathi :Saurabh is Founder of Getting Geek and is an all around computer nerd. Currently Saurabh is at his home messing up with some ugly looking code. Send him your Questions, Suggestions and Pizzas at saurabh@GettingGeek.com