Oct 26, 2018
141 Views
0 0

Windows CMD Remote Commands for the Aspiring Hacker, Part 1

Written by
Welcome back, my greenhorn hackers!Many new hackers come from a Windows background, but seldom, if ever, use its built-in command-line tools. As a hacker, you will often be forced to control the target system using just Windows commands and no GUI.Although we would love to get Metasploit’s Meterpreter on the target and use all its capabilities on the owned system, that is not always possible. Some exploits will only allow us to get a CMD shell on the target Windows system.

In these cases, you will need to understand how to control the system strictly through the command prompt, without ever having the convenience and familiarity of the Windows GUI.

What I want to do in this tutorial is demonstrate some Windows commands on a Windows 7 system (Windows 7 is still over 50% of the installed base of Windows systems), but these commands change very little from Windows version to Windows version. I will be running the Windows commands from a remote Kali system on the target.

Step 1Connect to a Remote Windows System from Kali

Windows makes a distinction between commands that can be run while physically on the system and those that can be run remotely. We can’t assume that a command we can run while on the system will run remotely.

Here, we are only interested in those that can be run remotely. In my case, I will be connecting to the target system with a Netcat connection, but a Metasploit-spawned command shell or other will work just as well.

Step 2Basic Commands

In many ways, Windows CMD commands are similar to Linux/Unix commands (Unix preceded these commands by over a decade, and Microsoft borrowed heavily from it). At its most basic, we need to change directories within the file system. Like Linux, Windows uses the cd (change directory) command. To travel to the root of the directory system, we can just type

READ ALSO  How are changes made to Bitcoin ? Understanding Bitcoin Improvement Proposals - BIPs !

cd \

In addition, we can move up one level in the directory structure by typing:

cd ..

If we want to see the contents of a directory, we type dir as seen above. Some other key and basic commands include:

del <filename>

This will delete the file, similar to the Linux rm.

type <filename>

This will display the contents of the file, similar to the Linux cat.

As you can see below, I used type to display the contents of the confidentialfile.txt. I then del (delete) the confidentialfile.txt, and when I return to display the contents of it again, I get the message that “The system cannot find the specified file.”

To create a new directory, we use the md (make directory) command (in Linux, it’s mkdir). To create a directory named “newdirectory,” we type:

md newdirectory

After making newdirectory, we can now run dir and see the new directory that we created.

Step 3Network Commands

When we are on the remote system, we may need networking information. To do so, we have two basic commands, ipconfig and netstat. Ipconfig is very similar to the Linux ifconfig, as seen below.

To view the network connections of the system, we can type netstat, just like in Linux.

netstat

Step 4View Processes

Often, when we are on a remote system, we will need to see a listing of the running processes. From the GUI, of course, we can use the Task Manager (Ctrl + Alt + Del), but from the command prompt, we use tasklist.

tasklist

If we want to find a single process, we could use the filter findstr (find string). This works similarly to grep in Linux. So, to find the process named “explorer,” we could type:

READ ALSO  Hack to Learn and Not learn to Hack

tasklist | findstr explorer

Note, that we used the pipe (|), just like in Linux, to send the results from the tasklist command to the filtering command, findstr.

If I want to kill a process, I can use the taskkill command. It requires the PID of the process we want to kill. In this case, the explorer process has a PID of 1532, so to kill it, I can type:

taskkill /PID 1532 /F

Where the /F means to force the kill.

Step 5Find the User Accounts

If we want to see the users on the target system, we can type:

net users

As you can see, this system has three users: guest, administrator, and the aptly named victim.

Step 6Run a Browser on the Target

While operating the system from the command prompt, we can execute some applications, such as the web browser. Internet Explorer is named iexplore on the command prompt, and we can find it either in the “Program Files” with the 64-bit version or “Program Files (x86)” with the 32-bit version. So, if I want to open Internet Explorer on the remote system from the command prompt and have it open techandsecurity.net, I would type:

cmd “start /max iexplore.exe http://techandsecurity.net

 

When we do, this opens Internet Explorer on the target system and goes to techandsecurity.net, as you can see below.

This might be really useful if you had a malicious XSS link set up and needed the target to go to a web server. Furthermore, we might just want the target system to go to our web server on Kali. We could start the Apache web server and then direct the target system to our web server where we may have some malicious software.

READ ALSO  How to Scan for Vulnerabilities with Nessus

We can type:

iexplore <IP address>

As you can see below, we have directed the target system to our web server on Kali.

