centos7环境下php网站通过webshell安全扫描工具对系统做检测
发现是.htaccess文件被改,还有index.html被清空
很可能是入侵者对网站系统不熟悉误操作让站点出现异常,否则我们不会发现后门
系统恢
公司的网站半夜的时候不能访问,折腾了一些时间弄好了 发现是.htaccess文件被改,还有index.html被清空 很可能是入侵者对网站系统不熟悉误操作让站点出现异常,否则我们不会发现后门 系统恢复以后进行了回溯,找到了一个后门webshell,可以上传文件 既然有了一个后门可能会有其他后门,找几个工具扫描了一下(多个工具作对比,让结果更加立体) 1.河马查杀(试用了几个最好用的一个,强烈推荐) 下载地址: 帮助文档: wget -O /opt/hm-linux.tgz tar xf hm-linux.tgz cd hm # 简单扫描 ./hm scan 需要扫描的目录 ./hm deepscan 你的web目录 扫描时开启深度解码 注意: 不要将本软件放置到web目录下 不要在web目录下运行软件,因为生成的结果文件会被下载可能被人恶意利用 生成的报告默认保存在当前目录下 result.csv 使用简单网站安全扫描器,报告明晰,而且扫描的结果也很准确 2.CloudWalker牧云:开源项目已经停止更新,结果明晰,可惜停止更新了 使用简单,直接下载添加可执行文件就可以扫描了 ./webshell-detector -html -output result.html 需要扫描的目录 python版本的findwebshell python main.py -e php -p /var/www/test -o output -e 网页格式 -p 扫描的路径 -o 生成的html文件名,默认生成report.html 3.PHP Malware Finder查杀 使用方法: # 安装yara依赖,这个工具要3.4以上版本 yum install yara -y # 下载查杀源码 git clone cd php-malware-finder yara -r ./php.yar /var/www [/data/hm/php-malware-finder/php-malware-finder-master/php-malware-finder]# yara -r ./php.yar /home/edra0604/ ObfuscatedPhp /data/www/phpetector/shelldetect.php DodgyPhp /data/www/phpetector/shelldetect.php DangerousPhp /data/www/phpetector/shelldetect.php DodgyStrings /data/www/phpetector/shelldetect.php NonPrintableChars /data/www/share.php 4.findwebshell 一款python的扫描工具 # 运行参数 python main.py -e php -p /home/edra0604/public_html/ -o result02.html 扫描的结果一般,只能检测出有限的问题 5.Web Shell Detector直接拷贝到php目录就可以用 不推荐,不知道在干啥,好几个小时一直没有输出结果 (编辑:威海站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |