Create a Memory Space Eater Trojan Horse with simple c program

Most of us (as a hacker) like to create a Trojan Horse .  Today in this post i am going to explain you how to create a virus which eats the Memory space in your victim Hard Disk Drive.

Characteristics of this Trojan:

This trojan eats 1GB of memory for every 1 minutes.

As a result the the disk gets filled up to 100% with in minutes of running this Trojan.
Once the disk space is full, the Trojan reports that the scan is complete.
The victim will not be able to clean up the hard disk space using any cleanup program.
This is because the Trojan intelligently creates a huge file in the WindowsSystem32 folder with the .dll extension.
Since the junk file has the .dll extention it is often ignored by disk cleanup softwares.
So for the victim, there is now way to recover the hard disk space unless reformatting his drive.

Download the Source code From here


The algorithm of the Trojan is as follows:

1. Search for the root drive
2. Navigate to WindowsSystem32 on the root drive
3. Create the file named “spceshot.dll
4. Start dumping the junk data onto the above file and keep increasing it’s size until the drive is full
5. Once the drive is full, stop the process.

How to compile, test and remove the damage?

To know how to compile read c-program-and-how-to-compile-it.
For more details read this also create-virus-program-to-disable-usb


To test the Trojan,  just run the SpaceEater.exe file on your computer. It’ll generate a warning message at the beginning. Once you accept it, the Trojan runs and eats up hard disk space.

   NOTE: To remove the warning message you’ve to edit the source code and then re-compile it.

How to remove the Damage and free up the space?
To remove the damage and free up the space, just type the following in the “run” dialog box.


Now search for the file “spceshot.dll“. Just delete it and you’re done. No need to re-format the hard disk.

      NOTE: You can also change the ICON of the virus to make it look like a legitimate program. This method is described in the post: How to Change the ICON of an EXE file ?