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.