Sunday, October 09, 2016

Useful DOS Commands related to Internet and Network


nslookup: This command has many functionalities. One is for resolving DNS into IP. Lets say you know the website URL but you don’t know its IP but you want to find it out.
Eg. nslookup www.google.com (www.google.com is the website for which you want to find out the IP)
Now, another really nice function of nslookup is to find out IP of specific Mail Severs

    nslookup (enter)set type=mx (enter)yahoo.com

This command will give you the mail server IP of yahoo.com. You can use whatever server you want and if it is listed on DNS, then you get the IP. Simple, isn’t it? You can send a spoofed email to your friends using the IP address of the mail server.

    net view
    net use
    net use \ipaddressipc$ “” /user:administrator

(this command will allow you to connect to the target as administrator)
Now if you want to connect to the target and browse the entire C drive, then use this command:

    Code:
    net use K: \computernameC$

(this will create a virtual drive on your “my computer” folder)
Please not that this command will only work if the target PC/laptop has not set a Administrator Password.

    net user
    ping
    
This command will allow you to know if the host you pinging is alive, which means if it is up at the time of executing the “ping” command.

tracert : This command will give you the hops that a packet will travel to reach its final destination. This command is really helpful if you know the route a packet takes before it goes to the target box.

arp : This command will show you the arp table. You can find out if anyone has done arp poisoning in your LAN using this command.

    arp -a

route : This command will show you the routing table, gateway, interface and metric.

nbtstat
netstat
This command will show you connection stats

    netstat -a (this will show you all the listening ports & connection with DNS names)

    netstat -n (this will show you all the open connection with IP addresses)netstat -an (this will combined both of the above)


ipconfig : This command will show you a lot of useful things like your IP, Gateway, DNS in use, etc. This command will give all that info but for all networks you might have it.

    ipconfig /allipconfig /release (this will release your IP)ipconfig /renew (this will renew your iP)


No comments: