How to install Linux Maldat (Linux Malware Scanner)

How to install Linux Maldat (Linux Malware Scanner)

Last Updated: 1/07/2015

This article applies to the following services:
  • VPS (Linux only)
  • Dedicated servers (Linux only)

cd /usr/local/src/

wget http://www.rfxn.com/downloads/maldetect-current.tar.gz
tar -xzvf maldetect-current.tar.gz
cd maldetect-*
sh install.sh

maldet -d && maldet -u

Edit the config file:

vi /usr/local/maldetect/conf.maldet

I recommend changing the quarantine problem files and alert to a different email address.

To run it via command line:

maldet --scan-all /home?/?/public_html
or
maldet --can-all ./

If the scan directory is rather large, you may prefer to run the scan in the background with the -b switch:

maldet -b --scan-all /home?/?/public_?

Verify the scan report:

maldet --report list

Show a specific report details:

maldet --report SCANID

Show all scan details from log file:

grep "{scan}" /usr/local/maldetect/even_log

Clean malicous files?  By default the quarantine is disabled.  You will have to launch it manually.  (You can set this up automatically in the /usr/local/maldetect/conf.maldet file. Also, email alerts can be enabled here too.)

Maldet -q SCANID

It is advised that you also scan /tmp and /dev/shm/

You'll want to setup a cron job to automate nightly scans.

You can also initiate a monitoring for any user account as follows:


maldet --monitor /home/username

This monitor will continue to run in the background and the resultant logs will be reported in the blow log file:

/usr/local/maldetect/inotify/inotify_log

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to delete all error_log files on cPanel Servers

How to delete all error_log files on cPanel ServersLast Updated: 1/07/2015This article applies to...

How to find the file size of folders in a directory via Linux command line

How to find the file size of folders in a directory via Linux command lineLast Updated:...

How to reboot Apache on a cPanel machine from the Linux command line

How to reboot Apache on a cPanel machine from the Linux command lineLast Updated: 1/07/2015This...

How to compress (tar/gzip) an entire directory in Linux (command line)

How to compress (tar/gzip) an entire directory in Linux (command line)Last Updated: 1/24/2105This...

How to export (mysqldump) and import a mysql database via command line

How to export (mysqldump) and import a mysql database via command lineLast Updated: 1/24/2015This...