LINUX下的PHP木馬查詢

一句話查找PHP木馬
# find ./ -name "*.php" |xargs egrep "phpspy|c99sh|milw0rm|eval\(gunerpress|eval\(base64_decoolcode|spider_bc"> /tmp/php.txt
# 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{} \;
# find  -type f -name \*.html  -exec chmod 775 {} \;
# find  -type f -name \*.php  -exec chmod 400 {} \;
# find -mtime -10 -type f -name \* -exec rm -rvf {} \;
# find . -size 0 -exec rm {} \;
# find ./ -perm 755 -print   //查找權限爲755的文件

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章