Malware analysis with ClamAV in Invicti Enterprise
You need to download and install ClamAV to enable a Invicti Enterprise scan agent to carry out malware analysis for your web application.
ClamAV is an open-source, free, and widely used project backed by Cisco.
To enable Invicti Enterprise to perform malware analysis, see Malware Analyzer.
ClamAV is optional. If you want a Invicti Enterprise scan agent to identify malware, you need to use it.
Minimum requirements
These are the minimum requirements
Software requirements
- Ubuntu
- 18.04 (64bit, 32bit)
- 20.04 (64bit)
- Debian
- 9 (64bit, 32bit)
- 10 (64bit, 32bit)
- CentOS
- 7 (64bit, 32bit)
- 8 (64bit)
- Fedora
- 30 (64bit)
- 31 (64bit)
- Windows
- 7 (64bit, 32bit)
- 10 (64bit, 32bit)
Hardware requirements
- 2 GHz or faster recommended
- 2 GB RAM (4 GB or higher recommended)
- 5 GB free disk space
Required access
User(s) must have administrator privileges to run the required commands.
Download and configure ClamAV in Windows
To use ClamAV in Windows OS, you need to download and install ClamAV.
- From ClamAV, download the program relevant to your environment.
- Extract the .zip file to a folder.
- Navigate to the
conf_examplesfolder, and copy theclamd.conf.sampleand thefreshclam.conf.samplefile. - Paste the
clamd.conf.sampleandfreshclam.conf.samplefiles into the ClamAV’s main folder, and remove the.sampleextension from the files. The Rename popup is displayed. Select Yes. - Open the
freshclam.conffile with a text editor, and edit Log and Database directories, if necessary. Remove hashtags from the Log and Database lines.
Set ClamAV as a Windows Service
- Open Command Prompt and navigate to the extracted folder.
- To update the ClamAV, run
freshclam.exe. - To configure ClamAV as a Windows service, run
clamd install. - Run
sc config ClamD start autoso that the ClamAV service starts automatically. - Run
sc config FreshClam start autoso that the ClamAV virus update service starts automatically.
Download and configure ClamAV in Linux
To use ClamAV in Linux OS, you need to download and install ClamAV.
Set ClamAV as a Linux Service
- Open a terminal window.
- Run
sudo apt-get install clamav clamav-daemon.tipYou may want to run
sudo apt update & sudo apt upgradefirst before installing ClamAV to update your system. - Run
sudo nano /etc/clamav/freshclam.confand increaseReceiveTimeoutto 300. - Run
sudo systemctl restart clamav-freshclamto apply changed configuration. Then, you may wait 2–3 minutes so that ClamAV updates the virus database. - Run
sudo nano /etc/clamav/clamd.confto edit the file. - Then, delete the following entries from the
clamd.conffile:LocalSocket /var/run/clamav/clamd.ctlFixStaleSocket trueLocalSocketGroup clamavLocalSocketMode 666
- And, add the following entries to the
clamd.configfile:TCPSocket 3310TCPAddr 127.0.0.1
- Run
sudo systemctl restart clamav-daemonto apply changed configurations.
You can run sudo apt --purge autoremove clamav-daemon to uninstall ClamAV from your machine.
After the installation, you can run a test to confirm that ClamAV is working as expected.
Test ClamAV
- Open a terminal window.
- Run
wget https://secure.eicar.org/eicar.com.txt - Run
sudo clamdscanecho VERSION | nc -v 127.0.0.1 3310
echo “SCAN ~/eicar.com.txt” | nc -v 127.0.0.1 3310