Step by Step Guide to Install LMD (Linux Malware Detect) on Ubuntu 20.04 LTS

LMD is a free & open-source malware detection tool.LMD stands for Linux Malware Detect. We can scan all the files & directories & see all the scan report. We can send scan report to mail address. Linux malware detect is antivirus for Linux systems & also knows as Maldet.

There are few steps to install LMD or maldet on ubuntu:

Step 1: Update the System.

apt-get update

Step 2: Install LMD or Maldet on system.

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

  • Extract the downloaded file.

tar xfz maldetect-current.tar.gz

  • To list the extracted files.

ls -l

  • Here is the command output.

  • Change the path.

cd maldetect-1.6.4/

  • To list the files under maldetect-1.6.4.

ls -l

  • Here is the command output.

  • To run the install.sh script file.

./install.sh

  • Here is the command output.

  • To list all available maldet help options.

maldet -h

  • Here is the command output.

Step 3: Configure the Maldelect.

  • Open the maldelect configure file.

vim /usr/local/maldetect/conf.maldet

  • Add the following lines:

# To enable the email notification.
email_alert="1"
# Specify the email address on which you want to receive an email notification.
email_addr="[email protected]"
# Enable the LMD signature autoupdate.
autoupdate_signatures="1"
# Enable the automatic updates of the LMD installation.
autoupdate_version="1"
# Enable the daily automatic scanning.
cron_daily_scan="1"
# Allows non-root users to perform scans.
scan_user_access="1"
# Move hits to quarantine & alert
quarantine_hits="1"
# Clean string based malware injections.
quarantine_clean="0"
# Suspend user if malware found.
quarantine_suspend_user="1"
# Minimum userid value that be suspended
quarantine_suspend_user_minuid="500"
# Use with ClamAV
scan_clamscan="1"
# Enable scanning for root-owned files. Set 1 to disable.
scan_ignore_root="0"

  • Here is the command output.

Step 4: Update the Maldet.

maldet -u

  • Here is the command output.

  • To check the available version of Maldet.

maldet -d

  • Here is the command output.

Step 5: Maldet syntax & Examples.

maldet -attribute /path-of-directory

  • To scan the /etc directory.

maldet -a /etc

  • Here is the command output.

  • See the maldet report.

maldet --report 210907-0731.3087

  • Here is the command output.

  • Quarantine the infected files.

maldet -q 210907-0731.3087

  • Here is the command output.

  • Remove or clean the infected files.

maldet --clean 210907-0731.3087

  • Scan the background files or directories.

maldet -b -a /etc

  • Here is the command output.

  • To Check the status of the background scan.

tail -f /usr/local/maldetect/logs/event_log

  • Here is the command output.

  • See the maldet report.

maldet --report 210907-0739.13802

  • Here is the command output.

  • To clear the logs.

maldet -p

  • Here is the command output.

  • Verify the log is removed or not.

maldet -l

  • Here is the command output.

Leave a Reply

Your email address will not be published.