malwareLinux Malware Detect merupakan salah satu tools/scripts yang berfungsi untuk malware/virus scanner pada lingkup GNU/Linux. Didesain untuk terintegrasi dengan lingkungan server shared hosting panel.
Linux Malware Detect (LMD) is a malware script scanner for Linux, it was designed around the threats faced in shared hosting environments.
Sebelum proses instalasi, download script yang terkompress menggunakan wget dari url situs rfxn.com seperti pada perintah dibawah berikut.

cd /usr/local/src/
wget -c http://www.rfxn.com/downloads/maldetect-current.tar.gz

Ekstrak file script hasil download

tar -xvfz maldetect-current.tar.gz
maldetect-1.4.2/
maldetect-1.4.2/CHANGELOG
maldetect-1.4.2/cron.daily
maldetect-1.4.2/README
maldetect-1.4.2/files/
maldetect-1.4.2/files/ignore_file_ext
maldetect-1.4.2/files/sigs/
maldetect-1.4.2/files/sigs/rfxn.ndb
maldetect-1.4.2/files/sigs/md5.dat
maldetect-1.4.2/files/sigs/hex.dat
maldetect-1.4.2/files/sigs/maldet.sigs.ver
maldetect-1.4.2/files/sigs/rfxn.hdb
maldetect-1.4.2/files/tmp/
maldetect-1.4.2/files/VERSION.hash
maldetect-1.4.2/files/ignore_inotify
maldetect-1.4.2/files/hexstring.pl
maldetect-1.4.2/files/maldet
maldetect-1.4.2/files/conf.maldet
maldetect-1.4.2/files/clean/
maldetect-1.4.2/files/clean/gzbase64.inject.unclassed
maldetect-1.4.2/files/clean/base64.inject.unclassed
maldetect-1.4.2/files/sess/
maldetect-1.4.2/files/pub/
maldetect-1.4.2/files/internals.conf
maldetect-1.4.2/files/quarantine/
maldetect-1.4.2/files/inotify/
maldetect-1.4.2/files/inotify/tlog
maldetect-1.4.2/files/inotify/inotifywait
maldetect-1.4.2/files/inotify/libinotifytools.so.0
maldetect-1.4.2/files/hexfifo.pl
maldetect-1.4.2/files/ignore_paths
maldetect-1.4.2/files/ignore_sigs
maldetect-1.4.2/files/modsec.sh
maldetect-1.4.2/cron.d.pub
maldetect-1.4.2/COPYING.GPL
maldetect-1.4.2/.ca.def
maldetect-1.4.2/install.sh

Install linux malware detect script

cd maldetect-1.4.2/
./install.sh
Linux Malware Detect v1.4.2
            (C) 2002-2013, R-fx Networks <[email protected]>
            (C) 2013, Ryan MacDonald <[email protected]>
inotifywait (C) 2007, Rohan McGovern <[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
 
imported config options from /usr/local/maldetect.last/conf.maldet
maldet(31683): {sigup} performing signature update check...
maldet(31683): {sigup} local signature set is version 201205035915
maldet(31683): {sigup} new signature set (2014052712778) available
maldet(31683): {sigup} downloaded http://cdn.rfxn.com/downloads/md5.dat
maldet(31683): {sigup} downloaded http://cdn.rfxn.com/downloads/hex.dat
maldet(31683): {sigup} downloaded http://cdn.rfxn.com/downloads/rfxn.ndb
maldet(31683): {sigup} downloaded http://cdn.rfxn.com/downloads/rfxn.hdb
maldet(31683): {sigup} downloaded http://cdn.rfxn.com/downloads/maldet-clean.tgz
maldet(31683): {sigup} signature set update completed
maldet(31683): {sigup} 11743 signatures (9854 MD5 / 1889 HEX)

Konfigurasi linux malware detect

vim /usr/local/maldetect/conf.maldet

Pada file konfigurasi tersebut akan dihadapkan pada beberapa variabel.
email_alert: berfungsi untuk proses aktfitasi/deaktifasi notifikasi aktifitas malware script.
email_addr: variabel dimana suatu alamat email akan mendapatkan informasi hasil malware scan serta notifikasi aktifitas malware script.
Penggunaan perintah maldet untuk scanning seluruh folder isi (sub) public_html atas setiap user pada home direktorinya masing-masing.

maldet --scan-all /home?/?/public_html

Jika threat ditemukan dari hasil proses scanning dan ingin dilakukan proses karantina atas trhreat malware script yang ditemukan tersebut maka dapat diproses dengan menggunakan perintah sebagai berikut.

maldet --quarantine SCANID

Apabila file script yang sebelumnya diquarantine (karantina) tersebut ingin di restorekan kembali maka dapat menggunakan perintah sebagai berikut dengan 2674 sebagai identitas hasil proses quarantine (karantina) sebelumnya.

maldet --restore /usr/local/maldetect/quarantine/config.php.2674

Namun apabila ingin diproses pembersihan atas file malware script yang ditemukan hasil proses scanning sebelumnya maka dapat menggunakan perintah sebagai berikut.

maldet --clean SCANID

Proses scanning malware script menggunakan linux malware detect tersebut dapat dikombinasikan dengan cronjob agar proses scanning malware script dapat diproses secara terjadwal dan berkesinambungan.