HTML
 Computer >> コンピューター >  >> プログラミング >> HTML

ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

あなたのウェブサイトの動作がおかしくありませんか?訪問者を不快なサイト、検索結果のスパム、またはサイトのヘッダーやフッターに表示されるコードなどの単純なものにリダイレクトします。

WordPress サイトがハッキングされた疑いがある場合は、すぐにウェブサイトでマルウェアをスキャンしてください。

  • 悪いニュースは、あなたのサイトがハッキングされる可能性があるということです。
  • それは修正可能であるという朗報です。
  • 嬉しいことに、サイトの復旧に最適なリソースが見つかりました。

私たちは 20,000 以上のハッキングされた WordPress サイトをクリーンアップしてきました。私たちは、あらゆる種類のハッキングを見てきました。

さらに重要なのは、サイトの復元をお手伝いし、サイトがさらなる被害から確実に保護されるようにすることです。

TL;DR: MalCare を使用して Web サイトを無料でスキャンし、WordPress がハッキングされているかどうかを確認します。 MalCare は、ワンクリックでハッキングの痕跡をすべて見つけて外科的に除去します。ハッキングは WordPress サイト上に長く放置されるほど、指数関数的な被害を引き起こすことに注意してください。

WordPress ハックリカバリについて理解する

WordPress のハッキングからの回復は、そもそもサイトがどのようにしてハッキングされるのか、そしてハッキングされた WordPress サイトを修復することが何を意味するのかを理解することから始まります。

これは 4 段階のプロセスです:

  • サイトをスキャンしてハッキング コード (バックドアを含む) を探します
  • WordPress のハックをクリーンアップする
  • ハッキングによって生じた損害を回復する
  • 今後の WordPress ハッキングの発生を防ぐ
ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

ハッキングは企業や個人に数百万ドルの損失をもたらします。 。私たちは、サイトが改ざんされたり、スパムページやリンクが詰め込まれたサイト、SEO ランキングのクラッシュ、さらには法的問題さえも見てきました。

さらに悪いことに、ハッキングされた WordPress サイトをクリーンアップするのに多額の費用を費やすと、翌日には再びサイトが再発してしまうことがあります。

そして最後にハッキングは時間の経過とともに指数関数的に悪化するのです。 。ハッカーはサイトを制御すると、データを盗み、リソースを盗み、あなたのサイトを使って他のサイトをハッキングします。多くのウェブホストはこの理由でアカウントを一時停止しています。

💡 したがって、ハッキングされた WordPress サイトを修正するには、迅速かつ果敢に行動し、最も効果的な方法を選択する必要があります。それに依存して色々あります。

ステップ 1. WordPress サイトのハッキングを徹底的にスキャンする

MalCare を使用してウェブサイトを無料でスキャン WordPress がハッキングされているかどうかを確認します。 Web サイト上のマルウェアについて明確な答えが得られます。 

ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

私たちが MalCare をお勧めする理由はいくつかありますが、主な理由は、私たちが Web サイトからの何千ものハッキングを確認し、駆除してきたからです。ウェブサイトにログインできない、またはマルウェアが検出されたためにウェブホストがアカウントを停止したという理由で、パニックに陥ったウェブサイト管理者から毎週メールが届きます。

MalCare のスキャナーは完全に無料で使用できます。 サイトがハッキングされているかどうかに関する最終的なレポートを取得したら、自動クリーン機能を使用してファイルとデータベースからマルウェアを即座に除去するようにアップグレードできます。 

ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

マルウェア スキャナーがたくさんあるのに、なぜ MalCare を使用するのでしょうか?

MalCare はマルウェアを識別するためにファイル照合に依存しませんが、コードで 100 以上のシグナルをチェックする高度なアルゴリズムを備えています。 安全か危険かをマークする前に。

他のセキュリティ プラグインは、ファイル照合を使用してマルウェアを識別します。スキャナーは、ハッキング署名のデータベースと照合してサイド コードをチェックします。一致するものが見つかった場合、それはマルウェアとみなされます。

残念ながら、これには欠陥のあるプロセスがあり、誤検知やマルウェアの見逃しにつながります。新しいハックがあると想像してください。署名は明らかにデータベースに存在しないため、メカニズムはそこで失敗します。

サイトをディープ スキャンする必要があるのはなぜですか?

ハッキングにはさまざまな種類があるため、マルウェアはさまざまな場所に存在し、複数の亜種が存在し、 さまざまな方法で現れる可能性があります。 。

たとえば、WordPress リダイレクト ハッキングの亜種の 1 つは、ウェブサイト上のすべての投稿やページに感染し、場合によっては数百、数千にも感染します。

さらに、ハッキングは予測不可能です。むしろ、ハッキングは予測できないように設計されています。ハッカーは管理者を混乱させて、マルウェアをできるだけ長く隠しておきたいと考えています。したがってマルウェアはウェブサイトを奇妙な動作にさせる可能性がありますが、常にではありません

たとえば、管理者は悪意のあるリダイレクトを一度確認しただけで、その後は二度と見ることはありません。ファイアウォールに不具合があるのではないかと思われるかもしれません。ある日、スパム広告のポップアップが表示されるかもしれません。それはあなたの広告マネージャーでしたか?

これはバグなのか気のせいなのか疑ってしまうほどです。

💡 ハッキングされた WordPress サイトの症状をいくつか見たことがあっても、それらはハッキングの決定的な兆候ではありません。 WordPress がハッキングされているかどうかを知る唯一の方法は、Web サイトをスキャンすることです。  

サイトをスキャンするその他の方法

オンライン フロントエンド マルウェア スキャナー

Web サイトをスキャンする 2 番目の代替案は、オンライン セキュリティ スキャナーを使用することです。オンライン セキュリティ スキャナーは WP セキュリティ プラグインよりも効率が低いことに注意してください。 

フロントエンド スキャナーの問題は、Web サイトの一般に公開されている部分にしかアクセスできないことです。 設定ファイルをインターネット上のすべての人に公開したくないため、コードを非公開にするのは良いことです。

ただし、 残念なことにマルウェアは一般に公開されているファイルのみを攻撃できるほど配慮がありません。 。どこにでも隠れることができ、実際、フロントエンド スキャナーが到達できない場所にも隠れます。このため、サーバーレベルのスキャナーが最も効果的です。 

ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

💡 私たちのアドバイスは、最初の診断としてオンライン セキュリティ スキャナーを使用することです。 。陽性反応が出た場合は、クリーニングに移る良い出発点となります。ただし、スキャナーが提供するハッキングされたファイルのリストだけに依存しないでください。これらは、スキャナーがフラグを立てることができたものだけです。潜在的に、悪意のあるコードのインスタンスはさらに多く存在する可能性があります。

マルウェアを手動でスキャンする

このセクションを記事に含めていますが、マルウェアに手動で対処しようとする人には、スキャンやクリーニングを行わないことを強くお勧めします。 

MalCare のような優れたセキュリティ プラグインは、このセクションに記載されているすべてのことをより高速かつ優れた方法で実行できるため、本当に最適です。 WordPress ハッキングは放置される時間が長くなるほど悪化することに注意してください。 

ウェブサイトでマルウェアをスキャンするということは、基本的にファイルやデータベース内のジャンク コードを探すことを意味します。 「ジャンク コード」はガイダンスとしてはほとんど意味がないことは承知していますが、ハッキングにはさまざまな形があります。彼らはそれぞれ見た目も行動も異なります。 

後のセクションでハッキングのコード例を示しましたが、これらは単なる参考例であることを強調しなければなりません。 

ウェブサイトで悪意のあるコードを手動でスキャンする場合は、最近変更されたファイルがないか確認してください。 、ファイルとデータベースの両方を必ず調べてください。ここで注意してください:更新時間も変更される可能性があります。賢いハッカーは、更新されたタイムスタンプをまったく異なるものに設定する可能性があります。

💡 ヒント: Web サイトをスキャンするときの行動のログを記録します。これは、たとえばモバイルからアクセスしたときにのみ Web サイトが奇妙な動作をする場合など、後のデバッグ プロセスに役立ちます。または、ファイルの 1 つに疑わしいスクリプト タグが見つかった場合。

ハッキングをチェックするその他の方法

