Some of the most popular anti-virus scanners on the market are open to exploitation according to a security researcher.

Hendrik Weimer, author of Quantenblog, said he had found a way of encoding viruses so they go undetected by most of the scanners he tested.

The exploit involves MIME encoding, which was the subject of serious concern two years ago. Weimer said the trick could be significantly more dangerous than a vulnerability that lets attackers bypass a single virus scanner. "Much rarer are discoveries of new attack classes that are able to blindfold not one but many virus scanners. Here is one," he said in a blog post.

Multipurpose Internet Mail Extensions (MIME) is used to encode emails so that they can be handled by Simple Mail Transport Protocol (SMTP), which is designed to handle text only. Base64 encoding, an encoding method that falls under the MIME standard, uses an alphabet of 64 characters, each representing a previously defined value.

MIME decoders are supposed to ignore characters that aren't part of the defined Base64 alphabet, but Weimer found that such characters inserted in an encoded message could allow dangerous content to bypass a virus filter. "Some virus scanners will happily pass viruses once they come in an unusual but still RFC-compliant encoding," he wrote. "This is even more astonishing given such attacks have already been discussed before."

He had even better success when some levels of multipart/mixed content were wrapped around the malicious attachment. "Then, only one of the six tested virus scanners was able to detect the EICAR file," he wrote. Researchers use EICAR files to test virus scanners. Vulnerable scanners included BitDefender Mail Protection for SMB 2.0, ClamAV 0.88.7, F-Prot Anti-virus for Linux x86 Mail Servers 4.6.61 and Kaspersky Anti-Virus for Linux Mail Server 5.5.10, he said.

F-Secure Anti-Virus for Linux Gateways 4.65 was less vulnerable, as was F-Prot in some situations, while Avast! for Linux/Unix Servers 2.0.0 and Barracuda Spam Firewall (Firmware version 3.4.10.071) weren't vulnerable.

Weimer said a workaround was to use a separate daemon to perform correct MIME decoding, though not all antivirus products provide the command-line scanner necessary for this.

In 2004, information security consultancy Corsaire identified eight ambiguities in MIME that could allow dangerous content to slip past detection systems. The vulnerabilities were widespread and required many rounds of patching.