读书人

无敌强大的Shell脚本查杀各种PHP方便之

发布时间: 2013-07-11 15:38:46 作者: rapoo

无敌强大的Shell脚本查杀各种PHP后门和Webshell

?# grep -r --include=*.php? '[^a-z]eval($_POST' . > /tmp/eval.txt
?
# grep -r --include=*.php? 'file_put_contents(.*$_POST[.*]);' . > /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{} ;

?

读书人网 >Web前端

热点推荐