GNU/Linux >> Tutoriels Linux >  >> Cent OS

Comment installer Linux Malware Detect sur CentOS 7 / RHEL 7 - Un scanner de logiciels malveillants pour le système d'exploitation Linux

Détection des logiciels malveillants Linux (LMD) est un détecteur de logiciels malveillants pour les systèmes d'exploitation Linux , publié sous GNU GPLv2. LMD est spécialement conçu pour les environnements d'hébergement partagé afin d'éliminer ou de détecter les menaces dans le fichier des utilisateurs.

Dans cet article, nous allons installer Linux Malware Detect avec ClamAV sur CentOS 7 .

Installer LMD sur CentOS 7 / RHEL 7

LMD n'est pas disponible sur CentOS référentiels officiels sous forme de package pré-construit, mais il est disponible sous forme d'archive sur le site Web du projet LMD. Téléchargez la dernière version de LMD à l'aide de la commande suivante.

cd /tmp/
curl -O http://www.rfxn.com/downloads/maldetect-current.tar.gz

Décompressez l'archive tar et accédez au répertoire extrait.

tar -zxvf maldetect-current.tar.gz
cd maldetect*

Exécutez le script d'installation install.sh présent dans le répertoire extrait.

bash install.sh

Sortie :

Created symlink from /etc/systemd/system/multi-user.target.wants/maldet.service to /usr/lib/systemd/system/maldet.service.
Linux Malware Detect v1.6
 (C) 2002-2017, R-fx Networks <[email protected]>
 (C) 2017, Ryan MacDonald <[email protected]>
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(1344): {sigup} performing signature update check...
maldet(1344): {sigup} local signature set is version 2017070716978
maldet(1344): {sigup} new signature set (2017080720059) available
maldet(1344): {sigup} downloading https://cdn.rfxn.com/downloads/maldet-sigpack.tgz
maldet(1344): {sigup} downloading https://cdn.rfxn.com/downloads/maldet-cleanv2.tgz
maldet(1344): {sigup} verified md5sum of maldet-sigpack.tgz
maldet(1344): {sigup} unpacked and installed maldet-sigpack.tgz
maldet(1344): {sigup} verified md5sum of maldet-clean.tgz
maldet(1344): {sigup} unpacked and installed maldet-clean.tgz
maldet(1344): {sigup} signature set update completed
maldet(1344): {sigup} 15215 signatures (12485 MD5 | 1951 HEX | 779 YARA | 0 USER)

Configurer la détection des logiciels malveillants Linux

Le fichier de configuration principal de LMD est /usr/local/maldetect/conf.maldet et vous pouvez le modifier selon vos besoins.

vi /usr/local/maldetect/conf.maldet

Vous trouverez ci-dessous certains des paramètres importants que vous devez avoir sur votre système pour une détection et une suppression réussies des menaces.

# Enable Email Alerting
email_alert="1"

# Email Address in which you want to receive scan reports
email_addr="[email protected]"

# Use with ClamAV
scan_clamscan="1"

# Enable scanning for root owned files. Set 1 to disable.
scan_ignore_root="0"

# Move threats to quarantine
quarantine_hits="1"

# Clean string based malware injections
quarantine_clean="1"

# Suspend user if malware found.
quarantine_suspend_user="1"

# Minimum userid value that be suspended
quarantine_suspend_user_minuid="500"

Passez à la recherche de logiciels malveillants si vous ne souhaitez pas utiliser LMD avec ClamAV.

Détecter les logiciels malveillants Linux avec ClamAV

LMD fonctionne mieux dans l'analyse de grands ensembles de fichiers avec ClamAV. ClamAV (Antivirus Clam) est une solution antivirus open source pour détecter les virus, les logiciels malveillants, les chevaux de Troie et autres programmes malveillants.

ClamAV est disponible sur le dépôt EPEL , alors configurez-le sur votre CentOS / RHEL machine.

rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Installez ClamAV à l'aide de la commande YUM.

yum -y install clamav clamav-devel clamav-update inotify-tools

Maintenant, mettez à jour les bases de données virales ClamAV à l'aide de la commande suivante.

freshclam

