Windows command line tutorial[part1]

Are you guys penetration tester , system administrator? How much is your windows command line knowledge? Hey don’t start laughing ;). As a expert system administrator you must have some command line knowledge and if you are a Penetration tester then this is your first way …. No?
Anyway, I will try to write most of windows commands which may help you too. But Remember that I will not explain in details Because this may take very long time so you should try practically(VMware installed?). Hope you have some good logic too(If not then how we think like a Genius ?? hehe) . 
Think these are practical example then tutorial which you need to yourself practically.

Hope you know how to open the cmd.exe(Start>>Run>>cmd . And Hit ENTER).

If you type ‘help’ then you will get all possible command to execute . But do you exactly know how to work with these command effectively?
If you want to open another cmd then just “cmd” or “start” command.
Make a directory:
mkdir c:admin
change to the directory:

deleting a file:
del c:webindex.asp
reading from command line :
type c:adminsome.txt
writing a file:
echo “<html>” > test.html
echo “<body>”>>test.html
echo “<p>this is test as a system admin</p>” >>test.html
echo “</bdoy></html>” >>test.html
now try to see the file “type test.html
removing a directory:
rmdir c:admin or rmdir /S c:adminto removing the directory.
Many garbage in your console so clear :
How many directory ?:
See how many directory in the current directory.

see how many directory into C:windowssystem32.
dir “c:windowssystem32”
Hidden Directory:

 See the all directory in a specified path.
dir /aHD c:windowssystem32 

Copy a file:
copy c:win.inic:adminherewin.txt 

for directroy or file.
xcopy e:somedirectory f:somewherecopy

removing directory:
moving a file permanently and renaming:
error redirecting:
app.exe 2>error.txt
Open the error.txt “type error.txt” or notepad “error.txt”
Multiple command:
move filetomove c:path|| telnet 80
anycommand || dir || more-command
type somefile.txt & cmd.exe or type somefile.txt && cmd.exe
paginate long output:
dir c:windowssystem32 | more    (You have to hit enter)
local time:
time || exit (See time , set time and exit the cmd)

1 thought on “Windows command line tutorial[part1]”

  1. Wow this is nice.. Really every penetration tester should have the command line knowledge.

    Thanks for sharing and waiting for second part.

Leave a Comment

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