How to make Harmless viruses using Notepad

hacker making harmless viruses
  • Post author:
  • Post category:How to
  • Reading time:8 mins read

We all know about viruses and how much damage they can do to organisations and computer systems. But it is not necessary for a virus to be harmful. You can also make simple and harmless viruses and use them to play pranks on your friends or use them for educational purposes. To make them, all you need is the Notepad application in your computer. 

Below we have listed how to make simple and harmless viruses just by using notepad. All of these virus files can be transferred or copied to other computers easily via means of data transfer. 

CD/DVD Drive Eject virus

This is a simple and harmless virus that will cause the CD/DVD drive of a computer to eject continuously. To make this virus, open notepad in your computer and paste the following code in it:

Set oWMP = CreateObject(“WMPlayer.OCX.7”)

Set colCDROMs = oWMP.cdromCollection

do

if colCDROMs.Count >= 1 then

For i = 0 to colCDROMs.Count – 1

colCDROMs.Item(i).Eject

Next

For i = 0 to colCDROMs.Count – 1

colCDROMs.Item(i).Eject

Next

End If

wscript.sleep 5000

loop

Now save this file with a .vbs extension (e.g., cd-drive-virus.vbs) and change the file type to All Files option.

cd drive eject virus

To stop this virus, simple open the Task Manager. Under the Processes tab, click on wscript.exe file and end this task by clicking the button at the bottom right corner.

Fake Virus to test your Anti-Virus

You can make a totally harmless and fake virus to test the security of your anti-virus software. A working anti-virus software will automatically detect this fake and remove it (or quarantine it). To make this fake virus, open notepad and paste the following code in it:

X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

Now save this file as EICAR.COM and change the File Type to All files. After you click the save button, the anti-virus software will automatically detect it. For example, if you use Avast Anti-Virus, the following window will appear after this file is detected:

Eicar virus detected by Avast anti-virus

Stop Someone’s Internet Access using Virus

You can make a script using your notepad to stop someone’s internet. In simple words, this virus actually causes the computer to temporarily drop its IP address which is being used to access the internet. To make this virus, open notepad and paste the following code in it:

@Echo off

Ipconfig /release

Now save the file with a .bat extension and change the File Type to All Files before saving.

disable internet using virus

To solve this and make the internet work again, simple open command prompt and type ipconfig/renew in it and hit enter. Your computer will be configured with a new IP address to communicate on the internet.

Shutdown Computer using Virus

You can force shutdown the computer using a simple virus. Before shutdown you can also display a message to be displayed and also set a timer after which the computer will be shut down.

Open notepad and type in the following in it:

shutdown.exe -s -t 30 -c “You only have 30 seconds!”

Using the above code, the computer will shutdown in 30 seconds and the message “You only have 30 seconds!” will be displayed. You can change this according to your need. To cause immediately shutdown, change the number 30 to 00 in the code.

Finally save your file with a .bat extension and change the File Type to All Files.

computer shutdown harmless virus save menu

Important Note: Even though this virus is itself harmless, but it causes forced shutdown. So, remember to save all your work before activating it to avoid losing any unsaved data in any opened application.

Continuously change Caps Lock

You can make the Caps Lock Button to continuously turn on and off without even touching that key. This would not allow the user to type properly. Moreover, the caps lock light will also continuously light on and off showing the effect of this virus.

Open notepad and paste the following script in it:

Set wshShell =wscript.CreateObject(“WScript.Shell”)
do
wscript.sleep 150
wshshell.sendkeys “{CAPSLOCK}”
loop

Then save the file with a .vbs extension and change the File Type to All Files.

Caps Lock toggle harmless virus save menu

To stop the Caps Lock from toggling, open Task Manager and find wscript.exe under the processes tab. Select it and click on the End Task button in the bottom right corner.

Flood Windows on the Monitor:

You can make a simple virus which will cause new windows to continuously appear on the computer. This will continue until the computer runs out of memory and eventually crash.

Paste the following code in Notepad:

:a

start %0

goto a

Then save the file with a .bat extension and change the File Type to All Files.

flood windows using harmless virus

To disable this virus, just restart/shutdown the computer.

Continuous Enter Button Pressed

A simple virus can be made to keep the Enter button pressed. Open Notepad and paste the following code in it:

Set wshShell = wscript.CreateObject(”WScript.Shell”)

do

wscript.sleep 100

wshshell.sendkeys “~(enter)”

loop

Save the file with a .vbs extension and change the File Type to All Files.

To stop the Enter to be endlessly pressed. Open Task Manager and end the task named wscript.exe under the Processes Tab.

Leave a Reply