Virustotal integration for amavisd-new
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Jenkins 3b55d5469d Release 0.5.3 pirms 2 gadiem
amavisvt Release 0.5.3 pirms 2 gadiem
tests Fixed unpacking of single-payload mails which contain only attachments pirms 2 gadiem
.gitignore Updated .gitignore pirms 3 gadiem
.travis.yml Added requirements_dev.txt for development dependencies pirms 3 gadiem
LICENSE.txt Initial commit pirms 3 gadiem
Makefile Update Makefile pirms 2 gadiem
README.md Fixed formatting in README.md pirms 2 gadiem
amavisvt_example.cfg Starting to rework amavisvt to use a daemon pirms 3 gadiem
requirements.txt Support both, filemagic and python-magic pirms 2 gadiem
requirements_dev.txt Added requirements_dev.txt for development dependencies pirms 3 gadiem
setup.py Don't forget packages in setup.py pirms 3 gadiem
sonar-project.properties Release 0.5.2 pirms 2 gadiem

README.md

amavisvt is a daemon to include Virustotal as an amavisd-new virus scanner by using the Virustotal Public API.

amavisvt uses memcached to reduce the number of calls to the API. While it’s possible to run amavisvt without memached, it’s strongly advised to do so. Even with memcached in place, you might hit Virustotals API limit pretty fast and amavisvt will stop detecting an new threats. If you hit Virustotal’s API limit regularly, you might want to change the API endpoint url to an alternative one (see below), which acts as a proxy and has a much higher limit.

amavisvt uses the SHA256 hash of mimeparts to fetch file scan reports from Virustotal. amavisvt does not send any content to virustotal unless you have the filename pattern detection feature enabled (see amavisvt_example.cfg for details). To reduce the number of requests to VT even further, amavisvt only asks for reports for parts whose mime type (identified by libmagic) starts with application/, image/ or are typical scripts (perl, python, shell).

In future versions, amavisvt may integrate configurable filter for the mime types and/or file extensions.

Build Status Coverage Status

Installation

If you are on Gentoo Linux, add the last hope overlay and emerge amavisvt:

layman -a last-hope
emerge app-antivirus/amavisvt -av

Configuration

First, create an account on virustotal.com to obtain your API key. After registration, you can find it under “My API key”

amavisvt ships with an example config file. Place it in one of the following locations: /etc/amavisvt.cfg, ~/amavisvt.cfg or ./amavisvt.cfg and adjust it to your needs.

Please note, the location of memcached isn’t configurable at the moment. The instance has to run on 127.0.0.1:11211 and must accept connections from localhost.

As a last step, configure amavisd-new by adding the following snippet to either @av_scanners or @av_scanners_backup. Starting with 0.4 AmavisVT uses a daemon:

['AmavisVTd',
    \&ask_daemon, ["CONTSCAN {}\n", "/var/amavis/amavisvtd.sock"],
    undef,
    qr/(?:Detected as) (.*)/m,
    qr/(?:Detected as) (.*)/m],

If you feel adventurous, you can set api_url to https://hub.ercpe.de/vtcache/vtapi/v2/file/report which acts as a caching proxy for the Virustotal API and gives you a higher API limit.

License

See LICENSE.txt