It is fairly easy to test clamfs. Use the following command to create a harmless file in customs:
Then, confirm that clamfs lets you open the harmless file:
Next, let’s get a “harmless” files that will trigger anti-virus action. These files are crafted to have the signature of a virus, but they do not cause any harm even when opened in an unprotected platform.
Download these (http://www.eicar.org/download/eicarcom2.zip) files, and upload it to ~/customs. If you want to by-pass the host operating system’s own virus checking, you can do this directly from the VM. You will need to have wget installed.
With wget, you can download the files directly:
The commands pushd and popd let you remember the current directory, change to a new one (pushd), and later on get back to the original directory (popd).
Now, try to use the system command file to determine the type of these files:
You should get error messages like “ˇfilenameż: writable, regular file, no read permission”. This means that the files were scanned on-the-fly, determined infected, and requests to read the files were denied.
In other words, clamfs worked!