Aucune configuration supplémentaire n'est requise avec LMD car l'utilisation de ClamAV avec LMD est activée par défaut.

Test de détection des logiciels malveillants Linux

Testons la fonctionnalité de LMD en utilisant le virus de test. Télécharger la signature de virus à partir du site Web EICAR .

cd /tmp
wget http://www.eicar.org/download/eicar_com.zip
wget http://www.eicar.org/download/eicarcom2.zip

Maintenant, analysez le répertoire à la recherche de logiciels malveillants.

maldet -a /tmp

Sortie :

Linux Malware Detect v1.6.2
            (C) 2002-2017, R-fx Networks <[email protected]>
            (C) 2017, Ryan MacDonald <[email protected]>
This program may be freely redistributed under the terms of the GNU GPL v2

maldet(2004): {scan} signatures loaded: 15215 (12485 MD5 | 1951 HEX | 779 YARA | 0 USER)
maldet(2004): {scan} building file list for /tmp, this might take awhile...
maldet(2004): {scan} setting nice scheduler priorities for all operations: cpunice 19 , ionice 6
maldet(2004): {scan} file list completed in 0s, found 74 files...
maldet(2004): {scan} found clamav binary at /bin/clamscan, using clamav scanner engine...
maldet(2004): {scan} scan of /tmp (74 files) in progress...
maldet(2004): {scan} processing scan results for hits: 2 hits 0 cleaned
maldet(2004): {scan} scan completed on /tmp: files 74, malware hits 2, cleaned hits 0, time 11s
maldet(2004): {scan} scan report saved, to view run: maldet --report 170814-1058.2004
maldet(2004): {alert} sent scan report to [email protected]

À partir de la sortie, vous pouvez voir que LMD utilise le moteur d'analyse ClamAV pour effectuer l'analyse et a abouti à la découverte de deux occurrences de logiciels malveillants.

Rapport d'analyse du détecteur de logiciels malveillants Linux

LMD stocke les rapports d'analyse sous /usr/local/maldetect/sess/ . Utilisez la commande maldet avec SCAN ID pour voir le rapport d'analyse détaillé.

maldet --report 170808-1035.18497

Sortie :

SUBJECT: maldet alert from server.itzgeek.local
HOST:      lmddd
SCAN ID:   170814-1058.2004
STARTED:   Aug 14 2017 10:58:20 +0000
COMPLETED: Aug 14 2017 10:58:31 +0000
ELAPSED:   11s [find: 0s]

PATH:          /tmp
TOTAL FILES:   74
TOTAL HITS:    2
TOTAL CLEANED: 0

FILE HIT LIST:
{HEX}EICAR.TEST.10 : /tmp/eicar_com.zip => /usr/local/maldetect/quarantine/eicar_com.zip.491714154
{HEX}EICAR.TEST.10 : /tmp/eicarcom2.zip => /usr/local/maldetect/quarantine/eicarcom2.zip.506330946
===============================================
Linux Malware Detect v1.6.2 < [email protected] >

Vous pouvez voir que les deux fichiers sont maintenant mis en quarantaine.

Mettre à jour la détection des logiciels malveillants Linux

Utilisez la commande suivante pour mettre à jour votre LMD.

maldet -d

Pour mettre à jour les signatures LMD, exécutez :

maldet -u

C'est tout.


Cent OS
  1. Comment installer redmine sur RHEL 8 / CentOS 8 Linux

  2. Comment installer Hadoop sur RHEL 8 / CentOS 8 Linux

  3. Installez Linux Malware Detect sur Debian / Ubuntu / LinuxMint - Un scanner de logiciels malveillants pour le système d'exploitation Linux

  4. Installer et configurer Linux Malware Detect sur un VPS CentOS

  5. Comment installer Linux Malware Detect sur CentOS 8

Comment installer WordPress sur RHEL 8 / CentOS 8 Linux

Comment installer GIMP sur CentOS 8 / RHEL 8 Linux

Comment installer Cockpit sur CentOS 8 / RHEL 8

Comment installer Linux Malware Detect (Maldet) sur Fedora 34

Comment installer Linux Malware Detect sur CentOS 7

Comment installer Linux Malware Detect sur Ubuntu 15.04