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:
Step 3. Configure Linux Malware Detect.
We’ll need to make a few basic modifications to the default configuration file:
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="firstname.lastname@example.org" # 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.
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