GNU/Linux >> Linux Esercitazione >  >> Cent OS

Come installare Linux Malware Detect su CentOS 7 / RHEL 7 – Uno scanner di malware per il sistema operativo Linux

Rilevamento malware Linux (LMD) è un rilevatore di malware per sistemi operativi Linux , rilasciato sotto GNU GPLv2. LMD è appositamente progettato per gli ambienti di hosting condiviso per eliminare o rilevare le minacce nei file degli utenti.

In questo post, installeremo Linux Malware Detect con ClamAV su CentOS 7 .

Installa LMD su CentOS 7 / RHEL 7

LMD non è disponibile su CentOS repository ufficiali come pacchetto precompilato, ma è disponibile come tarball dal sito Web del progetto LMD. Scarica l'ultima versione di LMD usando il comando seguente.

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

Decomprimi il tarball e accedi alla directory estratta.

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

Esegui lo script di installazione install.sh presente nella directory estratta.

bash install.sh

Risultato:

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)

Configura il rilevamento malware Linux

Il file di configurazione principale di LMD è /usr/local/maldetect/conf.maldet e puoi modificarlo in base alle tue esigenze.

vi /usr/local/maldetect/conf.maldet

Di seguito sono riportate alcune delle impostazioni importanti che dovresti avere sul tuo sistema per rilevare ed eliminare con successo le minacce.

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

Passa alla scansione del malware se non desideri utilizzare LMD con ClamAV.

Rileva malware Linux con ClamAV

LMD offre prestazioni migliori nella scansione di set di file di grandi dimensioni con ClamAV. ClamAV (Antivirus Clam) è una soluzione antivirus open source per rilevare virus, malware, trojan e altri programmi dannosi.

ClamAV è disponibile su repository EPEL , quindi configuralo sul tuo CentOS / RHEL macchina.

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

Installa ClamAV usando il comando YUM.

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

Ora aggiorna i database dei virus ClamAV usando il seguente comando.

freshclam

Non è richiesta alcuna configurazione aggiuntiva con LMD poiché l'uso di ClamAV con LMD è abilitato per impostazione predefinita.

Test del rilevamento malware Linux

Proviamo la funzionalità di LMD usando il virus di prova. Scarica la firma del virus dal sito Web EICAR .

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

Ora, scansiona la directory alla ricerca di malware.

maldet -a /tmp

Risultato:

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]

Dall'output, puoi vedere che LMD sta utilizzando il motore di scansione ClamAV per eseguire la scansione e ha trovato due colpi di malware.

Rapporto scansione rilevatore malware Linux

LMD archivia i rapporti di scansione in /usr/local/maldetect/sess/ . Utilizzare il comando maldet con SCAN ID per visualizzare il rapporto di scansione dettagliato.

maldet --report 170808-1035.18497

Risultato:

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] >

Puoi vedere che entrambi i file sono ora in quarantena.

Aggiorna rilevamento malware Linux

Usa il comando seguente per aggiornare il tuo LMD.

maldet -d

Per aggiornare le firme LMD, esegui:

maldet -u

Questo è tutto.


Cent OS
  1. Come installare redmine su RHEL 8 / CentOS 8 Linux

  2. Come installare Hadoop su RHEL 8 / CentOS 8 Linux

  3. Installa Linux Malware Detect su Debian / Ubuntu / LinuxMint - Uno scanner di malware per il sistema operativo Linux

  4. Installa e configura Linux Malware Detect su un CentOS VPS

  5. Come installare Linux Malware Detect su CentOS 8

Come installare WordPress su RHEL 8 / CentOS 8 Linux

Come installare GIMP su CentOS 8 / RHEL 8 Linux

Come installare Cockpit su CentOS 8 / RHEL 8

Come installare Linux Malware Detect (Maldet) su Fedora 34

Come installare Linux Malware Detect su CentOS 7

Come installare Linux Malware Detect su Ubuntu 15.04