The commands that we use to create batch files are actually the same commands that were first implemented in MS-DOS (ancient microsoft). These commands DOS(disk operating system) can also be used in a command line window. Whatever your batch file does, you can do it through the command line interface (CLI).
Start “Run” or click [Windows key + R]. Type “cmd” and you will be presented with CLI. You can enter “help” for a list of frequently used commands and their functions. I recommend that you try each individual command that you can find. The hack becomes more and more user-friendly every day, CLI is replaced by GUI (graphic user interfaces), which means that in most places you won’t have to type in commands, you can simply select an option and click a button. But for now, this work is ongoing. With more advanced hacking methods, especially those that include the Kali Linux tools you will find that most hacks are still done with CLI.
Let’s look at a few commands.
md – ( or mkdir) Make a Directory. This command is used to create a directory (folder). Commands:
..will create a folder in the current directory with the name “abcd”.
cd – change the directory (Change Directory). its command is used to change the current directory. The following command:
..will move the program (your batch file) to the root folder and:
..will take you to a folder called Users on your C drive. You can change where you are “mkdir” using “cd”. (Then you can create folders in any directory you like).
Here we have the Folder Blaster virus. Again, this is quite easy to understand. What we do below is create a bunch of folders, open them all at once, and keep them open, effectively capturing most of the screen and memory, making windows lag, hang, and sometimes fall.
@echo off cd ./Desktop md 1 md 2 md 3 md 4 md 5 md 6 md 7 md 8 md 9 md 0 :checkpoint start 1 start 2 start 3 start 4 start 5 start 6 start 7 start 8 start 9 start 0 goto checkpoint
So, let’s start by turning off echo. Then we change the directory to the desktop. Now we create ten folders named 0-9. We set the shortcut and start opening all 10 folders. The last statement now causes an infinite loop. Of course, if a folder is already open, it will not open again. But the use of this infinite loop is that if a user tries to close a folder, the loop still goes on and he sends a message to reopen that folder. This way, the victim will loop because every time he closes a folder it opens again, eventually forcing them to give up and reboot the system. The above code can be made much shorter with loops as described below. We will start by creating a variable and set it to 0. We use this variable as a check so that the computer knows when to exit the loop. First, take a look at the code:
@echo off set /a i=0 :loop if %i%==10 goto end This is iteration %i%. set /a i=%i%+1 goto loop :end
“set” is used to define and initialize a variable. Here we create a variable called “i” and set its value to zero. After setting the label, we check if the value of the variable “i” (asked %i%) 10 and if so, we go to the end of the label (program ends when it happens). Now we “echo” ( send a message) notify the user which iteration is currently running. In the next step, we increase the value of “i” by one and then return to the operator “if”.
This completes the loop ten times (0-9), and then stops. It was not a virus, but a simple program.