How to Install Linux Malware Detect on CentOS 7

r00t November 28, 2017

Install Linux Malware Detect on CentOS 7

In this tutorial we’ll learn how to install Linux Malware Detect on CentOS 7. We will also install and configure its prerequisites. Though Linux is a less targeted Working system, it’s still Significant To track for malware. One of the very best tools out there for doing this is Linux Malware Detect, which utilizes a variety of metrics to identify and remove malware. When utilized along with ClamAV, the well known Antivirus solution for Linux (along with Mac and Windows), Linux Malware Detect provides a very good defense against malicious applications.

I recommend to use a minimal CentOS server setup as a basis for the tutorial, that can be a virtual or a root server image with an CentOS 7 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install Linux Malware Detect on CentOS 7

Step 1. First, ensure your system is fully up-to-date by running the following:

yum -y update

Step 2. Installing Linux Malware Detect.

Download the latest version of LMD using the following command:

curl -O http://www.rfxn.com/downloads/maldetect-current.tar.gz

Unpack the tarball using tar command:

tar -zxvf maldetect-current.tar.gz
cd maldetect*

Run the installation script install.sh present in the extracted directory:

./install.sh

Step 3. Configure Linux Malware Detect.

We’ll need to make a few basic modifications to the default configuration file:

nano /usr/local/maldetect/conf.maldet

Here are the settings as they should look:

# Enable Email Alerting
email_alert="1"

# Email Address in which you want to receive scan reports
email_addr="chedelics@myvpsource.com"

# Use with ClamAV
scan_clamscan="1"

# Enable scanning for root-owned files. Set 1 to disable.
scan_ignore_root="0"

# Move threats to quarantine
quarantine_hits="1"

# Clean string based malware injections
quarantine_clean="1"

# Suspend user if malware found. 
quarantine_suspend_user="1"

# Minimum userid value that be suspended
quarantine_suspend_user_minuid="500"

Next, we’ll be installing ClamAV, so that Linux Malware Detect can use it as its antivirus engine:

yum -y install clamav clamav-devel

Now, update the ClamAV virus databases using the following command.

freshclam

You can do a lot with Linux Malware Detect. Here’s a sample of some commands you may find useful:

maldet -a /path
maldet -q SCANID
maldet –s SCANID

Update Linux Malware Detect:

maldet -d
maldet -u

Congratulation’s! You have successfully install and configured Linux Malware Detect on your CentOS 7 server. Thanks for using this tutorial for installing Linux Malware Detect on CentOS 7 system.

Leave a Comment

Comments are closed.