Joh*_*ord 6 php security wordpress redirect
我的Wordpress网站已被黑客入侵。我注意到该网站已重定向到“ getmyfreetraffic.com”。我注意到,即使是Wordpress管理员登录页面也被重定向到getmyfreetraffic.com,如下图所示。
有什么办法可以解决此黑客问题,以及该黑客最初如何能够访问我的网站?
更新
此黑客是由于Easy WP SMTP紧急零日问题导致的安全问题引起的。
您siteurl
和home
选项似乎已被盗用
为了使您的网站快速恢复在线状态,您可以直接在wp-config.php
文件中覆盖该URL ,只需将这两行放下:
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Run Code Online (Sandbox Code Playgroud)
您有两种在数据库中修复URL的方法。通过直接在数据库中运行查询:
UPDATE wp_options
SET option_value = "http://example.com"
WHERE option_name IN("siteurl", "home");
Run Code Online (Sandbox Code Playgroud)
或者,如果您可以编辑主题的functions.php
,请删除这两行:
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );
Run Code Online (Sandbox Code Playgroud)
重新加载您的网站一次,然后删除这些行
这种黑客本来就不会发生,您的网站安全性肯定受到了损害。我建议您遵循官方的Wordpress指南:我的网站已被黑
在您采取行动时,所有浏览器可能会将您的网站标记为具有欺骗性。Google提供了有关如何请求审核的综合指南
小智 6
您可以通过以下方法快速进行纠正:
通过SSH或某些文件管理器或FTP登录到服务器。
Find your server's document root (where the files for the page are located, index.php should be here).
Go to the document root folder and find "wp-config.php". Open it.
Look for the part that says: "define('DB_NAME', 'YOURDBNAME');" That part which says YOURDBNAME will have your database's name for the site.
Open PHPMyAdmin or otherwise edit your database for that site, and find the 'wp_options' or similar table name.
Look for the value that says 'siteurl'. You'll see that it has the bad link there.
Replace the bad link with the http or https address that appears in 'home', which is directly beneath it.
Now that your site should be loading again, look for best practices to secure WordPress. You likely have an out of date plugin, old WordPress version, abandoned plugin, or malicious plugin. (Same thing for plugins applies for themes.)
Finding out how the attacker got there can be fairly complicated, but assuming this is the only compromise, once you 'button up' your WordPress install, it's a great idea to restore your whole database and site from the last known good copy before the day this happened.
归档时间: |
|
查看次数: |
2557 次 |
最近记录: |