The EICAR test file is a harmless 68-character text file that antivirus vendors have agreed to detect as though it were malware. It contains no viral code. It exists so you can confirm that a scanner is installed, reachable and reporting correctly, without handling real malware to do it.
What it actually is
The file is a single line of printable ASCII, published by the European Institute for Computer Antivirus Research in cooperation with the Computer Antivirus Research Organization. It was originally written by Paul Ducklin, refined in May 2003 by Eddy Willems with vendor input, and adapted again in September 2006.
Two properties make it useful. It is a valid DOS executable, so it is a real program rather than an inert string, and everything it does when run is print the line EICAR-STANDARD-ANTIVIRUS-TEST-FILE! to the console. And because it is made only of printable characters, you can type it, paste it or generate it in code without any special tooling.
Engines flag it because vendors deliberately added it to their signature sets, not because it poses any risk. That agreement is the whole point: it gives everyone a shared, safe trigger.
Using it to test an upload pipeline
If your application accepts files from users, the question worth answering is not whether you have integrated a scanner but whether that integration is actually live in the environment you are looking at. This is where EICAR earns its place, because a broken integration and a clean file look identical from the outside.
Microsoft documents the same technique for validating endpoint protection, and the principle carries over directly. Upload it exactly as a user would, through your own form or API, and check three things: that the file is rejected or quarantined, that the rejection is recorded somewhere you can see it, and that the caller receives whatever your contract says they should receive. Plenty of pipelines pass the first check and fail the third, returning a generic error that gives the user nothing to act on.
EICAR publishes four variants, and the differences between them are the interesting part:
eicar.com(68 bytes): the bare test file. Confirms the scanner is reachable at alleicar.com.txt(68 bytes): the same content with a text extension. Confirms your pipeline inspects content rather than trusting the extension, which is the same principle behind checking magic bytes rather than file nameseicar_com.zip(184 bytes): the file inside an archive. Confirms your scanner opens archiveseicar_com2.zip(308 bytes): a ZIP within a ZIP. Confirms how many layers deep it is prepared to look
That last one is the test most pipelines quietly fail. A scanner configured to inspect one archive layer will pass the double-zipped file straight through, and you will not discover that until something real arrives packaged the same way.
What it proves, and what it does not
EICAR tests the plumbing. It confirms that a request reaches a scanner, that a verdict comes back and that your application does something sensible with it. Given how often a scanning step is quietly disabled in one environment and not another, that is genuinely worth confirming on every deployment.
What it cannot tell you is how your defences behave against something unfamiliar. It is one known signature that every engine has agreed to match, so it exercises the lookup path and nothing else. It says nothing about an unknown threat, a polyglot file that is valid as two formats at once, or a zip bomb that is perfectly benign until you decompress it.
Nor does it exercise sanitisation, which rebuilds a document from its safe components rather than matching it against known signatures: our guide to content disarm and reconstruction covers that distinction. And it will not tell you what happens when the scanner is unavailable, which is a separate and more consequential decision. Whether an upload is accepted or refused during an outage is a choice about failing open or failing closed, and it is worth making deliberately rather than discovering it during one.
Handling it safely
Your own machine will react to the file, which is the one practical annoyance. Endpoint protection normally quarantines it the moment it touches disk, so keeping a copy in a test fixtures folder tends not to survive contact with a real laptop.
Two approaches work well. Generate the 68-character string in memory inside the test itself, so nothing is ever written to disk, or keep test copies in a path your endpoint policy explicitly excludes. The first is cleaner and travels better through continuous integration.
EICAR is direct about the terms: you download the files at your own risk, and if one gets stuck in quarantine that is a conversation with your antivirus vendor rather than with EICAR. Nothing about the file is dangerous, but the tooling around it will treat it as though it were, which is exactly the behaviour you are testing for.
Testing the pipeline is the easy half. Deciding what should happen to a document that is suspicious rather than known-bad is the harder one. The Red Eagle Tech CDR API rebuilds documents from their safe components rather than waiting for a signature to match, so users get a working file back instead of an error. You can see what it does and be running in a few minutes, entirely self-service.