📜 ⬆️ ⬇️

Making Home VirusTotal

Good day!

I want to tell and show how you can make the service for checking files with different antiviruses (ala virustotal.com).

Where to start? Oh yeah ... From the picture!
')




Part 0



Let's start with the fact that we download the source. Stsylko

Inside the archive you will find 2 folders “daemon” and “www”.

daemon - as already understood, this “demon” on perl, which will scan files with antiviruses, a config file, sh script to start the “demon” and its control, database structure.

www is a php shell that will upload files for review and give us the result.

Chat 1



And what do you ask to do with this? Well ... let's figure it out.

Will start with the launch of the "demon".
  1. To do this, copy the config to /etc/checker/checker.conf (of course we will correct it)
  2. Daemon in /etc/init.d/checker.pl
  3. Create tables in the checker database from the ckecker.sql file
  4. Run checker_control.sh and add it to cron to run every 5 minutes (at your discretion)


"Demon" plow!

Part 2



I do not even know whether or not to talk about the installation of what is in the www folder. Because it just needs to be copied to your www directory on the server. Configure www / engine / options.php config

Part 3



ATTENTION! in the “demon” config there are all settings related to antivirus, for example:

avast => { type => 'command', #  name => 'Avast!', #  - Avast id => 1, # id command => '/usr/bin/avast', #   args => '-t N %%', #  clean => qr/\bOK$/, #      infected => qr/\binfected by/, #      match => qr/.*\[infected by:\s(.*)\]/, #    engine_command => '/usr/bin/avast -V', #    engine => qr/avast v(\d\.\d\.\d)/, #    } 


You may have to edit these parameters, since from version to version change commands and answers

The article does not describe how to install antivirus, you should take care of it yourself!

Eye rest



The result of checking the file



Audit history



Conclusion



I want to say that you can add all antiviruses that can work on your server's OS.
On my home server I set up 9 antiviruses.
You can tighten the registration of users, payment, and make money on it. Personally, I do not care!

For those who are looking for links at the end of the article - a link to github

UPD: And as an alternative to perl - Qt version from RankoR ( qt version )

Source: https://habr.com/ru/post/141103/


All Articles