Quick search
Search

VPS/VDS virus scan.

Utilities for scanning servers and sites for viruses. Frequently used utilities.

Clam

Connect to VDS via SSH to install the utility and run the command:
For OS Debian / Ubuntu:
sudo apt-get install clamav
For OS Centos:
sudo yum install clamav

Commands for using the Clam utility:

Antivirus database update:
sudo freshclam

Checking the entire system:
sudo clamscan -r /

Checking an individual directory:
sudo clamscan -r /path/to/directory

Output for infected files only (using the "i" switch):
sudo clamscan -ir /path/to/directory

Moving infected files and deleting them:
sudo mkdir /infected_files
sudo clamscan -ir / --move=/infected_files

Deleting files:
sudo rm -rf /infected_files/*

Maldet

Connect to VDS via SSH to install the utility and run the following commands in sequence:

cd /tmp
wget http://www.rfxn.com/downloads/maldetect-current.tar.gz
tar xfz maldetect-current.tar.gz
cd maldetect-*
./install.sh
maldet --update-ver
maldet --update

Commands for using the "Clam" utility:

Antivirus database update:
freshclam
maldet --update-ver
maldet --update

Starting a file scan:
maldet -a /path/to/directory

View report:
maldet --report 102814-0358.6666

Also, information about the check will be stored in the file:
tail /usr/local/maldetect/event_log

Moving files to quarantine:
maldet -q 102814-0358.6666

Files moved to quarantine are located in the directory:
ls -la /usr/local/maldetect/quarantine/

Removing an infected file from quarantine:
rm /usr/local/maldetect/quarantine/config.php.2384 -y

Restoring a file from quarantine:
# maldet –restore /usr/local/maldetect/quarantine/config.php.2384