How do I test a virus scanner?

Updated: 06/30/2020 by Computer Hope

No one wants to infect their computer to make sure their antivirus scanner is properly working. The steps below help you create an EICAR test virus that assures you your antivirus program is working by finding the test virus and deleting it.

Note

This test virus is non-viral and will not damage your computer or its data in any way.

How to create a test virus

  1. Create a new text file using Notepad or any text editor.
  2. Open the text file and enter the below code as the text of the file.
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
  1. After the above code is entered, save the file as an .exe file instead of a .txt file. For example, name the file test.exe instead of test.txt. Alternatively, you can save the file as a .txt file and then rename the file after it's saved.
Note

For this to work, you must have Windows showing the file extensions. By default, Windows may be trying to save the file as a .txt file even if you end your file with .exe. For example, the file may be saving as test.exe.txt instead of test.exe. If, after saving or renaming the file the icon still looks like a notepad, it is not being saved as an executable file. To enable file extensions, see: How to view a computer file extension.

  1. After the file is saved the antivirus should immediately prompt for action, similar to what is shown below. If you do not receive a prompt try highlighting the file, and then right-click and choose the option to scan the file with your scanner.

Virus warning box

If, after following the above steps you do not receive a warning, your virus scanner is either not enabled or not working properly. We highly recommend either reinstalling the installed antivirus scanner, or trying a different one.