maldetect主要功能:
1 扫描文件是否包含恶意代码
2 根据user或path记录对文件实时监控creation/modify/move operations(默认包含这几个操作,也可以监控其他文件操作,需要的话自行修改/usr/local/maldetect/maldet)
官网:
http://www.rfxn.com/projects/linux-malware-detect/
下载:
http://www.rfxn.com/downloads/maldetect-current.tar.gz
在 Linux 上安装和使用恶意软件检测工具 LMD,是个相当简单的过程,
1. 下载资源
wget http://www.rfxn.com/downloads/maldetect-current.tar.gz
2. 解压缩资源
tar -xvf maldetect-current.tar.gz # ls -l | grep maldetect
3. 安装
cd maldetect-version
./install.sh
下面说的是使用。包括配置和扫描。
配置LDM是在 /usr/local/maldetect/conf.maldet 文件里。推荐配置成这样:
email_alert="1" //开启邮件报警 1为报警 0为不报警(默认)
email_addr="xxx@xx.com"
subj="Malware alerts for $HOSTNAME - $(date +%Y-%m-%d)"
quarantine_hits="1" //移至隔离区并报警
quarantine_clean="1" //清除恶意软件
quarantine_suspend_user="1" //隔离用户set shell /bin/false
扫描可以通过命令执行,安装时,LDM也被装到了 /etc/cron.daily里面。(默认每天4点运行)
maldet --scan-all /var/www/ //扫描文件
maldet --report 021015-1051.3559 //扫描报告
上面最后一条指令,是查看报告内容,报告的名字在之前那条扫描命令的输出结果中,可以看到。
如果考虑和ClamAV,结合起来使用,请参考下面这个链接,解释的很到位。上述内容也部分来自这里。
参考:
https://linux.cn/article-5156-1.html