Linux Malware Detect or just Maldet is free and open source malware scanner for Linux machines. It scans the machine for known malwares and quarantine suspicious files or simply alert you for their presence. 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.
In this tutorial we will show you how to install Linux Malware detect on your CentOS VPS.
Log in to your server as user root and update the packages:
Now, go to Linux Malware Detect’s official website and download it to your server
Unpack the downloaded Linux Malware detect archive
Change the current working directory
And run the installation script
You should get the following output
Open Maldet’s configuration file
And change the following settings:
email_alert=1 – Enable email alerts
email_addr=”user@yourdomain.tld” – Enter the destination address for email alerts
quar_hits=1 – Move the detected malware to quarantine and send an alert
quar_clean=1 – Try to clean the detected malware injections
There are more options that you can configure according to your needs.
After the installation a daily cronjob which checks for the latest version of Maldet and malware definition/signature files is automatically created.
That’s all. Linux Malware Detect is installed and configured on your server.
To scan a directory you can use
To update Maldet use the below command
You can find the details on all options by executing
or read the README file.
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Linux Malware Detect for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
Thanks for helping me out. Here quar_clean=1 will clean the detected malware injections. That means: if malware found in a script (php,html etc) will this remove the script completely from the server??
‘quar_clean’ will clean string-based malware injections from a script, it should not remove the script.
Please note that ‘quar_clean’ require that ‘quar_hits’ is enabled.
Hi.
after install maldet, will it automatically create daily cronjob for scanning?
and how to edit time of daily scanning?
thanks
regards
The cronjob is created during the installation. Please check the /etc/cron.daily/maldet file.
You may edit the /etc/crontab file and change the time, for example:
10 1 * * * root run-parts /etc/cron.daily
I have installed the software but the cron job did not worked.How to fix this?
Did you check the cron log file for more details?