Skip to content

andychu46/find_trojan_auto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

介绍

跟据样本及关键字定时查找php后门自动版,适合小网站运行。
首次运行会跟据当前web目录产生初始样本库,以后每次运行都会和初始库比对一次。
如果查找出文件中含有eval,shell_exec,unserialize,$_FILES等可利用的词时就会发送通知邮件。
如更新了代码或确认代码没问题可以运行./find_trojan_auto.sh buildorg 重新产生样本库。

项目地址

Gitee(国内): https://gitee.com/c1g/find_trojan_auto
Github: https://github.com/andychu46/find_trojan_auto Blog: https://blog.c1gstudio.com/

软件架构

需要diff,md5sum,mail,find等命令支持

功能

查找没有用户和组的文件
查找可能含有一句话后门的php(需人工分析)
发送运行结果通知邮件
支持设定避开指定目录
第一次运行会先建立原始库之后对此进行对比(file_db_org)
删除原始库可以重新建立比对标准

安装部署

mkdir -p /opt/shell/log && cd /opt/shell/  
#wget -O find_trojan_auto.sh https://gitee.com/c1g/find_trojan_auto/raw/master/find_trojan_auto.sh   
wget -O find_trojan_auto.sh https://github.com/andychu46/find_trojan_auto/raw/main/find_trojan_auto.sh   
chmod +x ./find_trojan_auto.sh
#设定接收邮箱和web目录
sed -i "s/maillist=.*$/maillist='[email protected]'/" ./kickleech_auto.sh
sed -i "s/findpath=.*$/findpath='/opt/htdocs'/" ./kickleech_auto.sh
./find_trojan_auto.sh buildorg

使用说明

cd /opt/shell/
./find_trojan_auto.sh
#加入到crontab定时运行,每天6点36检查一次
crontab -e
36 6 * * * cd /opt/shell/ && /bin/sh ./find_trojan_auto.sh > /dev/null 2>&1

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

About

php后门查找自动版

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages