Wordpress-5.2.2 Nginx - 1.14.0
wordpress网站被恶意软件感染,似乎是xmlrpc.php攻击,有几个恶意的编码文件,我用wordfence扫描并清理了它们,但仍然有恶意的GET请求网站创建urls,其中一些返回404,一些返回200状态代码,那些返回200重定向到我当前的主页,没有重定向。但在谷歌,不需要的网址会被编入索引。请谁来帮我阻止这一切。
207.46.13.225 --30/Aug/2019年09:38:12 +0000 "GET /?mailboat 914902346%2Fnonpareil_la HTTP/1.1“200 289904 "-”"Mozilla/5.0 ( iPhone;类似Mac的CPU iPhone OS 7_0 ) AppleWebKit/537.51.1 (KHTML,类似Gecko)版本/7.0Mobile/11A465 Safari/9537.53 (兼容;bingbot/2.0;+http://www.bing.com/bingbot.htm)“
46.229.168.136 -- 30/Aug/2019:09:38:13 +0000 "GET Mozilla HTTP/1.1“”301 5“"-”“/?frizette%2F1028035242%2Fpersevering.racing /5.0(兼容;SemrushBot/6~bl;+http://www.semrush.com/bot.html)”
46.229.168.146 -- 30/Aug/2019:09:38:15 +0000 "GET /?frizette%2F1028035242%2Fpersevering_racing HTTP/1.1“”200 290444 "-“"Mozilla/5.0 (兼容;SemrushBot/6~bl;+http://www.semrush.com/bot.html)”
发布于 2019-08-30 17:51:49
这里有一些你可以添加到你的wordpress配置文件中来停止锁定你的站点的东西,以及关于每个东西所做的一些评论。
// Disable pingback.ping xmlrpc method to prevent Wordpress from participating in DDoS attacks
if ( !defined( 'WP_CLI' ) ) {
// remove x-pingback HTTP header
add_filter('wp_headers', function($headers) {
unset($headers['X-Pingback']);
return $headers;
});
// disable pingbacks
add_filter( 'xmlrpc_methods', function( $methods ) {
unset( $methods['pingback.ping'] );
return $methods;
});
add_filter( 'auto_update_translation', '__return_false' );
}
//Automatic Database Repair - http://example.com/wp-admin/maint/repair.php
define('WP_ALLOW_REPAIR', true);
//Foce SSL on Admin Panel
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);
//Disable Theme File Editor
define('DISALLOW_FILE_EDIT', true);
//Disallow Users to Install Plugins/Themes or doing updates
define('DISALLOW_FILE_MODS',true);
//Forcing use of FTP for all uploads, upgrades and plugin installation
define('FS_METHOD', 'ftpext');
//If FTPS is supported then add the following line to the config file
define('FTP_SSL', true);您将需要禁用FTP模式和disallow_file_功能,以便安装插件或更改基本代码,但除此之外,它应该保持您的网站更安全。
另外,为了直接回答你的问题,你可以看看像这样的一个插件来过滤掉不好的URL请求。
https://wordpress.org/plugins/block-bad-queries/
祝好运!
https://stackoverflow.com/questions/57724248
复制相似问题