0712-2888027 189-8648-0214
微信公众号

孝感风信网络科技有限公司微信公众号

当前位置:主页 > 技术支持 > Linux > CentOS Linux系统下查找webshell后门的常用命令

CentOS Linux系统下查找webshell后门的常用命令

时间:2024-03-28来源:风信官网 点击: 2795次
检测webshell后门,一般我们通过判断文件修改的内容,时间、匹配相应的内容等信息进行判断,Windows系统有专门针对性的软件,如:D盾,支持win2003/win2008/win2012/win2016等系统,为IIS设计的一个主动防御的保护软件,以内外保护的方式防止网站和服务器给入侵,在正常运行各类网站的情况下,越少的功能,服务器越安全的理念而设计! 限制了常见的入侵方法,让服务器更安全!

Linux系统我们利用find命令、grep命令进行查找

# find ./ -name “*.php” |xargs egrep “phpspy|c99sh|milw0rm|eval(gunerpress|eval(base64_decoolcode|spider_bc))” > /tmp/php.txt

将查找的结果写入/tmp/php.txt文件,我们可以查看该文件得到结果

grep -r –include=*.php  ‘[^a-z]eval($_POST’ . > /tmp/eval.txt

将查找的结果写入/tmp/eval.txt文件,我们可以查看该文件得到结果

grep -r –include=*.php  ‘file_put_contents(.*$_POST[.*]);’ . > /tmp/file_put_contents.txt

将查找的结果写入/tmp/file_put_contents.txt文件,我们可以查看该文件得到结果

find ./ -name "*.php" -type f -print0 | xargs -0 egrep "(phpspy|c99sh|milw0rm|eval(gzuncompress(base64_decoolcode|eval(base64_decoolcode|spider_bc|gzinflate)" | awk -F: '{print $1}’ | sort | uniq

组合型查找

另外,我们可以查找最近一天被修改的php文件来判断

find -mtime -1 -type f -name *.php

查找网站修改的权限来判断

find -type f -name *.php -exec chmod 444 {} ;

find ./ -type d -exec chmod 555{} ;
热门关键词: CentOS Linux webshell 后门 常用命令
栏目列表
推荐内容
热点内容
展开