Search Our Database

How to Install Linux Malware Detect on CentOS

Last updated on |

Linux Malware Detect (LMD) is a malware scanner for Linux released under the GNU GPLv2 license, that is designed around the threats faced in 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.

In addition, threat data is also derived from user submissions with the LMD checkout feature and from malware community resources. The signatures that LMD uses are MD5 file hashes and HEX pattern matches, they are also easily exported to any number of detection tools such as ClamAV.


Log in or SSH to your server as root and run

# cd /usr/local/src
# wget
# tar -zxvf maldetect-current.tar.gz
# cd maldetect-1.4.2
# ./

After the installation gets completed, it will show

Linux Malware Detect v1.4.2
            (C) 2002-2013, R-fx Networks <>
            (C) 2013, Ryan MacDonald <>
inotifywait (C) 2007, Rohan McGovern <>
This program may be freely redistributed under the terms of the GNU GPL

installation completed to /usr/local/maldetect
config file: /usr/local/maldetect/conf.maldet
exec file: /usr/local/maldetect/maldet
exec link: /usr/local/sbin/maldet
exec link: /usr/local/sbin/lmd
cron.daily: /etc/cron.daily/maldet

maldet(328194): {sigup} performing signature update check...
maldet(328194): {sigup} local signature set is version 201205035915
maldet(328194): {sigup} new signature set (2014082316728) available
maldet(328194): {sigup} downloaded
maldet(328194): {sigup} downloaded
maldet(328194): {sigup} downloaded
maldet(328194): {sigup} downloaded
maldet(328194): {sigup} downloaded
maldet(328194): {sigup} signature set update completed
maldet(328194): {sigup} 11788 signatures (9895 MD5 / 1893 HEX)


Maldet can be configured by editing the file below

# vi /usr/local/maldetect/conf.maldet

The default configuration should be as below

# The default email alert toggle
# [0 = disabled, 1 = enabled]

# The subject line for email alerts
email_subj="maldet alert from $(hostname)"

# The destination addresses for email alerts
# [ values are comma (,) spaced ]

# 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.

# The default quarantine action for malware hits
# [0 = alert only, 1 = move to quarantine & alert]

# Try to clean string based malware injections
# [NOTE: quar_hits=1 required]
# [0 = disabled, 1 = clean]

# 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]
# minimum userid that can be suspended

You may edit the following values to configure Maldet to your needs