Wordpress/Godaddy:如何判断此 .htaccess 中是否包含恶意软件? wp-currentver.php

Wordpress/Godaddy: How can I tell if this .htaccess has malware in it? wp-currentver.php

Godaddy 将我的 /html/.htaccess 文件标记为可能的恶意软件。

这是恶意的吗? 首先,它还将 wp-currentver.php 标记为可能的恶意软件。

我的网站看起来很好,似乎运行良好。

RewriteEngine On

RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]
RewriteCond %{HTTP_USER_AGENT} (google|yahoo|msn|aol|bing) [OR]
RewriteCond %{HTTP_REFERER} (google|yahoo|msn|aol|bing)
RewriteRule ^([^/]*)/$ /wp-currentver.php?p= [L]
# BEGIN WordPress

# END WordPress

你被黑了。

这些重定向检测是否有人通过 Google 搜索结果以 Google 作为推荐人;标准的 WordPress(非多站点)重写块位于 https://codex.wordpress.org/htaccess 即:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

并且文件 wp-currentver.php 是恶意的,而不是 WordPress 核心。另见 https://productforums.google.com/forum/#!topic/webmasters/f4Cw1k1-j6g

认真关注FAQ My site was hacked - WordPress Codex.

寻找更安全的主机。

然后看看Hardening WordPress - WordPress Codex and Brute Force Attacks - WordPress Codex

中推荐的安全措施