友情提示:欢迎光临!本地已启用二维码api网关,地址是https://api.slogra.com

Linux shell快速查找PHP木马

post by rocdk890 / 2011-12-5 8:18 Monday linux技术

一句话查找PHP木马

  1. # find ./ -name "*.php" |xargs egrep "phpspy|c99sh|milw0rm|eval\(gunerpress|eval\(base64_decoolcode|spider_bc"> /tmp/php.txt
  2.  
  3. # grep -r --include=*.php  '[^a-z]eval($_POST' . > /tmp/eval.txt
  4.  
  5. # grep -r --include=*.php  'file_put_contents(.*$_POST\[.*\]);' . > /tmp/file_put_contents.txt
  6.  
  7. # 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文件

  1. #   find -mtime -1 -type f -name \*.php

修改网站的权限

  1. # find -type f -name \*.php -exec chmod 444 {} \;
  2.  
  3. # find ./ -type d -exec chmod 555{} \;

阅读全文>>

标签: centos php linux shell 木马 查找

评论(1) 引用(0) 浏览(5267)