Most of you may be curious to know about how to make a Trojan or Virus on your own. Well, here is an answer to your curiosity. In this, post I’ll show you how to make a simple trojan on your own using the C programming language.
This trojan when executed will eat up the hard disk space on the root drive (The drive on which the Windows is installed, usually C: Drive) of the computer on which it is run. Also, this trojan works pretty quickly and is capable of eating up approximately 1 GB of hard disk space for every minute it is run.
So, I’ll call this as Space Eater Trojan. Since this program is written using a high level programming language, it is often undetected by antivirus programs. The source code for this program is available for download at the end of this post. Let’s see how this trojan works:
Before I move on to explain the working of this program, you need to know what exactly is a Trojan horse and how it works. Unlike what many of us think, a trojan horse is not a virus. In simple words, it is just a program that appears to do a favorable task but in reality performs undisclosed malicious functions that allow the attacker to gain unauthorized access to the host machine or cause a damage to the computer.
Now let’s move on to the working of our Trojan:
The trojan horse which I have created appears itself as an antivirus program that scans the computer for malware programs. However, in reality it does nothing other than eating up the hard disk space on the root drive by filling it up with a huge junk file. The rate at which it fills up the hard disk space it too high. As a result, the the root drive gets filled up completely with in minutes of running this program.
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 of the cleanup program. This is because, the trojan intelligently creates a huge file in the Windows\System32 folder with the .dll extension. Since the junk file has the .dll extension it is often ignored by the disk cleanup software. Hence there is now way to recover the hard disk space other than reformatting the drive.
The algorithm of the Trojan is as follows:
-
Search for the root drive.
-
Navigate to %systemroot%\Windows\System32 on the root drive.
-
Create the file named “spceshot.dll“.
-
Start dumping the junk data onto the above file and keep increasing its size until the drive is full.
-
Once the drive is full, stop the process.
You can download the Trojan source code HERE. Please note that I have not included the executable for security reasons. You need to compile it to obtain the executable.
How to compile the program?
For step-by-step compilation guide, refer my post How to compile C Programs.
How to test this trojan horse?
To test the trojan, just run the SpaceEater.exe file on your computer. It will generate a warning message at the beginning. Once you accept it, the Trojan runs and eats up the hard disk space.
How to fix 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.
Please pass your comments and tell me your opinion. I am just waiting for your comments.















I am Srikanth Ramesh, a computer engineer from India.
81 Comments
m0rebel
April 6, 2009 at 6:17 AMSrikanth
April 6, 2009 at 8:42 AMSushant
April 6, 2009 at 11:43 AMAghaamou
April 6, 2009 at 12:23 PMRafay Baloch
April 6, 2009 at 3:09 PMemmet
April 6, 2009 at 6:14 PMPoppernut
April 7, 2009 at 4:06 AMSrikanth
April 8, 2009 at 3:29 PMNeel
April 7, 2009 at 3:04 PMKapil Kaushal
April 7, 2009 at 5:21 PMSrikanth
April 8, 2009 at 3:27 PMVirendra
April 9, 2009 at 1:55 PMrathik
April 10, 2009 at 8:34 AMSuman
April 10, 2009 at 5:02 PMishan
April 10, 2009 at 8:39 PMPIYUSH
April 11, 2009 at 12:04 AMavi
April 13, 2009 at 1:31 AMSrikanth
April 13, 2009 at 10:31 PMPIYUSH
April 14, 2009 at 11:46 AMSrikanth
April 15, 2009 at 12:20 AMema
April 15, 2009 at 1:18 AMSrikanth
April 18, 2009 at 3:52 PMdarkterror
April 15, 2009 at 1:33 PMSrikanth
April 18, 2009 at 3:51 PMGideon
April 15, 2009 at 7:12 PMdps
April 16, 2009 at 8:05 AMdarkterror
April 20, 2009 at 1:34 PMSrikanth
April 21, 2009 at 9:19 AMjonty
April 20, 2009 at 2:33 PMMishra_90
April 21, 2009 at 5:35 PMdarkterror
April 22, 2009 at 11:56 AMaditya
April 22, 2009 at 3:20 PMSrikanth
April 22, 2009 at 10:47 PMzerocool
April 22, 2009 at 6:26 PMscratchlikeme
April 24, 2009 at 5:39 PMarun
April 24, 2009 at 8:18 PMsau
April 25, 2009 at 5:08 PMSrikanth
April 26, 2009 at 10:23 AM???Guy
April 26, 2009 at 9:27 AMjatin jain
May 2, 2009 at 11:17 PMHUMPTYdUmPtY
May 5, 2009 at 3:20 PMSrikanth
May 6, 2009 at 11:23 AMMuhammad jamil
May 7, 2009 at 12:25 AMsam
May 7, 2009 at 11:41 AMakshay
May 7, 2009 at 8:27 PMRishi Sangal
May 11, 2009 at 9:48 PMSrikanth
May 11, 2009 at 10:23 PMdoofus
May 12, 2009 at 10:24 AMSrikanth
May 12, 2009 at 3:04 PMdien nguyen
May 12, 2009 at 9:20 PMRohit Kumar
May 20, 2009 at 1:57 AMSrikanth
May 21, 2009 at 7:04 AMmaster unais
May 23, 2009 at 8:06 AMparas
May 25, 2009 at 5:53 PMAryan
May 25, 2009 at 6:52 PMvikas kottari
May 31, 2009 at 3:02 AMfanofyours
June 2, 2009 at 10:42 PMcindy
June 3, 2009 at 2:49 AMx-boy
June 9, 2009 at 7:56 PMakash
June 14, 2009 at 10:57 AManonymous
June 15, 2009 at 3:09 PMARJIT
June 15, 2009 at 4:43 PMjohn
June 18, 2009 at 11:37 AMSrikanth
June 22, 2009 at 8:12 AMkarthik
June 21, 2009 at 9:42 AMBill
June 24, 2009 at 9:36 AMSrikanth
June 24, 2009 at 4:17 PMAmit
June 26, 2009 at 5:22 PMIrena
July 1, 2009 at 9:18 PMSantanu
July 2, 2009 at 12:23 AMsam
July 4, 2009 at 1:32 PMHarjyot
July 4, 2009 at 10:37 PMSantanu
July 5, 2009 at 2:13 AMxeno
July 13, 2009 at 11:18 AMPArth
July 16, 2009 at 2:07 PMali sofi
July 17, 2009 at 2:16 AMjames
July 18, 2009 at 8:21 AMSONU
July 19, 2009 at 10:49 AMNINAD
August 5, 2009 at 9:47 PMhitler
August 6, 2009 at 2:59 PMram
August 14, 2009 at 4:16 PM