# 搜索最近24小时内上传/修改的PHP文件（排除正常更新）
find /var/www/html -name "*.php" -mtime -1 -type f -not -path "*/wp-content/uploads/*" -not -path "*/wp-content/cache/*" | while read file; do
    echo "=== $file ==="
    head -20 "$file" | grep -E "(eval|base64_decode|system|shell_exec|passthru|popen|proc_open)"
done

# 搜索包含恶意函数的文件
grep -rlE "(eval\s*\(|base64_decode\s*\(|system\s*\(|shell_exec\s*\(|passthru\s*\(|popen\s*\(|proc_open\s*\()" /var/www/html/wp-content/ --include="*.php"

# 检查上传目录中的PHP文件（Web Shell常见藏身地）
find /var/www/html/wp-content/uploads -name "*.php" -type f
