Wednesday, March 3, 2021
Home Linux How to Install and Configure Linux Malware Detect (LMD) on Linux

How to Install and Configure Linux Malware Detect (LMD) on Linux

You may ask, can Linux get attacked by malware? The answer is always yes. Though most of the malware is created for windows, it is possible that your Linux computer can also get attacked by malware. Linux malware detect (LMD) is a tool that can be used on the Linux system to scan, detect, and remove malware from your system. The LMD can be used as a backdoor scanner on Linux. You can also use the LMD with another antivirus to make the Linux system more secure and virus free.

How LMD Works on Linux

Simple password, spam, botnet, vulnerabilities, running infected applications can be the reason how Linux can be attacked by malware. The LMD is a real-time malware detection tool for Linux. You can use the LMD with ClamAV antivirus to make the LMD more efficient and strong.

The LMD can be used to scan and find malware on the Linux filesystem and directories. It can be programmed to scan the directory both automatically and manually. The LMD can perform static analysis, dynamic analysis, and memory analysis to detect malware on Linux. Malware can also be detected by analyzing the actions of the processor and memory unit.

There are two types of high-level malware detection methods available on Linux. They are the signature-based analysis and signature-free analysis. The signature-based analysis is the method to scan malware on databases and Linux servers. And, the signature free analysis is an alternative way to find malware by monitoring the system and devices. In this post, we will see how to install and configure LMD on Linux.

Step 1: Download LMD on Linux

The very first step of installing LMD on Linux is to download the Maldetect file on your system. If you are a Debian or Ubuntu user, I will recommend you to use the cURL tool to download the file. If you are a Red Hat, Fedora, or other Linux user, you can use either the wget command or the cURL command to download the Maldetect file.

If you find any server or network error, please use the https instead of http in the address line. You can also download the Maldetect file manually from here.

The terminal command line to download the Maldetect file is given below. Normally the file is downloaded and stored in the home directory of your Linux system. But you can create a temporary file directory to store the file.

cd /tmp/
curl -O

LMD on Linux curl download

Step 2: Extract and Install LMD

Till now, we have downloaded the compressed file of Maldetect; now, we have to extract and install the LMD tool on our Linux machine. You can either use the default archive manager of Linux, or you can use the following terminal command to extract the tar file.

tar -zxvf maldetect-current.tar.gz

Now, enter the directory of the Maldetect and run the install script to initialize the installation process of LMD on your Linux machine. Don’t forget to run all the operations as a superuser.

cd maldetect-1.6.4

LMD on Linux install sh

After the installation is finished, you will be able to see the version and the total number of users of LMD on your Linux terminal shell. You can also check the version of LMD by performing the following terminal command.

lmd --version

Step 3: Configure LMD on Linux

After the installation is done, you can now open the configuration script to add your desired rules inside the LMD program. You can use any text editor to update the LMD configuration script. Here, I’m going to open the LMD configuration script using the GNU Nano text editor. Use the following terminal command line to open the configuration script.

nano /usr/local/maldetect/conf.maldet

LMD on Linux nano

You can configure the email alert, root directory scan, quarantine hits, malware injections, and suspend user settings by adding the following configuration script in your LMD configuration. After the configuration is placed correctly, you can save and exit the text editor. Be careful when you edit the LMD configuration script. The security of your Linux system can be compromised if you put wrong LMD settings inside the script.

# Enable Email Alerting

# Email Address in which you want to receive scan reports

# Enable scanning for root-owned files. Set 1 to disable.

# Move threats to quarantine

# Clean string based malware injections

# Suspend user if malware found.

# Minimum userid value that be suspended

Step 4: Get Started With LMD

After the configuration part is done, now it’s time to check the system and find some malware. We can either run an automatic malware detect daemon inside the Linux filesystem, or we can perform some quick scans. The LMD can be used to kill and remove malware from your Linux system. A few important and primary operations of LMD are given below.

Use LMD to scan the temp directory.

maldet -a /tmp

melware detect temp scan

Assign a path to scan the system

sudo maldet -a /path/to/home

Create a scan report from the scan ID

sudo maldet --report 200809-1241.5744

LMD on Linux report cardLMD on Linux report card

Perform an update check of LMD

maldet -u

Use this command to update the LMD

maldet -d


Run the LMD daemon in the background

maldet -b -r /home/username/

Make an index of the scanned and affected file

maldet -e list

Print the log file

maldet -l

To get more command syntax and user guide, you can check the LMD help index from the Linux terminal shell.

lmd --help

Ending Words

The LMD works with some basic principles to find malware on the Linux machine. It can monitor and read the system parameters to detect unusual activities. In this post, I have described how the LMD works on Linux. I have also explained how to install and configure the Linux Malware Detect (LMD) on Linux.

If you are running any Linux distros on a raspberry pi board, you can secure your Pi board by installing the LMD on your system. You can also protect your Linux server form malware by using the LMD on your server.

If you find this post beneficial and helpful, please share it with your friends and the Linux community. You can also write your valuable judgments in the comment segment. Please let us know which tool you are using to protect your Linux machine from malware.



Please enter your comment!
Please enter your name here

Latest Post

Top 10 Best Linux Port Scanners for Network Admins

Port scanning is a crucial thing in the world of networking. Actually, the network traffic is sent and received...

The 10 Best Golf Games and Apps For Android Device

If I ask the question about your favorite sports after football, cricket, and baseball, Golf will appear in the...

How to Enable HTTP/2 in Apache on Linux System

On Ubuntu and Debian Linux, you can install the Apache server and host your own website. And, if you...

Top 10 Best WWE Game for Android Device | Enjoy Wrestling Games

The number of WWE fans around the world is more than you can ever imagine. It even now has...

Most Talked Post

Most Stable Linux Distros: 5 versions of Linux We Recommend

At the very beginning, I would like to mention why the term ‘Stable’ comes about Linux OS or distro...

Linux or Windows: 25 Things You Must Know While Choosing The Best Platform

Choosing the best platform - Linux or Windows is complicated. Because both the system is versatile and capable of...

Linux Mint vs Ubuntu: 15 Facts To Know Before Choosing The Best One

Ubuntu and Linux Mint are two popular Linux distros available in the Linux community. Ubuntu is a derivative of...

Best Things To Do After Installing Linux Mint 20 “Ulyana”

Linux Mint is one of the best Linux distros for newcomers, especially those who come from other Operating Systems...