サイトがハッキングされているかどうかを判断するために使用できるチェックが他にもいくつかあります。これらの一部は上記の症状とわずかに重複しますが、症状が器質的に現れなかった可能性を考慮してここに記載しています。 

  • シークレットブラウザからログイン 。リダイレクトなどの症状が一度発生しても再現できない場合は、別のコンピューターまたはシークレット ブラウザーからログインしてみてください。ハッカーは Cookie を設定して、Web サイト上で見られる異常が単なる異常であり、ハッキングの兆候ではないという錯覚を作り出します。 
  • ウェブサイトをグーグルしてみてください そこからクリックスルーします。ウェブサイトは正しく読み込まれていますか?ブラウザに直接URLを入力してみたらどうでしょうか?それでは何が起こるでしょうか?症状を再現するために行ったことをメモしておきます。モバイル デバイスからログインしましたか、それとも Google 検索結果からクリックしていますか?これらの手がかりは、ハッキング場所をある程度特定するのに役立ちます。
  • ウェブサイトのページ数を確認する 。 Web サイト上でインデックス付けされたページのおおよその数がわかります。ウェブサイトを Google で サイト で検索します 検索演算子を使用して、結果の数を確認します。結果の数が予想よりはるかに多い場合は、サイト上のスパム ページがインデックスに登録されていることを意味します。 
  • アクティビティ ログを確認します。 アクティビティ ログには、各ユーザーが何を行っているかが表示されます。新しいユーザーや、ライターから管理者への移動など、役割権限が突然増加したユーザーのアクティビティ ログを確認してください。奇妙なユーザー名やメール アドレスを探してください。
  • 分析データの奇妙な傾向を探します。 ハッキングによって Google が Web サイトのインデックスを完全に削除する可能性があるという事実とは別に、初期段階での警告の兆候がいくつかあるので注意してください。 予期せぬ場所からのトラフィックが短期間に急増します。突然変化したエンゲージメント率もチェックしてください。異常は常に調査する必要があります。
  • 偽のプラグインを探します。 Web サイトの /wp-content フォルダーには、インストールしたプラグインとテーマのみが表示されます。短くて意味のない名前が付いた奇妙なものは良いでしょう。偽のプラグインは通常、フォルダー内に 1 つのファイル、または多くても 2 つのファイルを持ちます。
  • .htaccess ファイルを確認します。 .htaccess ファイルはトラフィックを誘導する役割を果たします。たとえば、Web サイトがモバイル デバイスからアクセスされている場合、.htaccess はデスクトップ バージョンではなくモバイル バージョンの Web サイトを読み込みます。 WordPress のコア ファイルに精通している場合は、.htaccess ファイルを確認してください。ユーザーエージェントは正しいファイルをロードしていますか? SEO スパム ハッキングや日本語キーワード ハッキングなどのマルウェアは、googlebot ユーザー エージェントのコードを変更します。最も一般的には、index.php ファイルが読み込まれるはずですが、このファイルがハッキングされ、訪問者が Google からクリックスルーした場合、あなたの Web サイトではなく、まったく別の Web サイトが読み込まれることになります。アドレスバーに URL を入力してウェブサイトに直接アクセスすると、検出されたユーザー エージェントが googlebot ではないため、正しいウェブサイトが読み込まれます。
ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド リダイレクト マルウェアを含む .htaccess ファイル

ステップ 2. ハッキングされた WordPress サイトをクリーンアップする

MalCare を使用して Web サイトのハッキングを駆除することをお勧めします。これは、WordPress Web サイトにとってこれまでで最高のセキュリティ プラグインであり、インテリジェントなシステムを使用して、Web サイトを完全に無傷に保ちながら、マルウェアのみを外科的に削除します。 

MalCare を WordPress のハック クリーンアップに使用するには、次のことを行うだけです。

