LinTut

Install Linux Malware Detect (LMD) on RHEL/CentOS/Fedora Linux

Malware is known as software which is specifically designed to disrupt or damage a computer system.
Linux Malware Detect (LMD) is a malware scanner for Linux released under the GNU GPLv2 license, that is designed around the threats faced in a shared hosted environments. It uses threat data from network edge intrusion detection systems to extract malware that is actively being used in attacks and generates signatures for detection. More about this software see on the official site

LMD Features

Install Linux Malware Detect (LMD)

First, login to your server using ssh client (Putty for windows users) and download the latest LMD source packages from offical site using wget command:

# cd /opt
# http://www.rfxn.com/downloads/maldetect-current.tar.gz

Now extract downloaded archove and install LMD tool:

# tar xvf maldetect-current.tar.gz
# cd maldetect-1.4.2
# sh install.sh

Configure Linux Malware Detect

LMD configure configuration file on this /usr/local/maldetect/conf.maldet path. Now, edit this file (red lines аrе marked by that should be changed):

# [ EMAIL ALERTS ]
##
# The default email alert toggle
# [0 = disabled, 1 = enabled]
email_alert=1
 
# The subject line for email alerts
email_subj="MLD Scan Report from $(hostname)"
 
# The destination addresses for email alerts
# [ values are comma (,) spaced ]
email_addr="yourmail@yourdomain.com"
 
# Ignore e-mail alerts for reports in which all hits have been cleaned.
# This is ideal on very busy servers where cleaned hits can drown out
# other more actionable reports.
email_ignore_clean=0
 
##
# [ QUARANTINE OPTIONS ]
##
# The default quarantine action for malware hits
# [0 = alert only, 1 = move to quarantine & alert]
quar_hits=1
 
# Try to clean string based malware injections
# [NOTE: quar_hits=1 required]
# [0 = disabled, 1 = clean]
quar_clean=1
 
# The default suspend action for users wih hits
# Cpanel suspend or set shell /bin/false on non-Cpanel
# [NOTE: quar_hits=1 required]
# [0 = disabled, 1 = suspend account]
quar_susp=0

# minimum userid that can be suspended
quar_susp_minuid=500

LMD Start manualy

After succefully installed and configured Linux Malware Detect tool (LMD) on your system, lets run your first scann using following command:

# maldet --scann-all /var/www/http

The above command scanned all files under /var/www/http directory. After scanning type following command to show lmd report:

#  maldet --report 030815-1747.26975

Example output:

malware detect scan report for Lintut:
SCAN ID: 030815-1747.26975
TIME: Mar  8 17:47:34 -0400
PATH: /var/www/http
TOTAL FILES: 18
TOTAL HITS: 0
TOTAL CLEANED: 0

===============================================
Linux Malware Detect v1.4.2 < proj@rfxn.com >

That is all!
Reference: Linux Malware Detect official site

Exit mobile version