edit_note帖子
1,551
stars积分
20,071
event加入
2011-05-19
怀旧国机
无敌强大的Shell脚本查杀各种PHP后门和Webshell
schedule发表于 2013-08-12 12:02:00
visibility查看 119
chat_bubble回复 1
#1 楼主
一句话查找PHP木马
# find ./ -name “*.php“ |xargs egrep “phpspy|c99sh|milw0rm|*(gunerpress|*(base64_decoolcode|spider_bc))“ > /tmp/php.txt
# grep -r --include=*.php ‘[^a-z]*(‘ . > /tmp/*.txt
# grep -r --include=*.php ‘file_put_contents(.*[.*]);‘ . > /tmp/file_put_contents.txt
# find ./ -name “*.php“ -type f -print0 | xargs -0 egrep “(phpspy|c99sh|milw0rm|*(gzuncompress(base64_decoolcode|*(base64_decoolcode|spider_bc|gzinflate)“ | awk -F: ‘{print $$$$1}‘ | sort | uniq
查找最近一天被修改的PHP文件
# find -mtime -1 -type f -name *.php
修改网站的权限
# find -type f -name *.php -* chmod 444 {} ;
# find ./ -type d -* chmod 555{} ;
# find ./ -name “*.php“ |xargs egrep “phpspy|c99sh|milw0rm|*(gunerpress|*(base64_decoolcode|spider_bc))“ > /tmp/php.txt
# grep -r --include=*.php ‘[^a-z]*(‘ . > /tmp/*.txt
# grep -r --include=*.php ‘file_put_contents(.*[.*]);‘ . > /tmp/file_put_contents.txt
# find ./ -name “*.php“ -type f -print0 | xargs -0 egrep “(phpspy|c99sh|milw0rm|*(gzuncompress(base64_decoolcode|*(base64_decoolcode|spider_bc|gzinflate)“ | awk -F: ‘{print $$$$1}‘ | sort | uniq
查找最近一天被修改的PHP文件
# find -mtime -1 -type f -name *.php
修改网站的权限
# find -type f -name *.php -* chmod 444 {} ;
# find ./ -type d -* chmod 555{} ;
全部回复 (1)
2013-08-12 15:33:00
沙发
刚刚
登录 后才能回复
flag举报帖子