千万个美丽的未来,抵不上一个温暖的现在,每一个真实的现在,都是我们曾经幻想的未来!
Apr
29
查找一句话PHP木马:
# find ./ -name "*.php" |xargs egrep "phpspy|c99sh|milw0rm|eval\(gunerpress|eval\(base64_decode|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_decode|eval\(base64_decode|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{} \;
建议将php相关危险函数在php.ini里面禁用掉。
disable_functions = system,exec,shell_exec,passthru
# find ./ -name "*.php" |xargs egrep "phpspy|c99sh|milw0rm|eval\(gunerpress|eval\(base64_decode|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_decode|eval\(base64_decode|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{} \;
建议将php相关危险函数在php.ini里面禁用掉。
disable_functions = system,exec,shell_exec,passthru