1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ディレクトリ探索・サブドメイン列挙ツール「gobuster」

Posted at

特徴

Webやディレクトリ、サブドメインなどのブルートフォース型スキャナーで、ペネトレーションテストやCTFで非常によく使われるツール。

基本構文

bash
$ gobuster <mode> [option]

モード

モード 概要
dir ディレクトリ・ファイル探索
dns サブドメイン列挙
fuzz ファズ検証
vhost バーチャルホスト
s3 Amazon S3パケット
dns DNSレコード

オプション

【共通オプション】

オプション 意味
-h, --help ヘルプ表示
-q, --quiet 結果のみ表示(エラー非表示)
-v, --verbose 詳細表示(リクエストログなど)
--version バージョン表示
--delay <duration> リクエスト間の遅延(例:200ms)
--timeout <duration> タイムアウト設定(例:10s)
--proxy http://host:port プロキシ経由で通信
--useragent <string> User-Agent 指定
--random-agent ランダムなUser-Agent使用
--headers "X-Header: value" 任意のHTTPヘッダ追加(複数可)
--no-tls-validation HTTPSの証明書を検証しない

【dirモードのオプション】

オプション 意味
-u, --url <url> 対象のURL(例:https://example.com)
-w, --wordlist <file> ワードリストのパス
-x, --extensions <exts> 拡張子追加(例:php,html)
-s, --status-codes <codes> 表示するステータスコード(例:200,204)
--exclude-length <len> 指定サイズのレスポンスを除外
--exclude-status <codes> 特定ステータスコードを除外
--wildcard ワイルドカード応答検出
-t, --threads <num> 並列スレッド数(デフォルト10)
-e, --expanded 結果にステータスコード・長さも表示
-k 証明書検証無効(--no-tls-validationと同等)
--follow-redirect リダイレクトを追従する
--no-robots robots.txt を無視
--add-slash パス末尾にスラッシュ追加(例:/admin/

【DNSモード】

オプション 意味
-d, --domain <domain> 対象のドメイン
-w, --wordlist <file> ワードリスト
-r, --resolver <ip> DNSリゾルバ(複数指定可)
-i, --show-ip 発見したIPアドレスも表示
-t, --threads <num> スレッド数

【fuzzモード】

オプション 意味
-u <url> URLにFUZZを含める(例:https://site.com/FUZZ
-w <wordlist> ファズ用のワードリスト

コマンド例

・ディレクトリ探索及び、*.php *.htmlファイルを探し、結果にはステータスコードおよび長さを表示

bash
gobuster dir -u https://target.com -w /usr/share/wordlists/dirb/common.txt -t 50 -x php,html -e

・サブドメイン列挙を30スレッドで並列的に行う

bash
gobuster dns -d example.com -w subdomains.txt -t 30

・URLのクエリパラメータで有効なものを調べる

bash
gobuster fuzz -u https://example.com/search.php?q=FUZZ -w payloads.txt
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?