ウェブサイトがハッキングされた、さあどうする? - サイトがハッキングされた場合の対応方法
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
2011年9月1日木曜日
[本記事は 2008 年に公開された記事の抄訳です。また、ウェブマスター ツール ヘルプページで
サイトがハッキングされた、またはマルウェアに感染した場合
の対処方法が掲載されていますが、日本でもハッキングの事例が増えてきているため、改めてご紹介します。]
ウェブサイトのハッキング被害は多くのウェブマスターが経験することで、気をつけて予防策を講じていたとしても発生してしまうことがあるものです。予防のためのアドバイスとしては、最新のソフトウェアやパッチで常にサイトをアップデートしておくこと、
Google ウェブマスター ツール
に登録して 、インデックスの状態をチェックすること 、ログファイルに目を配り、不審な動きが見られないか確認しておくことなどが挙げられます。(さらに詳しい情報は、2007 年に掲載した「
Quick Security Checklist
」(英語)の記事にまとめてあります。)
それでは、ハッキングされた時、どうすればいいでしょうか? サイトをハッキングされたときに最初にすべきことは、ホスティング サービスを利用している場合はそこに連絡をすることです。多くの場合、技術的に困難な作業のほとんどはホスティング サービス業者が対応してくれます。ウェブマスターの多くは共有ホスティング サービスを利用していますが、その場合以下に挙げていることを実行するのが困難な場合があります。アスタリスク(*)のついたアドバイスは、共有ホスティング サービスを利用しているウェブマスターのみなさんが、ホスティング サービス業者の協力を必要とする可能性が高いものです。サーバーに対して完全な管理権を所有している場合は、以下の 4 つの原則に従うことをお勧めします。
サイトをオフラインにする
-
サイトを一時的に、少なくとも問題を解決できたと確信できるまでは、オフラインにします(ネットワークから切り離します)。*
-
オフラインにできない場合は、クロールされないように
503 ステータス コード
を返すよう設定します。
-
ウェブマスター ツールの
URL 削除ツール
を使用して、侵入者によって追加された可能性のあるページや URL を検索結果から削除します。こうすることで、ユーザーがハッキングされたページを閲覧してしまうことを防ぎます。
被害を分析する
-
ハッカーの侵入目的が何だったのかを把握することは重要です。
-
狙いは機密情報でしょうか?
-
他の目的のためにサイトを乗っ取ろうとしたのでしょうか?
-
ウェブサーバー上で、改変またはアップロードされたファイルを探しましょう。
-
サーバー ログから、ログイン認証の失敗、コマンドの履歴(特に root で実行されたコマンド)、不明なユーザーアカウントなどの不審な活動をチェックしましょう。
-
被害の範囲を特定します。他にも影響を受けたかもしれないサイトはありませんか?
復旧する
-
最善策は、信頼できるソースから OS を完全に再インストールすることです。ハッカーによる被害をすべて確実に取り除くには、これ以外に方法はありません。*
-
再インストールが完了したら、最新のバックアップを使用してサイトを復旧します。この際、バックアップがハッキングの影響を受けていないことを必ず確認しましょう。*
-
インストールされたソフトウェアにパッチを当てて最新版にします。ブログ プラットフォーム、コンテンツ マネージメント システムや、その他サードパーティによるソフトウェアなどすべてが対象となります。
-
パスワードを変更します。
オンラインへの復帰
-
ウェブサイトを再びオンラインにします。
-
ウェブマスター ツールを使用している場合は、
-
サイトにマルウェアが存在すると検知された場合は、これらが排除されたかどうかを判断するために調査を申請してください。詳しい情報はヘルプ記事「
サイトがハッキングされた、またはマルウェアに感染した場合
」の「4: Google にサイトの再審査を依頼する」をご覧ください。
-
インデックスに入れたい URL に対して URL 削除ツールを使用した場合は、ウェブマスター ツールで削除を取り消してください。
-
ハッカーが再びサイトを攻撃する可能性がありますので、不審な動きに注意してください。
その他の質問と回答:
Q: クロールを防ぐためには、サイトをオフラインにするのと robots.txt を使用するのとでは、どちらが良いですか?
A: オフラインにする方が良いでしょう。マルウェアやバッドウェアがサイトの閲覧者に感染したり、ハッカーがサイトをさらに不正利用したりすることを防ぐことができます。
Q: サイトの問題解決後、どうしたら迅速に再度クロールしてもらえますか?
A: サイトがハッキングされたかどうかに関わらず、こちらの
ヘルプ記事
にある手順を踏んでください。
Q: サイトをクリーンアップしましたが、ハッカーによって悪いサイトへリンクされていた場合、検索順位に影響はあるのでしょうか?
A: Google でもそのような事態は望んでいません。ハッカーやスパマーの行為によって、良いサイトの検索順位などに影響が出ないように務めています。念のために、ハッカーが追加した可能性のあるリンクは完全に削除してください。
Q: 自宅のコンピュータがハッキングされた場合はどうしたらいいですか?
A: その場合も、上記の対策が適用できます。復旧には細心の注意を払ってください。注意を怠ると、同様の被害が再発してしまう可能性が高くなります。OS を再インストールするのが最善です。
その他の役に立つ情報:
この記事に関するコメントやご質問は、
ウェブマスター ヘルプ フォーラム
までお寄せください。
Written by Nathan Johns, Search Quality Team
Original version:
My site's been hacked - now what?
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2011-09-01 UTC。
[null,null,["最終更新日 2011-09-01 UTC。"],[[["\u003cp\u003eWebsites can be hacked despite preventative measures, resulting in malware infection and potential badware issues.\u003c/p\u003e\n"],["\u003cp\u003eWebmasters should contact their hosting provider for support and consider taking the site offline or returning a 503 status code.\u003c/p\u003e\n"],["\u003cp\u003eA complete OS reinstall from a trusted source is the best way to ensure complete malware removal, followed by restoring from a clean backup.\u003c/p\u003e\n"],["\u003cp\u003eWebmasters should change all passwords, patch software, and request a review in Google Webmaster Tools if the site was flagged for malware.\u003c/p\u003e\n"],["\u003cp\u003eGoogle tries to avoid penalizing sites for hacker-introduced backlinks, but webmasters should remove any suspicious links to be safe.\u003c/p\u003e\n"]]],["If hacked, immediately contact your hosting provider. Take the site offline or use a `503` status code, and remove hacked URLs via Webmaster Tools. Assess the damage by checking for modified files and suspicious server activity. Recover by reinstalling the OS, restoring from a clean backup, and updating all software. Restore your online presence and request a review in Webmaster Tools. Reinstalling the OS and using updated software are ideal to fully remove any potential harm.\n"],null,["# My site's been hacked - now what?\n\nMonday, April 07, 2008\n\n\nAll right, you got hacked. It happens to many webmasters, even despite the hard work you devote\nto prevent this type of thing from happening. Prevention tips include keeping your site updated\nwith the latest software and patches, creating an account with\n[Google Webmaster Tools](https://search.google.com/search-console)\nto see what's being indexed, keeping tabs on your log files to make sure nothing fishy's going\non, etc. (There's more information in the\n[Quick Security Checklist](/search/blog/2007/09/quick-security-checklist-for-webmasters)\nwe posted last year.)\n\n\nRemember that you're not alone---hacked sites are becoming increasingly common. Getting hacked\ncan result in your site being infected with badware (more specifically malware, one type of\nbadware). Take a look at\n[StopBadware's](https://www.stopbadware.org/) recently released report on\n[Trends in Badware 2007](https://www.stopbadware.org/pdfs/trends_in_badware_2007.pdf)\nfor a comprehensive analysis of threats and trends over the previous year. Check out\n[this light technical report](https://googleonlinesecurity.blogspot.com/2008/02/all-your-iframe-are-point-to-us.html)\non the\n[Google Online Security Blog](https://googleonlinesecurity.blogspot.com/)\nwhich highlights the increasing number of search results containing a URL labeled as harmful. For\neven more in-depth technical reports on the analysis of web-based malware, see\n[The Ghost in the Browser](https://www.usenix.org/events/hotbots07/tech/full_papers/provos/provos.pdf)\n(pdf) and this\n[technical report](https://research.google.com/archive/provos-2008a.pdf)\n(pdf) on drive-by downloads. Read these, and you'll have a much better understanding of the scope\nof the problem. They also include some real examples for different types of malware.\n\n\nThe first step in any case should be to contact your hosting provider, if you have one. Often\ntimes they can handle most of the technical heavy lifting for you. Lots of webmasters use shared\nhosting, which can make it difficult to do some of the things listed below. Certain tips labeled\nwith an asterisk (\\*) are cases in which webmasters using shared hosting will most likely require\nassistance from their hosting provider. In the case that you do have full control over your\nserver, we recommend covering these four bases:\n\nGetting your site off-line\n--------------------------\n\n- Take your site off-line temporarily, at least until you know you've fixed things.\n- If you can't take it off-line, return a [`503` status code](/search/docs/crawling-indexing/http-network-errors) to prevent it from being crawled.\n- In the Webmaster Tools, use the [URL removal tool](https://www.google.com/support/webmasters/bin/answer.py?answer=61062&topic=8459) to remove any hacked pages or URLs from search results that may have been added. This will prevent the hacked pages from being served to users.\n\nDamage Assessment\n-----------------\n\n- It's a good idea to figure out exactly what the hacker was after.\n - Were they looking for sensitive information?\n - Did they want to gain control of your site for other purposes?\n- Look for any modified or uploaded files on your web server.\n- Check your server logs for any suspicious activity, such as failed login attempts, command history (especially as root), unknown user accounts, etc.\n- Determine the scope of the problem---do you have other sites that may be affected?\n\nRecovery\n--------\n\n- The absolute best thing to do here is a complete reinstall of the OS from a trusted source. It's the only way to be completely sure you've removed everything the hacker may have done.\\*\n- After a fresh re-installation, use the latest backup you have to restore your site. Don't forget to make sure the backup is clean and doesn't have any hacked content.\\*\n- Patch any software packages to the latest version. This includes things such as weblog platforms, content management systems, or any other type of third-party software installed.\n- Change your passwords--- [see our help center for tips about creating a strong password](https://www.google.com/accounts/PasswordHelp)\n\nRestoring your online presence\n------------------------------\n\n- Get your system back online.\n- If you're a Webmaster Tools user, sign in to your account\n - If your site was flagged as having malware, request a review to determine whether your site is clean\n - If you used the URL removal tool on URLs which you do want in the index, request that Webmaster Tools re-include your content by revoking the removal.\n- Keep an eye on things, as the hacker may try to return.\n\nAnswers to other questions you may be asking:\n\n\n**Is it better to take my site off-line or use robots.txt to prevent it from being crawled?**\nTaking it off-line is a better way to go; this prevents any malware or badware from being served\nto users, and prevents hackers from further abusing the system.\n\n\n**Once I've fixed my site, what's the fastest way to get re-crawled?** The best way, regardless\nof whether or not your site got hacked, is to follow the\n[Webmaster Help Center guidelines](/search/docs/fundamentals/get-on-google).\n\n\n**I've cleaned it up, but will Google penalize me if the hacker linked to any bad\nneighborhoods?** We'll try not to. We're pretty good at making sure good sites don't get\npenalized by actions of hackers and spammers. To be safe, completely remove any links the hackers\nmay have added.\n\n\n**What if this happened on my home machine?** All of the above still applies. You'll want to\ntake extra care to clean it up; if you don't, it's likely the same thing will happen again. A\ncomplete re-install of the OS is ideal.\n\nAdditional resources you may find helpful:\n\n- If your site's been flagged by Google as serving malware, we'll [alert you](/search/blog/2006/11/badware-alerts-for-your-sites) when you visit [Webmaster Tools](https://search.google.com/search-console).\n- Don't forget about the [Google Webmaster Help Group](https://support.google.com/webmasters/community); it's full of extremely knowledgeable users, and Googlers as well. For a nice, on-topic example, check out [this thread](https://groups.google.com/group/Google_Webmaster_Help-Indexing/browse_thread/thread/98cd67810dc69942/72809bf28e8e039a). There's also a [Stop Badware group](https://groups.google.com/group/stopbadware).\n- Matt Cutts recently posted [Three tips to protect your WordPress installation](https://www.mattcutts.com/blog/three-tips-to-protect-your-wordpress-installation/) on his blog, and there are lots of great comments below the post as well.\n\nWritten by Nathan Johns, Search Quality Team"]]