Keep coming back, my greenhorn hackers, as we develop the most valuable skill set in the 21st century—hacking!

Now We Are In Whatsapp You May Reach Us Via Link Below In My Profile Box.

Article Tags:
· · · · · · · ·
Article Categories:
Master Hack
http://techandsecurity.net

CEO & FOUNDER OF" FIVE RIVERS INCORPORATION - LEADING SOFTWARE & CYBER SECURITY DEVELOPMENT COMPANY" || CERTIFIED ETHICAL HACKER || FUTURE TRILLIONAIRE || FUTURISTIC || "DULL SCHOOL STUDENT" || (Follow this link to message me on WhatsApp: https://wa.me/13018426470)

Comments to Windows CMD Remote Commands for the Aspiring Hacker, Part 1

  • Pingback: How to Create an Undetectable Payload - Hack macOS Like Pro - Tech and Security

  • Buy Roaccutane Online Uk Order Valtrex Online With No Prescription Viagra E Doping [url=http://cialibuy.com]cialis for sale[/url] En Ligne Priligy Generique Hair Growth Propecia Treatment Is Trazodone Available In Australia [url=http://durazy.com]viagra[/url] Cialis Viagra Otros Cheap Diflucan No Prescription Wellbutrin Online Overnight No Rx [url=http://buygenericvia.com]online pharmacy[/url] Viagra Falschungen Nebenwirkungen Cialis 10 Mg Preise Bentyl Cod Only Low Price Levitra Preis Apotheke [url=http://cialgeneri.com]where to buy cialis online safely[/url] Viagra Online Next Day Shipping Viagra Cialis Levitra Prezzi Cialis Duracion Efecto Cialis For Daily Use Cost 338 [url=http://try-rx.com]cialis cheapest online prices[/url] Discovering Amoxil Amoxicillin Sensitivity To Light Sun Exposure Levitra Safe [url=http://ciali20mg.com]cialis 20mg price at walmart[/url] Amoxicillin Use

    JeaInorse December 27, 2018 3:03 am Reply
  • Canadianmed24h [url=http://leviinusa.com]where to get levitra[/url] Buy Finasteride North Ayrshire Acheter Viagra Par Paypal Acquisto Viagra Forum Cialis 10 Mg Medicament [url=http://aaost.com]viagra vs cialis[/url] Can I Take An Extra Keflex Healthy Man Pills Amoxicillin Uses Buy Strattera Online [url=http://ciali20mg.com]cialis overnight shipping from usa[/url] Cephalexin Without A Prescription Zithromax More Drug Side Effects Cialis 20 Mg Internet Viagra Sur Femme [url=http://rxbill6.com]levitra 20mg best price[/url] Amoxicillin Dental Appointments Order Now Macrobid [url=http://cure-rx.com]canadian pharmacy cialis 20mg[/url] Achat Levitra Medicament Tomar Viagra Mujeres Levitra Effets Secondaires

    JeaInorse January 14, 2019 12:00 pm Reply
  • Cephalexin Cat Dosage [url=http://clanar.com]generic viagra[/url] Levitra Every Day Erectile Dysfunction Medications Online

    JeaInorse January 19, 2019 7:50 am Reply
  • Ebay Precio De La Ciales [url=http://cialusa.com]where to buy cialis online safely[/url] Over The Counter Sex Pills In Canada

    JeaInorse January 27, 2019 8:35 am Reply
  • Finasteride Find [url=http://kamagorder.com][/url] Viagra Dopage Viagra Indicaciones De Uso Buy Viagra Uk Tesco 247 Buying Discount Secure Ordering Acticin Pills Store [url=http://fzlaka.com]cialis 5 mg best price usa[/url] Sildenafil Generique 25 Mg Cheap Keflex Viagra Achat 10 Pilule Buy Levitra Without Prescription [url=http://cialcost.com]canadian pharmacy cialis[/url] Propecia Vendita Buy Propecia Super Active Plus [url=http://lapizmoon.com]viagra vs cialis[/url] Priligy Dapoxetina Precio Buy Viagra In Brisbane 58 [url=http://buycheapciall.com]cheapest cialis 20mg[/url] Cheap Viagra Kamagra From The U.K Elocon 5g Elocon Cream

    JeaInorse February 5, 2019 10:49 am Reply
  • Pingback: Free UK Chat Rooms

  • Pingback: ts escort

Leave a Reply

Your email address will not be published. Required fields are marked *

Share