<オル>
  • ウェブサイトに MalCare をインストールする
  • スキャンを実行し、結果を待ちます
  • スキャン結果にハッキングが見つかった場合は、マルウェアを自動駆除するようにアップグレードします
  • ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    MalCare は、Web サイトからマルウェアを外科的に削除します。クリーンアップは数分で完了し、Web サイトは再び元の状態に戻ります。 

    MalCare を推奨する理由は何ですか? 

    WordPress で利用できるセキュリティ プラグインは多数ありますが、他のプラグインよりも MalCare をお勧めします。私たちは偏見があるように見えるかもしれませんが、私たちの意見は広範なテストと研究に基づいています。 MalCare は、さまざまな理由から最高のセキュリティ プラグインです。

    • ファイルとデータベースからハッキングのみを削除し、適切なコードとデータは完全にそのまま残します
    • 古いものから新しいものまで、あらゆる種類のマルウェアに対応
    • ハッカーが残したバックドアを検出し、それらにも対処します
    • 即座に動作します。ハッキングされたサイトの復旧を待つ必要はありません
    • セキュリティ専門家による無制限のマルウェア削除が含まれます
    • クリーンアップ後の重要なタスクを自動化して再感染を防ぐ

    ハッキングされた WordPress サイトを修正するその他の方法

    セキュリティの専門家またはメンテナンス サービスを雇う

    Web サイトがしばらくハッキングされている場合、Web ホストがアカウントを停止し、Web サイトをオフラインにした可能性があります。したがって、ハッキングを駆除するためにセキュリティ プラグインをインストールすることはできません。 

    心配しないでください。このような場合は、緊急マルウェア削除サービスに連絡して、ハッキングされた WordPress サイトを修復してください。専任のセキュリティ専門家が、Web ホストに話しかけて IP をホワイトリストに登録してアクセスを回復し、クリーニングのためにプラグインをインストールする方法を案内します。 

    Web ホストがポリシーにより IP をホワイトリストに登録することを拒否した場合、専門家は SFTP を使用して、Web サイトのマルウェアを最短時間で駆除します。 

    MalCare 以外の WordPress セキュリティ専門家に相談することもできます。ただし、セキュリティ専門家に依頼すると費用がかかり、再感染を保証してくれるわけではないことに注意してください。手動クリーンアップを実行する多くのセキュリティ プラグインはクリーンアップごとに料金を請求しますが、このコストは感染を繰り返すと急速に増加します。 

    WordPress のハッキングされた感染を手動で駆除する

    Web サイトからマルウェアを手動で削除することができます。実際、極端な場合には、それが唯一の実行可能な選択肢になることがあります。ただし、私たちはそれに反対するようアドバイスし続けており、その理由を以下で少し詳しく説明します。 

    ハッキングされた WordPress ウェブサイトを手動でクリーンアップすることを選択した場合、成功するにはいくつかの前提条件が必要です。

    • あなたは WordPress を完全に理解しています。 ファイル構造、コアファイルがどのように機能するか、データベースがウェブサイトとどのように対話するか。また、プラグイン、テーマ、ユーザーなど、ウェブサイトに関するすべてのことを知っておく必要もあります。マルウェアは重要なファイルを含むあらゆるファイルに隠されている可能性があり、ファイルを削除しただけではウェブサイトが破壊される可能性があります。
    • コードを読んでコードのロジックを理解できる必要があります。 たとえば、ハッキングされたファイルをルート フォルダーから削除するのは良いことです。ただし、.htaccess ファイルがログイン時にそのファイルを読み込んでいた場合、訪問者には 404 ページが表示されます。

      これを知るのは簡単ではありません。多くのスキャナはカスタム コードと不正なコードを区別できないため、誤検知を生成します。

    • ファイル マネージャーや phpMyAdmin などの cPanel ツールに精通していること。 また、Web サイトに SFTP アクセスがあることを確認してください。ウェブホストがその情報を入手するのに役立ちます。
    1.ウェブサイトにアクセスします

    Web ホストがアカウントを一時停止した場合、または Web サイトをオフラインにした場合は、Web サイトへのアクセスを回復する必要があります。 SFTP を使用している場合、これは障害ではありませんが、少なくとも Web サイトを表示できるように、IP をホワイトリストに登録するよう依頼するのが最善です。 

    さらに、ウェブサイトをスキャンしてマルウェアを検出した後、ウェブホストがアカウントを一時停止しました。サポートに連絡して、感染したファイルのリストを問い合わせることができます。フロントエンド スキャナからもこの情報が得られますが、完全に正確ではない場合や誤検知が含まれる可能性があります。

    一部のホストがハッキングされたサイトを完全に削除するため、サイトがまったく利用できなくなった場合は、バックアップからこのプロセスを開始する必要があります。

    2.ウェブサイトのバックアップを作成します

    これはどれだけ強調してもしすぎることはありません。Web サイトに何かを行う前に、Web サイトのバックアップを作成してください。ハッキングされたサイトは、サイトがないよりははるかに優れています。 

    まず、人々が Web サイトのコードをいじると、物事がうまくいかなくなる可能性があり、実際にそうすることがよくあります。そんな時はバックアップが救われます。 Web サイトを復元して、再度開始できます。 

    次に、Web サイトがハッキングされた場合、Web ホストは Web サイトを完全に削除する可能性があります。彼らはサーバー上にマルウェアが存在しないことを確認することに強い関心を持っており、そのようにするために必要なことは何でも行います。 

    Web ホストが Web サイトを削除した場合、バックアップが存在する可能性はほとんどありません。サポートからのバックアップを得るのはさらに簡単です。常に独自のバックアップを取ることを強くお勧めします。 

    大きなファイルには WordPress バックアップ プラグインを使用することもお勧めします。 Web ホストのバックアップでは復元がひどく失敗することが確認されています。ウェブサイトがハッキングされ、それを駆除している場合、複雑さと失敗の可能性をできる限り軽減したいと考えます。

    3. WordPress コア、プラグイン、テーマのクリーン インストールをダウンロードします

    Web サイトにあるバージョンのリストを作成し、WordPress リポジトリからコア、プラグイン、テーマのクリーン インストールをダウンロードします。最新バージョンを使用していない場合は、Web サイトにインストールされているバージョンを必ずダウンロードしてください。最初にインストールを使用してファイルとコードを比較するため、これは重要な手順です。 

    インストールをダウンロードして解凍したら、ファイルとフォルダーを Web サイト上のファイルとフォルダーと比較します。比較プロセスを多少高速化するには、オンラインの差分チェッカーを使用してコードの違いを見つけ出します。 

    ちなみに、このファイル照合は、ほとんどのスキャナが使用する主要なメカニズムです。クリーン インストールでは表示されない重要なカスタム コードがある可能性があるため、これは完全なメカニズムではありません。したがって、今は削除する時期ではありません。たくさんメモを取り、どのファイルやフォルダーが元のファイルと異なっているかをマークしてください。 

    これは、Web サイトに偽のプラグインがインストールされているかどうかを検出する良い方法でもあります。リポジトリ上で偽のプラグインは見つかりません。また、偽のプラグインは常にプラグインの命名規則に従っておらず、フォルダー内にファイルがほとんどありません (場合によっては 1 つだけ)。 

    注:null のプラグインまたはテーマを使用していますか?ヌル化されたソフトウェアをインストールすることは、マルウェアのレッドカーペットを敷くようなものです。プレミアム プラグインの料金を支払うと、メンテナンスされたソフトウェア、何か問題が発生した場合のサポート、安全なコードの保証が得られます。ヌル化されたソフトウェアには、バックドアやマルウェアがパッケージ化されていることがよくあります。

    前にこの手順をスキップすることを選択した場合は、Web サイトをバックアップするための簡単なリマインダーが表示されます。もう終わりです。 Web サイトからマルウェアを駆除することは、このプロセスの中で最も困難な (そして最も恐ろしい) ステップです。 

    4. WordPress コアを再インストールします

    cPanel または SFTP のファイル マネージャーを使用して Web サイトのファイルにアクセスし、次のフォルダーを完全に置き換えます。

    • /wp-admin
    • /wp-includes

    これらのフォルダーにはコンテンツや構成は保存されないため、これを問題なく行うことができます。実際のところ、これらのフォルダーにはクリーン インストールと異なるものは何も存在しないはずです。 

    次に、次のファイルに奇妙なコードがないか確認します。

    • インデックス.php
    • wp-config.php
    • wp-settings.php
    • wp-load.php
    • .htaccess
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド ハッキングされたindex.phpファイル

    後のセクションでは、個々のハッキングとマルウェア、およびそれらがファイルやフォルダーにどのように現れるかについて説明します。マルウェアはさまざまな形で現れる可能性があり、それらを視覚的に識別する確実な方法はありません。これらのファイル内で奇妙に見える PHP スクリプトを探し、それらを削除するというアドバイスをオンラインで見かけるかもしれません。しかし、これは非常に不十分なアドバイスであり、Web サイトが壊れた後、ユーザーが私たちのサポート チームに群がってきました。 MalCare は、悪意があるかどうかを判断する前に、各スクリプトをテストしてその動作を評価します。 

    PHP ファイルに関して言えば、/wp-uploads にはファイルがまったく存在しないはずです。したがって、そこに表示されたものを削除しても、罰せられることはありません。 

    したがって、これらのファイルにどのような悪意のあるコードが含まれる可能性があるかを実際に予測することはできません。 WordPress ファイルの包括的なリストを参照して、それぞれの機能、相互接続性、Web サイト上のファイルの動作が異なるかどうかを理解してください。ここでは、コードロジックを理解することが非常に役立ちます。 

    ファイル全体に問題がある場合は、すぐに削除しないことをお勧めします。代わりに、ファイル拡張子の名前を PHP から phptest などの別の名前に変更して、実行できなくなるようにします。正当なファイル内のコードであれば、何かが壊れた場合にバックアップがあるため、削除できます。

    5.プラグインとテーマのフォルダーをクリーンアップします

    /wp-content フォルダーには、すべてのプラグイン ファイルとテーマ ファイルが含まれています。ダウンロードしたクリーン インストールを使用すると、WordPress コア インストールと同じチェックを実行して、コードの違いを探すことができます。

    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    ただ指摘したいのは、変化は必ずしも悪いものではないということです。カスタマイズはコードの変更として表示されます。プラグインやテーマを Web サイト上で適切に動作させるために設定や構成を調整した場合は、少なくとも小さな変更が見られることが予想されます。カスタマイズを完全に消去しても問題がない場合は、すべてのプラグインとテーマ ファイルを新規インストールに置き換えます。 

    一般に、人は正当な理由があれば、自分が費やした仕事を帳消しにしたくないものです。したがって、より長い方法では、代わりにコードの相違点を調べることになります。各スクリプトが何を行うのか、また Web サイトの他の部分とどのように相互作用するのかを知ることは役に立ちます。マルウェア スクリプトは、まったく別の場所にあるまったく無害に見える別のスクリプトによって実行されるまで、1 つのファイル内に無害に存在する可能性があります。マルウェアのこのタッグチームの側面が、Web サイトを手動で駆除することが非常に難しい理由の 1 つです。 

    プラグインとテーマのクリーニングのもう 1 つの側面は、プラグインとテーマが大量に存在する可能性があることです。それぞれを実行するのは骨の折れる時間のかかるプロセスです。私たちのアドバイスは、マルウェアを見つけるために最も一般的な場所から始めることです。  

    アクティブなテーマのファイルで、以下を確認してください。

    • ヘッダー.php
    • フッター.php
    • functions.php
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド functions.php ファイル内の wp-vcd マルウェア

    診断セクションでは、インストールされているプラグインに最近発見された脆弱性がないかどうかを調査することについて説明しました。これらのファイルから始めることをお勧めします。ここで尋ねるべき質問は次のとおりです:

    • 最近ハッキングされたことがありますか
    • 更新されていないものはありますか

    前のステップで偽のプラグインを見つけましたか?何も考えずに削除できるもの。ただし、その後の世話をやめないでください。マルウェア狩りはまだ終わっていません。 

    マルウェアは正常に見えるはずであり、正規のファイル名を模倣することに注意してください。羊の皮をかぶったオオカミをいくつか見かけましたが、twentysixteen や Twentytwelve などのストック WordPress テーマには小さなタイプミスがあり、実質的に同じように見えます。 

    クリーン インストールは比較と識別に役立ちますが、不明な場合は開発者にサポートを問い合わせてください。

    6.データベースからマルウェアを駆除する

    バックアップからデータベースを抽出するか、まだ取得していない場合は、phpMyAdmin を使用してデータベースをダウンロードします。

    • 既存のページや投稿に奇妙なコンテンツやスクリプトがないか表を確認してください。これらがウェブサイトに読み込まれたときにどのように表示され、どのように動作するかを知っているはずです。
    • 新しく作成されたページや投稿も探してください。これらは wp-admin ダッシュボードには表示されません。 

    リダイレクトハックなどの場合によっては、wp_options テーブルの site_URL プロパティに見慣れない URL が含まれることがあります。リダイレクト マルウェアが wp_posts テーブルにある場合、すべての投稿に存在します。 

    変更した設定を本来の状態に戻し、悪意のあるコンテンツを慎重に削除します。 

    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド wp_options テーブル内のスパム URL

    繰り返しますが、Web サイトの規模によっては、これは膨大な作業になる可能性があります。最初のハードルは、マルウェアとそれがどこにあるかを特定することです。各投稿とページに同じマルウェア スクリプトが含まれている場合は、幸運です。 SQL を使用して、すべてのファイルからコンテンツを抽出できます。ただし、単一ロットのマルウェアを削除するのは素晴らしいことですが、それが Web サイト上の唯一のハッキングであるかどうかはわかりません。 

    重要なユーザー情報や注文情報を含む電子商取引 Web サイトをお持ちの場合は、マルウェアのみを確実に除去していることを二重、三重に確認してください。

    7.ルートに不審なファイルがないか確認してください

    Web サイトのファイルを調べるときは、ルート フォルダーにも注目してください。マルウェア ファイルが保存されている可能性もあります。すべての PHP ファイルが悪いわけではなく、一部のプラグインは特定のタスクを実行するスクリプトをルートに追加します。たとえば、BlogVault は Emergency Connector スクリプトを Web サイトのルートに追加するため、サイトにアクセスできない場合でもプラグインがバックアップを復元できます。他のセキュリティ プラグインは、マルウェアではないものであっても、マルウェアとしてフラグを立てます。

    8.すべてのバックドアを削除します

    マルウェアは、発見され削除された場合に備えて、バックドアとして知られるエクスプロイトを Web サイトに残しておくことがよくあります。バックドアを使用すると、ハッカーはほぼ即座に Web サイトに再感染できるため、駆除作業がすべて無効になります。 

    マルウェアと同様に、バックドアはどこにでも存在する可能性があります。探すコードは次のとおりです。

    • 評価
    • base64_decode
    • グジンフレート
    • preg_replace
    • str_rot13

    これらは外部アクセスを可能にする機能であり、本質的に悪いことではありません。これらには正当な使用例があり、バックドアとして機能するように微妙に変更されることがよくあります。分析せずにこれらを削除する場合は注意してください。 

    9.クリーンアップしたファイルを再アップロードします

    Web サイトからマルウェアを駆除したので、最悪の事態は終わりました。次はウェブサイトを再構築する問題です。まず、既存のファイルとデータベースを削除し、その場所にクリーンアップされたバージョンをアップロードします。

    cPanel のファイル マネージャーと phpMyAdmin を使用して、それぞれファイルとデータベースに対してこれを実行します。ここまでで、あなたはこれらの機能を扱うプロになったことでしょう。さらにヘルプが必要な場合は、手動バックアップの復元に関する記事を参照してください。プロセスは同じです。 

    大規模な復元が機能しなくても落胆しないでください。 cPanel は、一定の制限を超えるデータを処理するのに苦労します。 SFTP を使用してこの手順を実行することもできます。 

    10.キャッシュをクリアします

    サイトを再度組み立て、すべてが期待どおりに動作するかどうかを数回確認した後、キャッシュをクリアします。キャッシュには、訪問者の読み込み時間を短縮するために、Web サイトの以前のバージョンが保存されます。 クリーンアップ後にウェブサイトが期待どおりに動作するように、キャッシュを空にしてください。

    11.各プラグインとテーマを確認します

    このソフトウェアのクリーンなバージョンを使用して Web サイトを再インストールしたので、それぞれの機能を確認してください。期待どおりに機能しますか? 

    もしそうなら、それは素晴らしいことです。そうでない場合は、古いプラグイン フォルダーに戻って、クリーンアップされた Web サイトに何が反映されなかったのかを確認します。おそらく、そのコードの一部が不足している機能の原因となっている可能性があります。その後、コードがマルウェアに感染していないか十分に注意しながら、コードを Web サイトに再度複製できます。 

    一度に 1 つのプラグインとテーマを実行することをお勧めします。プラグイン フォルダーの名前を一時的に変更すると、プラグイン フォルダーを効果的に非アクティブ化できます。同じ方法がテーマフォルダーでも機能します。  

    12.サブドメインとネストされた WordPress インストールに対してこのプロセスを繰り返します

    これはあなたには当てはまらないかもしれませんが、メイン サイトに 2 つ目の WordPress をインストールしている Web サイトをいくつか見てきました。これは、サイトのデザイン、サブドメイン、忘れられたステージング サイトなど、いくつかの原因が考えられます。 

    プライマリ WordPress サイトにマルウェアがあった場合、ネストされたインストールが汚染される可能性があり、汚染される可能性があります。その逆もまた真です。ネストされたインストールにマルウェアが存在すると、駆除したばかりの Web サイトが再感染します。 

    通常、未使用の WordPress インストールを完全に削除するようユーザーに依頼します。それらは不必要な危険です。 

    13.セキュリティ スキャナを使用して確認します

    もうすぐゴールラインです!これは大変な道のりでしたが、あなたがやり遂げた偉業に少し時間を割いて感謝する必要があります。 WordPress の専門家でも、WordPress のハックを手動でクリーンアップすることに必ずしも慣れているわけではなく、代わりにツールを使用することを好みます。

    あとは、マルウェアが本当に Web サイトから削除されたことを確認するだけです。 MalCare の無料スキャナーを使用してその確認を取得すれば、準備完了です。

    ステップ 3. ハックを削除した後にダメージを元に戻す

    ハッキングされた WordPress ウェブサイトの完全な修復には、マルウェアの削除、損傷の回復、セキュリティの強化が含まれます。

    Web サイトからマルウェアが除去されたら、ハッキングによる被害を最初から回復することに集中できます。 Web サイトに関しては、(訪問者とあなた以外に) Web ホストと Google という 2 つの主な関係者がいます。 

    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    ウェブサイトへのアクセスを回復する

    クリーニングが完了したら Web ホストに連絡し、Web サイトを再スキャンするように依頼してください。問題を解決するために実行した手順を詳しく説明することもできます。必ず、これによりアクセスが回復され、サイトがオンラインに戻ります。 

    サイトを Google のブラックリストから削除してもらう

    あなたのウェブサイトが Google のブラックリストに載った場合は、審査をリクエストする必要があります。これを行うには、Google Search Console にアクセスし、[セキュリティの問題] をクリックします。ここには、有害なコンテンツに関する警告が表示され、どのファイルに有害なコンテンツが含まれているかが詳しく表示されます。 

    このアラートの一番下に、レビューをリクエストするボタンがあります。問題を修正したことを保証し、リストされた各問題に対して実行したすべての手順について詳細な説明を提供する必要があります。 

    リクエストが送信されると、数日以内にリクエストの結果が届きます。 

    ブランドダメージコントロール

    このステップは完全にオプションであり、単なるアドバイスです。後で説明しますが、ハッキングはほとんどの場合、評判を傷つけます。可能であれば、何が起こったのか、それを修正するためにどのような措置を講じたのか、そして今後どのように防止するつもりなのかを公に認めてください。 

    正直さは関係を再構築するのに大いに役立ち、うまく対処されたハッキングがブランド価値の向上につながった例もあります。 

    ステップ 4. 将来の WordPress ハッキングを防ぐ

    マルウェアの最悪の点の 1 つは、バックドアを通じて、または以前と同じ脆弱性を悪用して、マルウェアが繰り返し戻ってくることです。 

    私たちは、WordPress サイトが将来ハッキングされるのを防ぐために、このセキュリティ チェックリストをお客様と共有しています。 

    <オル>
  • セキュリティ プラグインをインストールします: スキャン、クリーンアップ、ハッキングの防止が可能な MalCare のような優れたセキュリティ プラグインの利点を十分に強調することはできません。 MalCare は、ハッキングを迅速に診断して駆除できることに加えて、高度なファイアウォールを使用して、ボットなどの多くのインターネットの厄介者から Web サイトを保護します。 MalCare の最も優れた点は、他のセキュリティ プラグインとは異なり、サーバー リソースを使い果たさないため、サイトが最適に動作しながらも保護されることです。 
  • <オル>
  • Change all user and database passwords: After vulnerabilities, poor password security and the resulting compromised user accounts are easily the top reason for hacked websites. 
  • <オル>
  • Reset user accounts: Get rid of any user accounts that shouldn’t be there. Review the privileges of those that should be there, only granting the minimal privileges required for the individual user. 
  • <オル>
  • Change salts + security keys: WordPress attaches long strings of random characters, known as salts and security keys, to login data in cookies. These are used to authenticate users, and to make sure they are logged in safely. To change these, WordPress has a generator, after which the updated strings can be put into the wp-config.php file. 
  • ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド <オル>
  • Choose your plugins and themes wisely: We highly recommend sticking to plugins and themes from reputed developers only. Not only will the developers provide support when required, but will maintain the plugin or theme code with constant updates. Updates are critical to patch vulnerabilities, and are your first line of defence against hacks.

    If you feel that nulled themes and plugins will save you money, you will end up losing whatever you save many times over when the inevitable hack occurs. Nulled themes and plugins are not only unethical, but downright dangerous. 

  • <オル>
  • Install SSL: SSL protects the communication to and from your website. SSL uses encryption to make sure it cannot be intercepted and read by anyone else. Google has been advocating for SSL implementation on websites for years now, and actively penalises website SEO if the website doesn’t have SSL. 
  • <オル>
  • Harden WordPress: There are measures to toughen up security, commonly known as WordPress hardening. We would caution you to be mindful of following the immense advice available online. Some of it is downright bad and will impact your website and visitors’ experience. Follow this guide to harden your website responsibly. 
  • <オル>
  • Update everything: All updates, whether WordPress, plugin, or theme, are necessary and should be done as soon as possible. Updates usually address issues in the code, like security vulnerabilities. It is especially critical because when security researchers discover vulnerabilities, they disclose them to the developer who then releases a patch for it. The researcher then discloses the vulnerability publicly, and that’s when mayhem erupts. Hackers will try their luck with any websites that don’t have the update installed.

    The resistance to WordPress updates is understandable, because it can disrupt operations, especially if something breaks. The safest way to implement updates is to use a staging site first, and then merge changes to live.

  • Implement an activity log: In order to keep a close eye on changes made to your website, an activity log is immensely useful. Apart from monitoring regular changes, unexpected changes like new users can signal that someone has unauthorized access. It will help you catch hacks early.
  • Use SFTP instead of FTP: Similar to SSL, SFTP is a secure way to use FTP to access your website backend on the server. Most admin avoid using FTP at all, because it tends to be slow and painstaking to work with. However, in case you cannot log into your website, FTP becomes necessary.
  • Remove secondary WordPress installations if not in use: We’ve seen this several times. Malware reappears on freshly cleaned websites, because there is a second website on the same cPanel with malware. It works both ways in fact. If either of the sites has malware, it is only a matter of time before the other one is infected.

    There are various reasons that you would have a second website installed on cPanel, and all of them are legitimate:site redesign, staging site, or even a subdomain. However, several times users forget about the second website, even to update or monitor it. It then gets hacked because of vulnerabilities, and the malware works its way into the main website.

  • Choose a good host: This is a somewhat subjective point, but it pays to do research to pick a good host. The general rule is to pick an established brand name and check how they have handled issues in the past. You want to have a web host that has responsive support, invests in their infrastructure, and has security certifications.
  • Invest in backups: We’ve said this a few times already in this article, but backups are non-negotiable. Backups are invaluable when all else fails, and our customers have been able to retrieve 100% of their website even after really bad hacks solely because of backups. 
  • Have a security plan in place/things to do regularly: Last, but certainly not least, have a plan in place to run through diagnostics regularly. Also, there are a few things that should be done to a cadence:review users, require password changes, monitor activity logs, update regularly, check for vulnerability news, and so on. Often, these measures will help avert major security-related disasters early on.
  • Can you fix WordPress hack issues permanently?

    No, WordPress hack issues cannot be fixed permanently. Any security professional, service, or product telling you so isn’t being truthful.

    WordPress security, much like all other types of security in the world, is a question of reducing risk, having insurance, and taking the right preventative steps.

    Even after all of this, will you be faced with the occasional WordPress hack cleanup?はい。 However the likelihood and severity will both be orders of magnitude less. So everything that we listed in the section above is still worth doing.

    Avoid fixing a hacked WordPress site manually

    There are so many things that can go horribly wrong with manual cleanups. Trust us, we have seen our fair share. If your wordpress site is compromised, the best course of action to return your site to good health is to install a security plugin.

    We strongly advise against manual cleaning, even though we have included the steps above. If you liken a hack to an illness, you would rather a qualified medical professional perform life-saving surgery, wouldn’t you? Imagine trying to remove your appendix yourself, and you get where we are going with this analogy. 

    Hacks, like invasive infections, get progressively worse with time. If malware is destroying your website data, for instance, acting fast could save you a great deal of time and resources. Not to mention, save your website too. 

    As malware replicates itself, it spreads into different files and folders, creates ghost admin users to regain entry if it is detected, and overall wreaks havoc. 

    On top of this, recovery becomes significantly harder. We’ve had users come to us with half-destroyed websites that they’ve tried to clean themselves, failed, and now are in desperate straits, trying to save whatever is left. We can do our best, but we can’t magic back their lost data for them—a situation that could have been avoided with some timely action. 

    The only reason we are reiterating this so many times is that we genuinely care about our users, and feel terrible every time we have to tell them that their data cannot be retrieved. 

    To recap, here are the things that can go wrong with manual WordPress hack removal:

    • Malware can spread into unexpected places, and is difficult to find. If you clean only some of it, the rest will soon reinfect your website again. 
    • Removing just the malware is not good enough if the vulnerability and/or backdoor isn’t found and resolved
    • You have to know what each file does and how it interacts with others, otherwise, you could inadvertently break your website 
    • Large sites (like e-commerce stores) will take ages to go through, file by file. It’s like looking for a needle in a haystack.
    • And last by not least, hacks cause increasingly more damage as time wears on

    Don’t fix a hack with a backup

    In spite of being huge advocates of backups, we do not recommend reverting your website to a previous version. There are several reasons for this: 

    • You will lose all the changes you made in between
    • The backup shouldn’t have the malware either, and unless you have a precise idea of when your website had malware, this is hard to ascertain
    • The backup will have the vulnerabilities that led to the malware infection in the first place

    The only time you should consider using a backup as a starting point is if the malware has destroyed your website and data beyond retrieval. We genuinely hope that it doesn’t ever reach that stage, and installing a good security plugin will save you from these issues in the future.

    Symptoms of a hacked WordPress website 

    Each hack is architected differently and therefore manifests in different ways. A spam link injection hack will not be the same as a remote code execution hack. So you will not see all of the symptoms below, but might come across one or two.

    1. Visible spam in Google search results

    You have spent time and energy working on SEO, so that your website ranks in keyword searches. These symptoms are particularly painful, because they are often hidden from site admin but visible to visitors—thus creating a very poor impression you have no idea about. 

    • Junk meta titles and descriptions: Titles and descriptions in the search results are supposed to be indicators of what the page contains. Hackers will inject spam pages on your site, which Google will then index and show in the search results. Pages will show up here as either Japanese characters, unrelated strings of keywords or junk values. 
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド
    • Results for pages you didn’t create, but are on your website: This is an especially trippy sensation, because if someone searches for a ranking keyword, your website will display these extra and unexpected pages in the results. Search results will show up 1000s of indexed pages, even if your site actually has less than 100. Those are indexed spam pages. 
    • Google blacklist: When a visitor clicks on your website from the search results, Google puts up a massive red warning advising the visitor that your website contains malware and is not safe. This is part of their Safe Browsing initiative, and other search engines use it to safeguard their users too. 
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド
    • ‘Site may be hacked’ notice: The lite version of the Google blacklist is to see a ‘Site may be hacked’ message underneath your website title in search results.
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド Site may be hacked notice on Google

    2. Problems on your website

    WordPress hacks can show up directly on your website, for everyone to see. These are usually because the hackers want to deface the website or perpetuate a social engineering attack, like phishing.

    You may see these pages if you are logged in as an admin or user, but if you do see pages or posts you didn’t create, chances are they would look like one of these:  

    • Spam pages :Spam pages on your website are mostly the same ones that show up in the search results. Spam pages are inserted into ranked websites to create inbound links for other websites. The malware will also alter your sitemap to include these spam pages. This is a play for SEO, and boosts the ranking of the destination website as a result. 
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド
    • Spam pop-ups: These pop-ups try to trick users into either downloading malware or visiting another website. Pop-ups can be caused because of malware or even advertising that you have enabled on your website via an ad network. Ad networks have generally secure policies with respect to advertiser content, but the odd malware can still creep in unexpectedly. 
    • Automatic redirects to other websites: This symptom causes our users maximum stress, because not only do the posts and pages redirect, but sometimes even the wp-login page does as well. This means that they can’t even stay on their website long enough to see what’s wrong. Because of that, we have an entire article dedicated to automatic redirects and how to fix them.
    • Phishing pages: WordPress Phishing is a type of social engineering attack, which dupes people into willingly sharing their data by pretending to be a legitimate website or service, especially banks. Often, when seeing phishing pages on a customer website, we have noticed bank logo image files in the code. Phishing pages are often used in conjunction with emails that appear to be from a trusted entity. The hacker sends out emails, and adds links to the pages on your site, which allows them to collect personal information under the guise of a trusted communication, adding to the website’s spam email issues.
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド Phishing website
    • Partially broken pages: You might see code at the top or bottom of some of the pages on your website. At first glance, it may seem like a code error, and it can sometimes be a result of a malfunctioning plugin or theme. But it can also signal the presence of malware.
    • Errors when loading the site: You visit your website, and your browser goes blank. No error messages, nothing. There is nothing to interact with or fix, and therefore no clue as to what has gone wrong with the website. On some versions of WordPress, this can show up as a critical error.

    3. Changes to the backend of your WordPress website

    These changes are often missed by website admin, unless they are hypervigilant or have an activity log and a file change monitor active.

    • Alterations to your website’s code: Your WordPress website is built with code, so these changes can be in core WordPress files, plugins, or themes. Basically, the malware can be anywhere. Certain types of malware or virus are clever enough to delete traces of themselves, and others evade file change monitors by altering timestamps.
    • Unexpected changes to posts and pages or new pages altogether: Posts and pages are added, or changes are made to existing ones. Many customers reported seeing these changes, even though they were the only ones managing the website content. New pages are likely to show up in anything that indexes your website, including Google search results, analytics, and your sitemap. 
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド
    • Unexpected users with admin privileges: In some cases, website admins have received emails about new accounts being created on their websites. The accounts usually had gibberish names or email addresses, mostly both. They were alerted to this unusual activity because they had enabled a setting that alerted them about the creation of new accounts. Sometimes users with subscriber privileges have inexplicably been escalated to administrators.
    • Settings are changed: Each website is set up differently, of course, so this symptom will vary between websites. In some cases, users reported that the account creation setting changed, while others said their index.php file was different. Each time the admin tried to revert it to its original state, the settings were changed right back again. 
    • Fake plugins: A lot of malware is cleverly hidden in seemingly legitimate folders and files. Fake plugins mimic the style of real plugins, but have very few files in them or have strange names which don’t typically follow naming conventions. This is not a firm diagnostic, but it is a good rule of thumb for identification.
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    4. Web host flags issues with your website

    Your web host is especially invested in making sure your website is malware-free because malware on their servers causes them huge problems. Most good web hosts regularly scan websites, and inform users about malware on their sites.

    • Takes your website offline: If your web host has suspended your account or taken your website offline, this is the first sign something is wrong. Although web hosts will also suspend your website due to policy violations or unpaid bills, malware is a big reason for this move. Invariably, they will have reached out over email with their reasons. In case they have detected malware, it is good practice to ask for the list of hacked files that their scanner has detected, and request them to whitelist IPs, so that you can access your website to clean them.
    • Excessive server usage: In this case, you get an email from your web host saying that your website has exceeded or is approaching the plan limits. Again, this is not a conclusive symptom, because you could be seeing a spike in traffic due to other reasons too, like a campaign or promotion. Or perhaps there is a topical reason. However, bot attacks and hacks consume a ton of server resources, and so it is best to investigate, if you see an unexpected spike in server resource usage. You can corroborate these findings with traffic analytics.

    5. Performance issues

    Malware can cause a huge gamut of things to go bust within the website. As we said before, sometimes the symptoms are invisible, or not explicit, like a new page or new user.

    Often, we see what look like harmless errors due to bad server or site performance, or even connectivity issues. To be clear, these could all well be innocuous, but they can also be a result of malware using up site resources.

    • Site becomes slow :Bots consume a lot of server resources. Increased spam pages and traffic use up request bandwidth. And the penalty is site performance. Sites that are very slow to load could have malware, because hackers do not optimise their code.
    • Site is inaccessible : Because server resources are used up, your visitors end up seeing a 503 or 504 error. However, there are other, legitimate ways a site can become inaccessible, like a geoblocking or changes to the .htaccess file.
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    6. User experience issues

    Admin are sometimes the last people to find out about hacks because hackers can hide symptoms from logged in users. However, the visitors still see symptoms, which is a terrible experience and has a negative impact on your brand.

    In our experience, getting complaints from visitors is a good and bad thing, because at least you are now aware of issues and can solve them. The scary part is to have visitors experience issues and leave, and you are none the wiser.

    If your visitors experience one or more of these symptoms, then there is definitely something amiss. 

    • Users can’t log into your website
    • Visitors get redirected from your website
    • Emails from the website go into spam folders
    • Visitors complain about seeing malware symptoms, like pop-ups or phishing pages

    7. Unexpected behaviour in analytics

    Analytics is a source of truth for many things, and signs of a malware infection just happen to be one of those things.

    • Search console flags security issues: Google Search Console scans your website frontend, much like a frontend scanner, and can find malware. You’ll see an alert on your dashboard, or see flagged pages in the Security Issues tab. 
    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド Security issues on Google Search Console
    • Increased traffic from certain countries: Increases in traffic can be a signal of malware, if they are unexpected. Google Analytics filters out most bot traffic anyway, but on occasion, users see spikes from particular countries. This symptom is generally more obvious to a locally relevant website.  

    There is a small chance your website could be malfunctioning because of a botched update or server issue or even a coding error. However, if you see more than one of these, your website is most probably hacked.

    Some key points to remember 

    • Hackers want malware to go undetected for as long as possible, so a lot of the symptoms are disguised from website admin and/or logged in users
    • Some may be visible all the time; some may happen occasionally/inconsistently
    • Some hacks are entirely invisible to everyone; depending on the malware
    • Some malware will only appear to Google and no one else

    How your WordPress site got hacked

    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    We like to think that everything we use is 100% secure, but that’s unfortunately not true. It isn’t true of our homes, and certainly not the case with our websites. No software is completely bullet-proof, and every part of the website is essentially software:right from WordPress itself, to the plugins and themes. 

    Vulnerabilities in plugins and themes

    When code is written, developers can make oversights or mistakes. These mistakes are called vulnerabilities. Vulnerabilities are the single biggest reason why websites get hacked. 

    Of course, mistakes aren’t made deliberately. Vulnerabilities often just boil down to a developer writing code to accomplish one task, without realizing that a hacker can use the same code in an unintended way to gain unauthorized access to the website.

    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    A good example of this concerns the /wp-uploads folder. In the cleaning section, we mentioned that the /wp-uploads folder should never have PHP scripts. The reason being that the contents of the folder are publicly accessible via the URL and the name of the file. 

    Therefore, PHP scripts in the uploads folder would also be accessible, and as a result, remotely executable. Therefore the folder should have a check to ensure that the uploads are not PHP files. If someone does try to upload a script, it should be rejected. 

    To see a list of WordPress vulnerabilities, check out WPScan. And here is a complete guide on how to use WPScan to scan for vulnerabilities.

    This example also brings up an interesting point. One could argue that the uploads folder should not be publicly accessible, so PHP scripts would not be accessible either. However, this interferes with the functionality of the folder and is not a good fix. 

    Similarly, we see a ton of poor security advice on the internet, which fixes a vulnerability without taking functionality into consideration. 

    Undetected backdoors

    A backdoor is very much what it sounds like:a way to gain unauthorized access without being detected. Even though backdoors are technically malware—code that has malicious intent—they are not actively damaging. They allow hackers to insert malware into the website.

    This distinction is important because it is the primary reason WordPress websites get hacked again after cleanups. Cleanups are effective at getting rid of malware, but not addressing the entry point of the malware. 

    Security plugins will often flag backdoors by looking for certain functions. But there are 2 problems with this method:firstly, hackers have found ways to mask the functions effectively; and secondly, the functions are not always bad. They have legitimate uses too.

    Poor user management policies

    There is always an element of human error with hacks, and it mostly comes in the form of the misuse of admin accounts. As a website admin, there are a few things you should always keep top of mind when considering the security of your website. 

    Weak passwords

    Yes, we know passwords are hard to remember. Especially ones that are a mix of characters, and long enough to be considered ‘safe’. However, easier-to-remember passwords are a weak link to your website security. Even a security plugin cannot protect your website if a password has been compromised. 

    Think of your website like your home, where you’ve installed a state-of-the-art security system, like MalCare. If a thief were to learn your unique passcode to gain entry to your home, the security system wouldn’t be able to do anything.

    Strong passwords are critically important for all accounts, but even more so for admin accounts, which brings us to our next point. 

    Unnecessary user privileges

    Users should only ever have enough privileges to accomplish what they need to on a website. A blog writer doesn’t need admin privileges to publish a post, for instance. It is very important to make sure to review these privileges regularly. 

    Additionally, if a website admin is vigilant about user account levels, an activity log is a great tool to have as well. The activity log lists all the actions performed by users on a website and can be a great early indicator of a compromised user account. If a user who usually writes posts suddenly installs a plugin out of the blue, it is a warning sign. 

    Old accounts are still active

    In addition to reviewing accounts, also remove unused user accounts regularly. If a user is no longer active on your website, there is no reason why their account should be. The reason is the same as before:user accounts can be compromised. Hackers can get hold of credentials and escalate their privileges to admin accounts. 

    Unsecured communication

    Apart from the actual website, communication to and from the website also needs to be secured. If communication is intercepted and is not secured, it can be read easily. So it should be encrypted. This can be easily accomplished by adding SSL to your website.

    In fact, SSL is becoming the de facto standard of the internet. Google actively rewards the use of SSL, by punishing websites without it in the SERPs. Some websites show up in the search results as ‘Site not secure’, as part of their Safe Browsing initiative. 

    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    On similar lines, it is always better to use SFTP instead of FTP, whenever possible. 

    Web host issues

    In our experience, web hosts are rarely responsible for hacks. Most hosts implement loads of security measures to make sure that the websites they host are secure.

    For instance, people often think that their websites have got malware because they are on shared hosting plans. This is a misconception most of the time, because hosts implement barriers between sites. The real cause of cross-site infections is when there are multiple WordPress installations on a single cPanel instance.

    Is WordPress prone to hacks?

    Yes and No. 

    The immense popularity of WordPress means that it attracts a lot more hackers to it. Very simply, there is a larger payoff for hackers if they are able to discover and exploit a vulnerability in the ecosystem. 

    Additionally, WordPress-related vulnerabilities get a lot more attention, again because of its popularity. Similar instances with, say Joomla, would not merit as much discussion. 

    In actual fact, WordPress has solved many of the problems that still exist with other CMS. It also has a terrific community and ecosystem as well. Help and support is easily available, even for niche and specific issues that a website admin may face.

    Understanding WordPress hacks

    If you have a security plugin like MalCare installed, you don’t need to worry about hacks. We constantly upgrade the plugin to counteract new attacks, in order to protect websites better. However, it is interesting to understand how hacks work, so that you can see just how critical a good security plugin is. There are two parts to the hacking process:

    • Hack mechanisms: How malware is inserted into the websites by either exploiting vulnerabilities or attacking the website. 
    • Types of malware: How the malware manifests itself on your website. There are a few ways that malware shows up on your website, but ultimately the hacker’s goal is to get unauthorised access to perform otherwise prohibited activities. We’ve expanded on why WordPress sites get hacked in a later section. 

    Hack mechanisms

    Previously in the article, we have talked about how websites get hacked. Either through vulnerabilities or backdoors, or sometimes poor passwords. These are flaws within the security of the website and are akin to weak points of a structure. 

    Hack mechanisms are the weapons used to attack those weak points. Their goal is to insert malware into the website. They are bots or programs that target weak points in specific ways to achieve their goal. There are several hack mechanisms, especially since hackers are getting smarter every day about circumventing the security systems of websites.

    • SQL injection: SQL is a programming language used to interact with database systems, in order to write, read or manipulate data. Websites interact with the database all the time, to save form data for instance, or to authenticate users. An SQL injection attack uses SQL to insert php scripts into the database.

      The injection is only possible if the form is not adequately protected from incorrect inputs. The hacker can use operators and programming logic to circumvent the functionality of a form, unless checks are put in place.

    • Cross-site scripting (XSS): Cross-site scripting(XSS) is also the injection of code, like with SQL injection, but into the browser. The next user to access the website or otherwise interact with the page in question becomes the target of this attack.

      Again, form fields are duped by hackers into accepting code like JavaScript and executing those scripts without validation. 

    • Distributed denial of service (DDoS): In a DDoS attack, hackers flood a website or system with so much malicious traffic that legitimate users cannot access it. The attack works because resources are limited or metered.

      For instance, a website using server resources will be on a plan for processing power and request handling. If the website is bombarded with 100x or even 1000x requests compared to what it normally receives, the server will not be unable to handle those requests and visitors will see an error.

    • Brute force attacks: This type of attack usually targets login pages, trying out combinations of usernames and passwords in order to gain access to the website. The hack mechanism is a bot, and will try out passwords, using words from a dictionary. A brute force attack also consumes server resources, and so will often end up keeping out genuine users and visitors.

      On many WordPress support threads, you will see advice to hide the login page to protect from this attack. This is an unwise thing to do, because the URL can be forgotten, it is tricky to distribute this URL to multiple users for login, and many more problems. It is best to have bot protection in place that keeps out this bad bot traffic.

    Types of malware

    The malware types we have listed appear to mirror symptoms closely. That’s because most malware has been named for the symptoms that each display. If you were to drill down into the malware, they aren’t all that different in construction or purpose. 

    All malware is out to use your website in some way or the other:use up its resources, steal data, piggyback on your SEO rankings, etc. The most commonly seen malware are: 

    • Pharma hack: Your website will have new pages or posts filled with keywords or links to sell pharmaceutical products, often grey market or illegal. These products are difficult to rank for on Google because of legality issues, and hence to get more traffic and sales, hackers insert these pages into unsuspecting websites.

      To detect a pharma hack on your website, you can try Googling pharma keywords like ‘viagra’ or ‘CBD’ with the search operator site:. It will list out all the pages on your website with that keyword.

    • Japanese keyword hack: The Japanese keyword hack is a variation of the pharma hack, and indeed of the next malware on this list, the SEO Spam hack. The only difference is that instead of pharmaceutical products, the malware will display Japanese content; often, unsavoury adult content.

      It is a little harder to check for this hack, unless you are familiar with Japanese and can look for keywords.

    • SEO spam hack: The SEO spam hack, as said before, is a variation on the first two. The content differs. Here, the spam content can include online gambling and casinos, or even chinese search results spam. This is effectively a catchall term for all hacks that insert extra pages into your website, but don’t fall into one of the special categories. 
    • Redirects: Malicious redirects take place when a visitor to your website is taken to an entirely different website, usually a spammy one. There are a few variations of the redirect hack, depending on where it appears.

      The most egregious aspect of the redirect hack is that website admin cannot log into their websites. Therefore, they cannot control the damage or even fix their website without expert help. 

    Examples of hack scripts, we’ve found in websites:

    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド

    It is difficult to protect against all the hack mechanisms, which is why installing a security plugin is very critical. MalCare’s sophisticated algorithm combats malware effectively, in addition to protecting websites against hack mechanisms. 

    Recommended read :Coinhive malware, wp-feed.php malware

    Consequences of a hacked site 

    The impact of a hacked WordPress website can be wide-ranging in bad consequences. The importance of web security cannot be sufficiently overestimated because of this reason. Website admins without exposure to cybersecurity may read about the occasional hack, but the full potential impact is not always evident.

    Therefore, it is critical to understand the impact in its entirety. The poor consequences are not confined to individual websites or their owners and administrators but have far-reaching implications. 

    Immediate impact on your website

    If your WordPress website is hacked, there are chances you won’t even realise it for a while. Rest assured, whether or not you can see a hack, the damage is unfolding and getting worse as time wears on. 

    Let’s say one of the ways the hack manifests is through malvertising; a very common sign with spammy ads or pages that redirect your website visitors to another website (usually a pharma site or one peddling illegal stuff). This has several implications: 

    • Google blacklist: Google is hyper-vigilant about hacked websites, because they do not want to send their users (search engine users) to dangerous websites. With malware, your website is now dangerous. So they will put up a massive, scary red notice advising visitors to stay far away from your website.

      Additionally, other search engines and browsers use this same blacklist to protect their own users. So even if your site doesn’t get flagged with the red screen, most browsers will warn your visitors away with messages.

    ハッキング後に WordPress サイトを完全に復元する:ステップバイステップの修正、クリーン、安全なガイド
    • SEO rankings will tank: As a result of fewer visitors and Google’s policy of protecting people, your website will stop showing up in results. Google calls this “hiding sites silently”. Not only are you going to lose ground you may have gained with an SEO strategy, but you will also lose visitors and discoverability.
    • Loss of trust and visitors: Most people will see spam content as a sign of a hack and know that your website is unsafe. If you are fortunate, someone will point it out. If not, your traffic numbers will decline.
    • Web host issues :Web hosts will quickly suspend websites that are hacked. If your website is hacked, your web host will face a lot of the heat, and will take hacked websites offline as soon as they are discovered to be hacked.

      A web host risks their IPs getting blacklisted with a hacked site. If your website is used for phishing attacks, and firewalls identify your website as the source, that means your IP address can be blacklisted, which will cause the host several issues.

      Also, a hacked website will often consume lots of server resources, and if your website is on shared hosting, that will adversely affect the performance of other websites, which are other customers of the web host. The problem becomes worse if there are bots attacking your website. Bots pummel your website with thousands and thousands of requests that consume tons of resources.

    • Unwitting pawn: Your website becomes a host for malware; part of a botnet that goes on to attack more websites.

    Business impact

    The impact of the previous section applies to all websites, large and small. The consequences are worse if your website is central to your business. Because then we are talking straight up the monetary loss. 

    • Loss of revenue: Downtime, poor SEO rankings, visitor numbers reducing are all contributing factors to loss in revenue. If people can’t or won’t visit your website, you aren’t going to get business that way.
    • Degraded branding: Trust is a huge commodity in online marketing, and hacks erode that trust. You may have had a competitive advantage in some cases. That too will be affected. Also, data breaches leave a stain on reputation. Some businesses handle the aftermath well, but the seed of doubt may be planted forever. Since things last forever on the Internet, a quick, intentional Google search will bring up hacks. It will become a point of consideration for any potential customer.
    • Server resources: We mentioned this in the previous section, but it bears mention from a monetary angle as well. Web hosts charge for excessive resource consumption. If your hacked website goes undetected for a while, you could also be paying for this fraudulent usage. Plus, if you are subject to bot attacks, the rapid depletion of (finite and allocated) server resources means that legitimate users will not be able to access your website.
    • Investment: You’ve spent time, money, and manpower to build this website. If you lose the website, you’ve lost that investment.
    • Legal issues: Data breaches of private information can cause you legal issues because of stringent data protection regulations. It is very important that websites that collect personal data from visitors treat that data with the utmost care. If it is compromised in any way, those people have grounds for legal action.
    • Cleaning cost: Hack removal is an expensive proposition, especially if you hire experts who actually know what they are doing.

      Apart from that, we often encounter website admin who try cleaning malware out by themselves, and cause their website to break. Then, in panic, they seek out expert help. Again, data retrieval is an expensive undertaking. 

    Dangerous for people

    Social engineering attacks, like phishing, have compounded impact. They are bad for the website and website admin being attacked, but also have terrible consequences for their users and visitors. 

    Credentials can be used to hack into other websites. Hackers can use aggregated information from websites to create personal profiles that can be used to hack into bank accounts and other restricted areas. People also tend to use the same passwords in multiple places, making them especially vulnerable in these situations. 

    While all data theft is bad, it takes a tragic turn with the theft and release of information of vulnerable people, like those in witness protection programs or on the run from abusers. This information sells on the dark web, a particularly ugly place.

    Why WordPress websites get hacked

    All websites have value, whether large or small, business or personal. Many website owners of small blogs often have a false sense of security because they feel their website is “too small” to be hacked. 

    This is not true at all. While bigger websites will have a bigger payoff for hackers in terms of data theft for instance, smaller sites have value of their own. They can be used as a part of a botnet, for example. Or a site may have a small, dedicated following, which can be tapped for phishing scams via their email addresses. 

    Because people tend to use the same passwords for different accounts, it is theoretically possible to now hack into another site or system using this information. The small website played a small but crucial role in this chain of events. 

    Finally, hacking is always worth the effort. Hacks are rarely carried out manually. Malware, bots specifically, are designed to automate the hacking process. So there is minimal “effort” on the hacker’s front. Thus the gains of hacking your site are disproportionately stacked on the side of hackers. 

    結論

    In order to protect your website, it is important to be well-informed about WordPress security and hacks. In this article, we have attempted to explain WordPress hacks, motivations, impact, and much more, so you can make an informed decision about your website’s security. 

    We recommend MalCare to fix hacked WordPress website because it is a complete security solution, and is only getting better with time. We protect 1000s of websites daily, with our advanced firewall, scanning and cleaning algorithm, and much more. MalCare has found malware that most other scanners miss, and has saved our customers untold amounts in revenue. 

    ぜひご連絡ください。 Reach out to us via email for any questions, and we’re happy to help.

    よくある質問

    How do WordPress sites get hacked?

    Primarily, WordPress websites get hacked or keep getting hacked because of vulnerabilities in the core WordPress files, plugins, or themes. Hackers exploit these vulnerabilities to insert malware into the website. The second biggest reason that websites get hacked is because of poor or insecure passwords. 

    My WordPress site has been hacked, what to do?

    If your WordPress site is seriously compromised, there are steps you can take to fix the hack: 

    <オル>
  • Scan your website for malware using MalCare
  • Take a backup of your hacked WordPress site before cleanup
  • Use a security plugin to clean up hacked WordPress site
  • Install a web application firewall
  • Change all user passwords
  • What are the symptoms of malware on your website?

    Malware is misleading and it can hide from you because that’s how it is designed. So it is difficult to determine if you have malware on your website. But there are some symptoms that you can keep an eye out for. Here are a few symptoms to look out for, which can be an indicator of malware on your website:

    • Spam in Google search results
    • Problems on your website
    • Backend changes to website
    • Web host issues
    • Performance issues
    • User experience issues
    • Changes in analytics patterns

    How to scan a WordPress website for malware?

    There are three ways in which you can scan your website for hacks. Each of these ways has its pros and cons:

    <オル>
  • Deep scan with a security scanner
  • Scan using an online scanner
  • Scan for malware manually
  • We recommend that you scan using a security scanner such as MalCare, as MalCare is built specifically to look out for hidden malware that is not easy to find with other methods.

    How to clean your hacked WordPress website?

    There are different ways to clean your website, but we strongly recommend using a good security plugin like MalCare. MalCare allows you to auto clean your website within minutes and does not charge you per clean-up. It will also protect your website from future hacks.

    Alternatively, you can manually clean your site. However, unless you are a security expert, we do not recommend manual cleaning as it could lead to more problems than you already have.

    Will having multiple security plugins protect my site from hacks?

    There is a common misconception that installing several security plugins makes your website safer, presumably because whatever one plugin misses, the other one will catch. There are two problems with this theory:firstly, that’s not actually the case. New and sophisticated malware will slip through bad security plugins; and secondly, by adding multiple security plugins, you’re effectively weighing down your website so much, it will impact its performance dramatically.


    1. HTMLの高い属性

      HTMLのhigh属性は、ゲージとともに使用され、そのゲージの高い値を指定します。より良い結果を得るには、ゲージの最大、最小、低の属性で使用してください。 メートル高の例を見てみましょう プロパティ- 例 <!DOCTYPE html> <html> <head> <title>Meter high</title> <style>    form {       width:70%;       margin: 0 auto;  

    2. HTMLDOM時刻dateTimeプロパティ

      HTML DOM Time dateTimeプロパティは、time要素のdatetime属性を返す/設定します。 以下は構文です- 文字列値を返す timeObject.dateTime dateTimeの設定 文字列値に timeObject.dateTime = YYYY-MM-DDThh:mm:ssTZD ここでは、「 YYYY-MM-DDThh:mm:ssTZD 」は次のようになります- stringValue 詳細 YYYY 年を定義します(例:1998) MM 月を定義します(例:5月は05) DD 日を定義しま