> For the complete documentation index, see [llms.txt](https://snowyowls-organization.gitbook.io/snowyowl644-hacklog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://snowyowls-organization.gitbook.io/snowyowl644-hacklog/pentest_technique/google-dorks.md).

# Google Dorks

* Googleの検索演算子を駆使して、**意図せず公開されている機密情報やファイルを見つけ出す手法**

## Google Hacking Database

* <https://www.exploit-db.com/google-hacking-database>

## よく使われるDorks

• **site:** はドメイン内に限定する（例：site:example.com） • **intext: / intitle: / inurl:** で、検索対象を**本文 / タイトル / URL** に絞れる • **OR や "** で**論理演算・完全一致**も活用できる

#### 機密ファイルの検索

```sh
filetype:pdf site:example.com
filetype:xls site:example.com
filetype:doc inurl:example.com
```

#### 認証情報・設定ファイルの発見

```sh
filetype:env OR filetype:log OR filetype:ini intext:password
intitle:"index of" ".git"
inurl:"wp-config.php" "DB_PASSWORD"
```

&#x20;→.env や .ini ファイルなどに含まれる **パスワードやAPIキー** を探す。 → GitリポジトリやWordPressの設定ファイルの中身が漏れてないか確認。

#### ログインポータルや管理画面の特定

* 管理者画面、ログインフォーム、phpMyAdminなどの**管理系UIの露出確認**。

```sh
inurl:admin
intitle:"login" site:example.com
inurl:"/phpmyadmin"
```

#### 監視やセキュリティ関連の情報探し

* Webサーバーのステータス情報（Apacheの /server-status など）が**無防備に公開されていないか**を調べる。

```sh
intitle:"Apache Status" "Server Status for"
intitle:"index of" "nagios"
inurl:"/server-status"
```

#### ディレクトリリスティングの検出

* **ディレクトリリスティングが有効**になっていて、バックアップや機密フォルダが見える状態になっていないかをチェック

```sh
intitle:"index of /" site:example.com
intitle:"index of /backup"
intitle:"index of /confidential"
```

#### コメントやソースコードからの情報抽出

* GitHubやPastebinなどに、開発者がうっかり認証情報をアップしていないかを探る

```sh
site:github.com "password" "example.com"
site:pastebin.com "example.com"
```

#### ちょっと変わった（けど有効な）Dorks

* loginページでPHPが使われているものを探したり、“内部使用のみ”といったワードで漏れた内部資料を見つけたり

```sh
site:example.com inurl:login ext:php
site:example.com intext:"internal use only"
```
