Scan your website for viruses using maldet + ClamAV
The most effective way is to install LMD (Maldet) and integrate it with the ClamAV engine to speed up scanning.
Below is a step-by-step guide for Ubuntu/Debian (on CentOS, the commands are similar, but the package manager is yum).
- Install ClamAV (engine)
This is the base. It will speed up Maldet significantly.
apt update
apt install clamav clamav-daemon -y- Install Maldet (the scanner itself).
It's not in the standard repositories, so download it from the developer's website:
cd /usr/local/src/
wget http://www.rfxn.com/downloads/maldetect-current.tar.gz
tar -xzf maldetect-current.tar.gz
cd maldetect-*
./install.sh- Configure
Now you need to tell Maldet to use ClamAV and, if you want, send you reports.
Open the config:nano /usr/local/maldetect/conf.maldet
Find and check these parameters (they should be as follows):scan_clamscan="1" β use the ClamAV engine (required!).quarantine_hits="1" β move suspicious files to quarantine (if you're sure).email_alert="1" β if you want to receive emails about findings.
- Update databases and scan
Before the first launch, be sure to update the signatures:
maldet -u
maldet -dStarting a website scan:
maldet -a /var/www/html/After scanning, Maldet will return a report ID (for example, 240510-1234.5678). To see what it found, enter:
maldet --report ID_REPORTDone πΈ