Google Dorking とは
Google Dorking(または Google Hacking)とは、Google検索の高度な演算子を組み合わせて、通常の検索では見つけにくい情報を発見するOSINT手法です。攻撃者は設定ミスにより公開されてしまったファイルや管理画面を発見するために使用します。
Google Dorksは教育・セキュリティ研究・自組織のセキュリティ確認に限って使用してください。他組織の非公開情報を取得しようとする行為は、意図に関わらず不正アクセス禁止法に抵触する可能性があります。
主要な検索演算子
site: — ドメイン絞り込み
特定のドメインに検索を限定します。
site:example.com # example.com のすべてのページ site:example.com filetype:pdf # example.com の PDF ファイル site:example.com inurl:admin # example.com の /admin を含むURL
filetype: — ファイル形式の指定
特定のファイル形式のみを検索します。
filetype:xlsx “password” # パスワードを含むExcelファイル filetype:log “error” site:example.com # ログファイル filetype:sql site:example.com # SQLファイル(DB情報漏えいリスク) filetype:env site:example.com # .env ファイル(APIキー漏えいリスク)
intitle: / inurl: — タイトルとURLの検索
intitle:“index of” # ディレクトリ一覧が開いているサーバー intitle:“phpMyAdmin” inurl:phpmyadmin # 公開されたphpMyAdmin inurl:“/wp-admin/” site:example.com # WordPressの管理画面
cache: / related: — その他の演算子
cache:example.com # Googleキャッシュを参照 related:example.com # 類似サイトを発見 “confidential” filetype:pdf site:example.com # 機密PDFの発見
実践的なDorkの例
セキュリティ研究で使われる典型的なDorkパターンです(自組織の確認用)。
| 目的 | Dork例 |
|---|---|
| 公開ディレクトリ | intitle:"index of" site:example.com |
| 設定ファイル | filetype:conf OR filetype:cfg site:example.com |
| バックアップファイル | filetype:bak OR filetype:backup site:example.com |
| 公開されたCredentials | "password" filetype:txt site:example.com |
| 管理画面の発見 | inurl:(admin OR login OR dashboard) site:example.com |
| カメラ映像 | inurl:"view/index.shtml" intitle:"live view" |
Exploit-DBが管理するGoogle Hacking Databaseには、数千件のDorkパターンが公開されています。自組織のセキュリティ確認に活用できます。カテゴリは「Footholds」「Files Containing Passwords」「Sensitive Directories」など13種類に分類されています。
組織側の対策
Google Dorkingで情報を発見されないための対策:
robots.txt の活用
User-agent: *
Disallow: /admin/
Disallow: /config/
Disallow: /backup/
robots.txtはクローラーへの「お願い」に過ぎず、悪意のある攻撃者はこれを無視します。むしろrobots.txtに「Disallow: /secret-path」と書くことで、その存在を教えてしまうリスクがあります。適切なアクセス制御が本質的な対策です。
実施すべき対策
- 定期的なDork確認: 自組織に対して主要Dorkを実行し、意図しない公開を発見
- Webサーバーのディレクトリリスティング無効化: Apache/Nginxの設定で
Options -Indexes - 機密ファイルの除外:
.env,.git,*.sql等を公開ディレクトリに配置しない - Google Search Console: Google にインデックスされたページを定期確認
Google Dorkで `intitle:"index of"` を使うと何が見つかりますか?