狐狸情 发表于 2018-12-21 08:52:10

php挂马

  在百度上搜索 :
  site:tpy888.cn 零点棋牌
  出现sitemap/Artlc.php
  很是奇怪,文件的属主是www:www
  后来我把目录修改成744,index.php为644,再把discuz的
  data/avatar目录删除了,竟然问题解决了。
  用下面的命令找出来的:
  /bbs/data/avatar/0/8/dam.php:    Str = "select '' into outfile 'F:/web/bak.php';";
./bbs/data/avatar/0/8/08dc78a2ff5d698d117adb3dc93f20c0.php:
./bbs/data/avatar/e/1/e14463ca8a83f6975870e407bddd3b95.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{} \;




页: [1]
查看完整版本: php挂马