Saturday, December 19, 2009

BAT files

Bat files are kind of executable file type which has heavy use In Windows operating system. By using the bat files we are able to execute a list of dos scripts in ordered pattern, so when this going to be useful to us??? As you mite guessed by now the applications are only limited by the sky. Think if you want to delete certain type of files every time you log off or you want to perform same actions when you log in to the system, the easiest why to handle about tasks are using bat files. If not you will have to produce compliable program using some compiler programming langue like c or c++ which is not easy as it sounds.

So how we are able to create those BAT files?

Hi guys, in this lesson ill guide you through the world of *.bat files, which are very use full in dealing with the viruses .ill rather focused in practical scenario rather than boring theatrical stuff.

First if you never heard of the name BAT files (Not BAT man), there are kind of excitable files just like *.exe,*.scr,*.com. That means you can put some instructions in this files and if some donkey who clicks on the file will execute the instructions you had put in them (for EX: erase the C:\ drive).

That s not the best part of BAT files, there are very easy to handle and maintain comparing with there counter parts like EXE s. To create a bat file you only need a notepad (Or program creating plan text)
and little bit of knowledge(if you know DOS ).

Ok enough of instruction shit! , Lets make our first BAT file.

For the first application lets make a program which hides all the files and folders in the current directory

1. open NotePad.exe (or program creating plain text files)

2. put following coding in the notepad

Attrib +a +s +h +r /s /d

3. Save the file as viruses.bat in any path you like.

4. Run the file and check what happen to the files and folders in current folder.

OK up to now I think that you have some kind of idea of the thing we are dealing with so now I present some explanation of the program we just have created, as the first time ill make this as simple as possible and with the time you don’t have to spend you r time on this explanation part (Very good so I don’t have to write all this stuff).

All this commands are related to DOS OS & also applicable in the Cmd .exe in Windows XP so I sagest to test those commands in the cmd.exe and get some experience on the thing.

Attrib: Is used to get the current attrib of file or folder, e.g. if you use “arrtib New Folder” in cmd.exe, it will return the current attribs of the folder. But if you used the “Attrib” command with some parameters like s, r, h, a you can set the folder /file attrib in to new values.

Attrib +h New Folder: Makes your New Folder to be hidden.

Attrib -h New Folder: Makes your New Folder to be Unhidden.

So as that

S: for set the system attrib.

R: for set the Read only attrib.

A: for set the archive attrib (use full in using Xcopy command).

/S: apply the attrib to the all the files, including files in sub folders.

/D: apply the attrib to all the folders (but only used with the /s command).

Future we discussed above is frequently used by the many popular virus we encounter in our day today life, most probably you have seen some times after virus attack you cant see the files and folders in drives but the space allocated to those files are remain, Those virus use simply above or similar procedure to change the attribs of the files and now you are occupied with knowledge to overcome the problem.

With the knowledge we gathered today, we are now ready to go a head with the BAT file technologies, so proceed with the tutorial. In the next part we will discuses more on the subjects associated with the virus technologies.

Virus Writers Handbook

Hello there, great to have you here.

Form the college days, which we used to write tiny virus with Turbo Pascal (don’t laugh) in 2002, and up to now I have almost around 7 years of relationship with the virus programming. If you are new to this field you will get to know that there is very much lack resources are available for the subject even in the WWW. The main reason for this is the way people think about the virus, most think them as evil and must be avoided as possible, but is it? If you get to know viruses you will understand, It’s not about destruction (as most would say) its all about exploration and challenges, and virus programmers are some kind of hackers who thinking out of the box for alternative solutions for regular problems.
Then, in the following chapters I will guide you from the very basics to advance topics about the viruses.
So without any more talking lets step in to the world of computer viruses.
What you need to start
Virtually Nothing (no kidding), you will only need an simple text editor (most of you already have one) to complete most the tutorial and I have made no assumptions about your knowledge on the programming, I have tried my best to keep things simple as possible and you will require no previous knowledge about any programming language ether.
You can use any kind of text editor for this as long as it produced plain text, for example Notepad in windows. (if you are using Win word be sure to save the files as *.txt format)
Downloads
With the tutorial I have provide you a bunch of executable programs which you can downloaded and test in your local environment, all those files are simulation programs and not real virus at all (don’t fear to check them out!)
What you find in the tutorial
In the tutorial I have combined many of useful topics of the subject, if you are newbie or pro, you will find things useful to you here. There is no defined structure through out the tutorial so you are free to skip any section as you wish (it’s up to you).
So get ready to jump in to the world of gladiators …