今回WordPress 7.0へ更新した後、管理画面に次のような英語の警告が表示されました。
Important Notice from the WordPress.org Plugins Team.
この警告はWordPress 7.0本体の不具合や更新失敗を示すものではなく、WordPress.org Plugins Teamからのプラグインに関する重要なセキュリティ通知です。
今回は「essentialplugin」とされる複数のプラグインについて、不正アクセスにつながる可能性のあるコードが含まれるという内容でした。
WordPress 7.0更新後に表示された理由
WordPressの更新後は、管理画面やプラグイン情報が再読み込みされるため、WordPress.org Plugins Teamからの重要通知が表示されることがあります。
今回の通知は、essentialplugin系プラグインに不正なコードが含まれていた可能性があり、WordPress.org側が対象プラグインの閉鎖や一部コード削除の更新を行ったことを知らせるものです。
そのため、WordPress 7.0に更新したことが原因で問題が発生したというより、更新のタイミングで既存プラグインの問題が表面化したと考えられます。
表示された警告内容
警告文では、WordPress.org Plugins Teamが以下のような内容を伝えています。
・essentialplugin作者の複数プラグインがガイドライン違反として報告された
・調査の結果、第三者がサイトへ不正アクセスできる可能性のあるコードが確認された
・対象プラグインはWordPress.orgのプラグインディレクトリで閉鎖された
・影響を受けたコードを削除するための更新も行われた
・ただし、すべてが自動で削除できたとは限らない原文
Important Notice from the WordPress.org Plugins Team.
We would like to inform you that several plugins from the author "essentialplugin" have been reported by the community as not compliant with the guidelines.
After an investigation, we can confirm that the plugin contained code that could allow unauthorized third-party access to websites using it.
In response, we have taken immediate steps to close the plugin in the WordPress.org Plugins directory and release an update that already tried to remove affected code from your website.
Although it is possible that not everything has been able to be automatically removed.
Specifically, this plugin downloaded code from analytics.essentialplugin.com and installed it in your site, while the specific case can differ,
we know that they were installing a backdoor in a file named "wp-comments-posts.php" that looks closely to the core file "wp-comments-post.php".
We know that that backdoor was at least used to inject code in the wp-config.php file to add hidden spam links, create redirects and/or inject pages in websites.
Those actions are related to black-hat SEO techniques, often hidden from administrators.
While our update attempted to remove the backdoor automatically, it cannot confirm that it was fully eliminated.
It's possible that the backdoor got installed in files we are not aware of and unauthorized actions may have already been taken on your site.
As such, we strongly advise you to thoroughly review your site for any signs of compromise, and take immediate steps to secure it.WordPress.orgのプラグインディレクトリは、安全に利用できるプラグインを配布することを目的としており、プラグインや開発者は不正・スパム的な動作をしてはいけないとされています。
今回の通知は、対象プラグインがその方針に反する動作をしていた可能性があるため、利用者へ注意を促しているものです。
この警告の危険性
警告文では、対象プラグインが外部サイトからコードを取得し、サイト内へ不審なファイルを設置していた可能性があるとしています。
特に問題とされているのが、次のファイルです。
wp-comments-posts.phpWordPressには、もともと次のような正規ファイルがあります。
wp-comments-post.php違いは、末尾に s が付いているかどうかです。
正常なファイル:wp-comments-post.php
不審な可能性があるファイル:wp-comments-posts.php報告事例では、対象プラグインの wpos-analytics モジュールが analytics.essentialplugin.com に通信し、wp-comments-posts.php というバックドアファイルを取得して、wp-config.php にPHPコードを注入していたと説明されています。
wp-config.phpが改ざんされると何が起きるのか
wp-config.php は、WordPressの重要な設定ファイルです。
このファイルには、データベース接続情報など、サイトを動かすための重要な設定が書かれています。
警告文では、この wp-config.php に不正なコードが追加され、次のような行為に使われた可能性があると説明されています。
・隠しスパムリンクの追加
・別サイトへのリダイレクト
・不正ページの作成
・検索エンジン向けのSEOスパムこれは、いわゆるブラックハットSEOに関係する動きです。
管理者がサイトを普通に見ているだけでは気づきにくく、検索エンジンや一部の訪問者にだけ不審なページやリンクを見せる場合もあります。
警告に対する対処
該当プラグインを削除する
WordPress管理画面で、 essentialplugin のプラグインを探し、停止ではなく削除する。
例として、以下のようなプラグインが影響対象に含まれています。
- Countdown Timer Ultimate
- Popup Anything on Click
- WP Testimonial with Widget
- WP Team Showcase and Slider
- Responsive WP FAQ with Category
- SP News and Widget
- WP Blog and Widgets
- Post Grid and Filter Ultimate
- Hero Banner Ultimate
対象は31件あると報告されています。
該当するものが1つでもあれば、削除したうえでサイト内の確認が必要です。
wp-config.php を確認する
サーバーのファイルマネージャー、FTP、またはSSHで、WordPress直下にある wp-config.php を開きます。
特に以下の行の前後を確認します。
require_once ABSPATH . 'wp-settings.php';この付近に、見覚えのない長いPHPコード、外部通信、難読化された文字列、eval、base64_decode、不自然な関数があれば危険です。
報告事例では、感染した wp-config.php は通常より約6KBほど大きくなるケースがあるとされています。
wp-comments-posts.php を探す
WordPress直下に、以下のファイルがないか確認してください。
wp-comments-posts.php通常のWordPressには、似た名前の次のファイルがあります。
wp-comments-post.php注意点は、末尾に s が付いている方が不審ファイルということです。
正常:wp-comments-post.php
不審:wp-comments-posts.phpwp-comments-posts.php があれば、バックドアの可能性が高いです。
管理者ユーザーを確認する
WordPress管理画面で、
ユーザー
↓
ユーザー一覧を開き、知らない管理者ユーザーがいないか確認してください。
不審なユーザーがあれば削除し、以下のパスワードを変更します。
- WordPress管理者
- レンタルサーバー管理画面
- FTP / SFTP
- データベース
- WordPressに登録しているメールアドレス
.htaccess と不審なリダイレクトを確認する
WordPress直下の .htaccess に、見覚えのないリダイレクト設定がないか確認します。
特に以下のような記述が不自然に入っていないか見ます。
RewriteRule
Redirect知らない外部URLへ飛ばす記述があれば危険です。
wp-content/uploads 内のPHPファイルを探す
通常、画像アップロードフォルダにPHPファイルは不要です。
以下の場所を確認します。
/wp-content/uploads/この中に、
.php
.phtml
.php5などのファイルがあれば、削除前にバックアップを取り、内容を確認した方がよいです。
Google Search Consoleを確認する
SEOスパムが入っていた可能性があるため、Search Consoleで次を確認してください。
- インデックス登録済みの不審URL
- 見覚えのないページ
- 急な表示回数増加
- 海外向けスパムキーワード
- セキュリティの問題
- 手動による対策
特に、管理者には見えずGooglebotにだけスパムを見せる手口が報告されています。
実際の事例
このメッセージが表示されたサイトでは、Countdown Timer Ultimateプラグインを使用しているページがありました。
上記の警告に対する対処をチェックしましたが、異常な箇所は無く、Countdown Timer Ultimateプラグインの削除により警告メッセージは消えました。
まとめ
WordPress 7.0更新後に「Important Notice from the WordPress.org Plugins Team.」が表示された場合、WordPress本体の不具合ではなく、essentialplugin系プラグインに関するセキュリティ警告の可能性があります。
この警告が出た場合は、次の点を必ず確認しましょう。
・essentialplugin系プラグインが入っていないか
・wp-comments-posts.php という不審ファイルがないか
・wp-config.php に不審なコードが入っていないか
・見覚えのない管理者ユーザーがいないか
・Search Consoleに不審URLや警告が出ていないかWordPress側の更新で一部の不正コードは削除された可能性がありますが、すべてが自動で消えたとは限りません。
そのため、警告が表示された場合は、プラグイン削除、ファイル確認、パスワード変更、Search Console確認まで行うことが重要です。
参考リンク
参考リンク
- WordPress.org Plugin Directory Guidelines
- WordPress Security
- Essential Plugin WordPress Backdoor / mySites.guru
- Someone Bought 30 WordPress Plugins and Planted a Backdoor in All of Them / Anchor Host
- Someone planted backdoors in dozens of WordPress plug-ins / Protect Your WP
- Backdoors discovered in 31 WordPress plugins / GIGAZINE
- How to Clean a Hacked WordPress Site / Wordfence
- How to Clean a Hacked WordPress Site / Jetpack
