In this post I will show you how to create a virus that will restart the computer at every startup. That is, upon infection, the computer will get restarted every time the system is booted. As a result, the computer will become inoperable since it reboots as soon as the desktop is loaded.
For this, the virus needs to be executed only once and from then on, it will carry out rest of the operation on it’s own. I have programmed this virus using the C language. If you are familiar with the C language then it is too easy to understand the logic behind the coding. The code is not posted here in this article, but you can download it from the link below.
Compiling the source code into an executable module:
- Download the Source Code Here
- UnRar the file and you should see the source code: Sysres.C
- For a step-by-step compilation guide, refer my post: How to compile C Programs.
Testing and removing the virus from your PC:
You can compile and test this virus on your own PC without any fear. To test, just double-click the sysres.exe file and restart the system manually. From now on, every time the PC is booted and the desktop is loaded, your PC will restart automatically again and again.
It will not do any harm apart from automatically restarting your system. After testing it, you can remove the virus by following the below mentioned steps:
- Reboot your computer in the SAFE MODE
- Go to:(%systemroot% can be C,D,E or F)%systemroot%\Windows\System
- You will find a file by name sysres.exe, delete it.
- Type regedit in run. You will go to the registry editor. Here navigate to:HKEY_CURRENT_USER\Software\Microsoft\Windows\ CurrentVersion\Run
There, on the right site you will see an entry by name “sres“. Delete this entry. That’s it. You have now removed this virus successfully.
Logic Behind the working of this virus program:
If I do not explain the logic(Algorithm) behind the working of the virus program, I think this post would become an incomplete one. So I’ll explain the logic in a simplified manner without getting much into the technical aspects of the program. If you have further doubts, you can pass your comments.
LOGIC:
- First the virus will find the Root partition (Partition on which Windows is installed).
- Next, it will determine whether the virus file (sysres.exe) is already copied into %systemroot%\Windows\System
- If not it will just place a copy of itself into %systemroot%\Windows\System and makes a registry entry to put this virus file into the Windows startup.
- Or else if the virus is already found in the %systemroot%\Windows\System directory (folder), then it just gives a command to restart the computer.
This process is repeated every time the PC is restarted.
How to change the icon of the executable module (This step is optional)
After you compile, the sysres.exe file that you get will have a default icon. If you send this file to your friends they may not execute it since it has a default ICON. So it is possible to change the ICON of this Sysres.exe file into any other ICON that is more trusted and looks attractive.
For example, you can change the icon into Norton antivirus ICON itself so that the people seeing this file believes that it is Norton antivirus. Or you can change it’s ICON into the ICON of any popular or trusted programs so that people will definitely click on it.
The detailed tutorial on changing the ICON is given in my post How to Change the ICON of an EXE File .






I am Srikanth Ramesh, a computer engineer from India.
79 Comments
Srikanth
October 27, 2008 at 6:23 AMPoppernut
October 27, 2008 at 1:57 AMPoppernut
October 28, 2008 at 12:04 AMSrikanth
October 28, 2008 at 6:09 AMPoppernut
October 28, 2008 at 9:03 PMPoppernut
October 28, 2008 at 9:13 PMSrikanth
October 29, 2008 at 7:34 AMPoppernut
October 29, 2008 at 10:50 PMSrikanth
October 30, 2008 at 6:59 AMAnonymous
October 30, 2008 at 7:33 PMUriel
November 11, 2008 at 6:54 AMSrikanth
November 11, 2008 at 1:27 PMUriel
November 11, 2008 at 3:48 PMSrikanth
November 11, 2008 at 5:41 PMAnonymous
November 18, 2008 at 8:08 AMC J Chua
November 19, 2008 at 5:36 PMSrikanth
November 20, 2008 at 7:11 AMil-muxu
November 25, 2008 at 7:58 PMSrikanth
November 26, 2008 at 1:31 PMil-muxu
November 26, 2008 at 4:43 PMyuvaraj
December 14, 2008 at 8:26 AMSrikanth
December 14, 2008 at 11:49 AMMobin
December 16, 2008 at 7:03 AM27
December 16, 2008 at 7:12 AMSrikanth
December 16, 2008 at 11:18 AMVISHAL
December 17, 2008 at 12:49 PMSrikanth
December 17, 2008 at 3:57 PMjody
December 17, 2008 at 10:15 PMZals
December 18, 2008 at 10:36 PMSrikanth
December 18, 2008 at 11:41 PMVISHAL
December 19, 2008 at 12:30 PMSrikanth
December 19, 2008 at 7:46 PMvishal
December 22, 2008 at 5:08 PMvishal
December 22, 2008 at 5:09 PMSrikanth
December 23, 2008 at 12:14 AMraf
December 25, 2008 at 1:56 AMjets
December 26, 2008 at 10:18 PMSrikanth
December 26, 2008 at 10:21 PMjets
December 26, 2008 at 10:55 PMnaggappan
December 30, 2008 at 11:14 PMSrikanth
December 30, 2008 at 11:40 PMSlim0123
December 31, 2008 at 12:41 AMSrikanth
December 31, 2008 at 12:21 PMraj
January 10, 2009 at 10:05 PMSrikanth
January 11, 2009 at 12:06 PMShaan
January 14, 2009 at 2:25 AMSrikanth
January 14, 2009 at 10:29 AMPoppernut
January 15, 2009 at 3:27 AMvishal
January 15, 2009 at 5:40 PMSrikanth
January 15, 2009 at 6:27 PMJiyar
January 17, 2009 at 1:48 AMNilesh
January 25, 2009 at 12:29 PMav
January 26, 2009 at 5:58 AMJoel
January 27, 2009 at 10:25 PMNilesh
January 28, 2009 at 3:41 PMMonik
February 6, 2009 at 7:19 PMricky
February 13, 2009 at 3:09 PMRajiv
February 14, 2009 at 5:26 PMzeroday
February 15, 2009 at 3:02 AMnik
February 17, 2009 at 12:37 PMsid
February 20, 2009 at 5:49 PMDaniel Tatsuki
February 24, 2009 at 8:30 PMKarthik
March 3, 2009 at 6:51 PMSrikanth
March 5, 2009 at 2:33 PMAnmaya
March 13, 2009 at 4:02 PMSrikanth
March 13, 2009 at 9:26 PMjohn
March 21, 2009 at 12:10 PMSrikanth
March 21, 2009 at 7:37 PMDhiraj Singh
March 23, 2009 at 8:27 PMSrikanth
March 24, 2009 at 1:12 PMDhiraj Singh
March 23, 2009 at 9:50 PMSrikanth
March 25, 2009 at 8:18 PMDhiraj Singh
March 24, 2009 at 5:43 PMDhiraj Singh
March 24, 2009 at 7:40 PMShashank
March 30, 2009 at 10:34 AMMithunRulz
April 8, 2009 at 10:37 AMMithunRulz
April 8, 2009 at 10:39 AMHrithik
April 9, 2009 at 7:33 PMRaj Singh
April 13, 2009 at 1:00 AM