wordpress - .htaccess 文件非常频繁地使用拒绝代码进行更新,并导致仪表板损坏
问题描述
我的 WordPress 网站遇到问题。.htaccess 文件经常使用以下拒绝代码进行更新
<FilesMatch ".(PhP|php5|suspected|phtml|py|exe|php|asp)$">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch "^(postfs.php|votes.php|index.php|wjsindex.php|lock666.php|font-editor.php|ms-functions.php|contents.php|jsdindex.php|wp-login.php|load.php|template-load.php)$">
Order allow,deny
Allow from all
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
但默认的 .htaccess 代码是
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
如果我也更改为默认代码,但一段时间后它再次使用拒绝代码更新。这个 .htaccess 文件正在文件的所有文件夹中更新。
托管在同一多域托管计划中的所有网站都会发生这种情况。此拒绝代码导致仪表板损坏,并引发了另一个避免修改等问题。
解决方案
我认为您有一个一直在下载 webshell 的 cronjob,我从 8 月初就观察到了这种行为。
您是否使用 c-panel 来托管您的网站?如果是这样,请检查您的 cronjobs 是否有一个对域 hello.turnedpro.xyz 有 wget 请求的任务。有一个 bash 脚本已下载并执行以从域下载 webshell,这就是为什么它在您之后不断返回删除。
让我知道事情的后续。
推荐阅读
- php - 使用条件语句将值插入另一个表
- python - 如何从另一个类和文件中调用实例变量
- java - 在文件中查找一个单词并在java中打印包含它的行
- angularjs - AngularJS - 立即更新 DOM 中的 ng-repeat 列表以允许动画
- c++ - 字符串的简单使用,从C++中的函数返回字符串
- python - 以正确的方式使用python编辑/更新PDF文本
- c - 如何在 PostgreSQL 中检索输入 JSONB 对象的 JsonbPair 值?
- python - Artifactory Conda 包返回 MD5mismatch 错误
- css - React-Native justifyContent 不起作用
- c++ - 在类中输入必需的类型,在哪里定义它