Closed Pierre-Gronau-ndaal closed 2 months ago
https://www.virustotal.com/gui/file/9411926ba4f3329336b10b3022e70fda0022727e1cb0a23be2784a2cb9a5e211 only unknown antivruses detected also idea so amazing because you also showing code to detect that.
@Pierre-Gronau-ndaal This is not how EICAR is intended to be used.
Please see my explanation here: https://github.com/Cisco-Talos/clamav/issues/1277#issuecomment-2139686994
I did that with real malware as well ! Other vendors recognize it and sorry ClamAV not. It seems that you have in your code a switch for looking of EICAR hashes and this is maybe not the best way …
You can try it by yourself with the following sample
https://github.com/wicar/malware.wicar.org/blob/master/data/vlc_amv.html
https://www.virustotal.com/gui/file/6814c3d7e1d9741555d4bf3d8274a17d838db7be49c0d7a9d6b74bfc15f3a5dc
do you think that the intruders will follow your rules ?
I feel like the hare and the hedgehog and I don't know if I'm the hare
ClamAV is very pedantic about following the eicar detection rules in particular. Some ~7 years ago we had complaints that ClamAV was detecting eicar too easily.
We have a single hash sig for the unmodified eicar, and then have a bytecode signature in bytecode.cvd that matches the eicar pattern plus on allowed variations where whitespace (the space character, tab, LF, CR, CTRL-Z) is added at the end, up to 128 characters.
No other variation is allowed for whole-file eicar detection, although eicar should be detected if attached as a file to a container file, such as included in a zip, attached to an email, attached to an office document, etc.
Other clamav malware detection signatures vary. We don't use hash-based sigs as much as we used to. Most of them are content-match signatures. Most of them are limited to specific target types (roughly equivalent to a file type), which means that changing the magic bytes may prevent the signatures from matching, although some match on any file type.
If you're interested in learning more about clamav signatures, we have documentation here https://docs.clamav.net/manual/Signatures.html
thanks for your words …
I looked on your statement: We have a single hash sig for the unmodified eicar, and then have a bytecode signature in bytecode.cvd that matches the eicar pattern plus on allowed variations where whitespace (the space character, tab, LF, CR, CTRL-Z) is added at the end, up to 128 characters.
none of these added characters are detected:
@Pierre-Gronau-ndaal thanks for checking. I have somewhat taken this for granted. I'll investigate your findings.
Problem
I encountered an issue where ClamAV does not detect the EICAR test file if i alter the original eicar.txt the magic byte of this file to different values.
Eicar:
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
Expected Behavior
ClamAV should detect and flag the EICAR files as containing the EICAR test virus.
Observed Behavior
ClamAV does not detect the EICAR test virus in several manupulated files. The scan completes without any alerts or detections.
Environment
ClamAV Version: 1.4
Test System: Linux, macOS
Additional Information
Example
EICAR_magic_byte_testfile_00_00_00_0C_6A_50_20_20.jp2
further test files are available here:
https://gitlab.com/ndaal_open_source/ndaal_public_eicar_test_files/-/tree/main/dataset/EICAR_magic_byte?ref_type=heads
How di i create these files
https://gitlab.com/ndaal_open_source/ndaal_public_eicar_test_files/-/blob/main/create_EICAR_magic_byte_testfiles.sh?ref_type=heads