王娜 发表于 2013-10-25 10:25:18

【合肥清默】Linux shell快速查找PHP木马

一句话查找 PHP 木马

find ./ -name "*.php" |xargs egrep "phpspy|c99sh|milw0rm|eval_r(gunerpress|eval_r(base64_decoolcode|spider_bc"> /tmp/php.txt
grep -r --include=*.php'[^a-z]eval_r($_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_r(gzuncompress(base64_decoolcode|eval_r(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{} ;
页: [1]
查看完整版本: 【合肥清默】Linux shell快速查找PHP木马