web-discovery
できること
このスキルは、Webサイトのフォルダやファイルをスキャンし、別のホスト名を確認し、JavaScriptを読んでリンクを探す方法を説明します。自分が管理するか、テストを許可されたサイトをレビューする開発者とテスター向けです。
使う場面
- ✓開発者が、サイトに残された忘れられたページやバックアップファイルを見つけたいとき。
- ✓テスターが、同じサーバーでホストされている他のサイトを見つける必要があるとき。
- ✓サイトのJavaScriptコードが呼び出しているWebアドレスを一覧にしたいとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/recon/web-recon/discovery/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちのWebサイトに、忘れられた、または機密性の高いファイルが残っていないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、一般的なファイル名とフォルダ名を試し、別のホスト名を確認し、サイトのスクリプトを読む手順を示します。AIはレビューのために見つかったものを整理します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Web Discovery — Directories, vHosts, JavaScript
Surface the application's path tree, alternate virtual hosts, and JS-embedded endpoints/secrets. This is the first pass of web recon — feeds every later sub-skill.
1. Directory & File Discovery
ffuf (Recommended — Fast, Flexible)
# Basic directory fuzzing
ffuf -u https://<target>/FUZZ -w /usr/share/wordlists/dirb/common.txt -mc 200,301,302,403
# With file extensions
ffuf -u https://<target>/FUZZ -w /usr/share/wordlists/dirb/common.txt \
-e .php,.asp,.aspx,.jsp,.html,.js,.json,.xml,.txt,.bak,.old,.sql,.zip,.tar.gz
# Filter by response size (exclude default pages)
ffuf -u https://<target>/FUZZ -w wordlist.txt -fs <default_size>
# Recursive scanning (depth 2)
ffuf -u https://<target>/FUZZ -w wordlist.txt -recursion -recursion-depth 2
# Throttled for stealth
ffuf -u https://<target>/FUZZ -w wordlist.txt -rate 10 -mc 200,301,302,403
Sensitive Files to Check
# Common sensitive paths
for path in .env .git/config .htaccess robots.txt sitemap.xml \
wp-config.php web.config server-status .DS_Store \
backup.sql dump.sql database.sql .svn/entries \
crossdomain.xml clientaccesspolicy.xml; do
code=$(curl -s -o /dev/null -w "%{http_code}" "https://<target>/$path")
echo "$code $path"
done
2. Virtual Host (vHost) Discovery
# vHost fuzzing via Host header
ffuf -u https://<target_ip>/ -H "Host: FUZZ.<target>" \
-w /usr/share/wordlists/subdomains.txt -fs <default_size>
# With TLS SNI
ffuf -u https://FUZZ.<target>/ -w /usr/share/wordlists/subdomains.txt \
-mc 200,301,302,403 -fs <default_size>
Why vHost discovery matters:
- Multiple applications may share one IP but respond differently based on Host header
- Internal/staging apps often hidden behind non-public vhost names
3. Nginx/Apache Alias Off-By-One Probe
When a server uses alias /var/www/static/ for /static, an off-by-one allows reading parent directory:
- Configured:
location /static { alias /var/www/static/; }→/static../becomes/var/www/static/../→ escapes to/var/www/ - Vulnerable to:
/static../<file>requests reading outside the alias root
# Probe common alias-bound paths for off-by-one
# Get homepage size baseline first
curl -sk "https://<TARGET>/" -o /tmp/baseline.html
BASELINE=$(wc -c < /tmp/baseline.html)
for prefix in static images img assets files uploads media public; do
for suffix in '..' '..%2f' '%2e%2e' '%2e%2e%2f'; do
URL="https://<TARGET>/${prefix}${suffix}/"
CODE=$(curl -sk -o /tmp/probe.html -w "%{http_code}" "$URL")
SIZE=$(wc -c < /tmp/probe.html)
# Only flag if 200 AND size differs from homepage (not a fallback)
[ "$CODE" = "200" ] && [ "$SIZE" != "$BASELINE" ] && echo "CANDIDATE $CODE $SIZE $URL"
done
done
# If any candidate found, confirm with a known-content control file:
# curl -s "https://<TARGET>/static../etc/hostname"
# AND verify body content (see lfi.md "Response Body Verification" section)
Why this is in recon, not exploit: Discovering the alias misconfig is a recon task; exploiting it via path traversal is the exploit phase. Recon should surface alias-prefix candidates to the exploit agent.
Anti-pattern: Skipping the alias-prefix probe and going straight to parameter fuzzing on view.php (or similar) wastes the dispatch when the off-by-one alias misconfig is the actual vector. Including this probe in standard recon discovery flags the misconfig immediately.
4. JavaScript Analysis
Endpoint Extraction from JS
# Download all JS files
curl -s https://<target> | grep -oP 'src="[^"]*\.js"' | cut -d'"' -f2 | while read js; do
[[ "$js" == http* ]] || js="https://<target>$js"
echo "=== $js ==="
curl -s "$js" | grep -oP '["'"'"'](/[a-zA-Z0-9_/\-\.]+)["'"'"']' | sort -u
done
# Look for API keys, secrets, endpoints in JS
curl -s "https://<target>/main.js" | grep -oiE '(api[_-]?key|secret|token|password|auth)["\s]*[:=]["\s]*[a-zA-Z0-9+/=_\-]{8,}'
Source Map Detection
# Check for exposed source maps
curl -sI "https://<target>/main.js" | grep -i sourcemap
curl -s "https://<target>/main.js.map" | head -c 100
よくある質問
どのようなファイルを探しますか?
一般的な設定ファイル、バックアップファイル、バージョン管理のファイルとフォルダを確認します。
1つのページだけを見ますか?
いいえ。フォルダの階層をスキャンし、リンクされたスクリプトも読みます。
誰が対象ですか?
そのサイトのスキャンを許可された所有者とテスターです。
詳細
作者による元の説明
Web app discovery — directory/file fuzzing, vhost discovery, JavaScript endpoint extraction.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14155
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。