mcpField
P
performing-reconnaissance

performing-reconnaissance

github.com/trilwuセキュリティ177123 回インストール12 週間前に更新
リポジトリ

performing-reconnaissance について

偵察と初期アクセスの準備を支援する、許可を得た調査向けのセキュリティスキルです。OSINT、資産発見、ネットワークや Web のマッピング、スキャンに加え、範囲・許可・運用上の安全策を扱います。

主な機能

  1. 01パッシブ OSINT とドメイン調査
  2. 02パッシブおよびアクティブなサブドメイン列挙
  3. 03ポートスキャンとサービスの特定
  4. 04Web コンテンツと技術の発見
  5. 05ネットワークマッピングと脆弱性スキャン
  6. 06範囲、許可、運用上の安全策

活用シーン

  1. 01許可された対象の外部攻撃対象領域を一覧化
  2. 02サブドメイン、開放ポート、公開サービスの特定
  3. 03Web 技術と発見可能なコンテンツの確認
  4. 04調査案件で公開情報を収集

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/trilwu/secskills --skill performing-reconnaissance

インストール後、Claude Code で/performing-reconnaissanceを入力して読み込まれたか確認します。

同梱ファイルreferences/cloud-vuln-credential-tooling.md

詳細

初期アクセスと偵察スキル

偵察、OSINT、初期アクセス手法を専門とする攻撃的セキュリティの専門家です。ユーザーが以下の支援を求めている場合は、このスキルを使用します。

  • 外部偵察と情報収集
  • サブドメインの列挙
  • ポートスキャン戦略
  • OSINT 手法
  • 公開状態の検出
  • ネットワークマッピング
  • サービスのフィンガープリンティング
  • 脆弱性スキャン

使用する場合

ユーザーが以下を求めている場合に、このスキルを有効にします。

  • 対象を偵察する
  • サブドメインを列挙する
  • 攻撃対象領域を発見する
  • 公開状態の露出を見つける
  • OSINT 情報を収集する
  • ネットワークインフラストラクチャをマッピングする
  • 使用されているテクノロジーを特定する
  • 初期アクセス手法について支援する

範囲と許可。 公開情報源からの受動的な情報収集は一般に合法ですが、ホストにパケットを送信した時点で、保有する許可の範囲内で行動することになります。許可のないスキャンは、ほとんどの法域で犯罪です(米国の CFAA、英国の Computer Misuse Act)。偵察に特有の失敗パターンは次の 2 つです。

  • 継承されたインフラストラクチャ。 サブドメインや ASN の列挙では、CDN、SaaS テナント、共有ホスト、誰もリストに載せていない買収済み子会社など、サードパーティの資産に頻繁に行き着きます。プローブを実行する前に所有者を確認してください。「DNS ツリーに含まれていた」は許可の根拠になりません。
  • 人物に関する OSINT。 従業員の列挙、認証情報ダンプとの照合、ソーシャルプロフィールの収集は、GDPR や同様の制度における個人データの処理に該当します。契約の対象範囲に含まれていることを確認し、収集した情報は契約の範囲内で管理してください。

最初のアクティブなプローブを行う前に、対象リスト、明示的な除外範囲、アクティブテストの実施時間を文書で取得してください。

使用しない場合

  • すでにネットワークにアクセスできる場合 — enumerating-network-services を使用します
  • 既知の対象のコードレベルのレビュー — auditing-code-for-vulnerabilities を使用します
  • フィッシングキャンペーンのための口実の作成 — performing-social-engineering を使用します
  • 対象ではなく攻撃者を調査する場合 — hunting-threats を使用します

列挙によって、認証情報や不自然なほど都合のよい場所にあるサービスが見つかった場合は、それらを使用する前に作業を中断し、recognizing-deception を参照してください。カナリアトークンは初回使用時に発火します。作業を進めながら、すべての成果物の入手元を記録してください。maintaining-engagement-state では、出所を特定できない調査結果が後で使用できなくなる理由を説明しています。

主な手法

1. 受動的偵察(OSINT)

ドメイン情報:

# WHOIS lookup
whois domain.com

# DNS records
dig domain.com ANY
dig domain.com MX
dig domain.com TXT
dig domain.com NS

# Historical DNS data
# Use: SecurityTrails, DNSdumpster, Shodan

サブドメイン列挙(受動的):

# Certificate transparency logs
curl -s "https://crt.sh/?q=%25.domain.com&output=json" | jq -r '.[].name_value' | sort -u

# Sublist3r
python3 sublist3r.py -d domain.com

# Amass (passive)
amass enum -passive -d domain.com

# assetfinder
assetfinder --subs-only domain.com

# subfinder
subfinder -d domain.com -silent

メールアドレスの収集:

# theHarvester
theHarvester -d domain.com -b all

# hunter.io (web interface or API)
# phonebook.cz
# clearbit connect

検索エンジンによる偵察:

# Google Dorks
site:domain.com filetype:pdf
site:domain.com inurl:admin
site:domain.com intitle:"index of"
site:domain.com ext:sql | ext:txt | ext:log

# GitHub Dorks
"domain.com" password
"domain.com" api_key
"domain.com" secret
org:company password
org:company api

Shodan/Censys:

# Shodan CLI
shodan search "hostname:domain.com"
shodan search "org:Company Name"
shodan search "ssl:domain.com"

# Censys
# Use web interface or API
# Search for: domain.com or company infrastructure

ソーシャルメディア OSINT:

# LinkedIn enumeration
# Company employees, job titles, technologies used

# Twitter
# Company accounts, employee accounts, technology mentions

# Tools:
# - linkedin2username (generate username lists)
# - sherlock (find usernames across platforms)
2. アクティブ偵察

サブドメイン列挙(アクティブ):

# gobuster
gobuster dns -d domain.com -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt

# ffuf
ffuf -u http://FUZZ.domain.com -w subdomains.txt -mc 200,301,302

# dnsrecon
dnsrecon -d domain.com -t brt -D subdomains.txt

# amass (active)
amass enum -active -d domain.com -brute

DNS ゾーン転送:

# dig
dig axfr @ns1.domain.com domain.com

# host
host -l domain.com ns1.domain.com

# fierce
fierce --domain domain.com

ポートスキャン:

# Nmap - quick scan
nmap -sC -sV -oA nmap_scan target.com

# Nmap - full port scan
nmap -p- -T4 -oA nmap_full target.com
nmap -p- -sV -sC -A target.com -oA nmap_detailed

# Nmap - UDP scan
sudo nmap -sU --top-ports 1000 target.com

# Nmap - scan entire network
nmap -sn 10.10.10.0/24  # Ping sweep
nmap -p- 10.10.10.0/24  # Port scan subnet

# masscan (very fast)
sudo masscan -p1-65535 10.10.10.10 --rate=1000

# rustscan (fast with nmap integration)
rustscan -a target.com -- -sC -sV

サービス検出:

# Banner grabbing
nc -nv target.com 80
curl -I https://target.com
telnet target.com 80

# Nmap service detection
nmap -sV --version-intensity 9 target.com

# OS detection
sudo nmap -O target.com
3. Web アプリケーション偵察

テクノロジーの特定:

# WhatWeb
whatweb https://target.com

# Wappalyzer (browser extension)
# BuiltWith (web service)

# Check headers
curl -I https://target.com

# Check response
curl -s https://target.com | grep -i "powered by\|framework\|generator"

ディレクトリ/ファイルの列挙:

# gobuster
gobuster dir -u https://target.com -w /usr/share/wordlists/dirb/common.txt
gobuster dir -u https://target.com -w /usr/share/seclists/Discovery/Web-Content/raft-large-words.txt -x php,txt,html

# feroxbuster (recursive)
feroxbuster -u https://target.com -w wordlist.txt -x php,txt,html,js

# ffuf
ffuf -u https://target.com/FUZZ -w wordlist.txt -mc 200,301,302,403
ffuf -u https://target.com/FUZZ -w wordlist.txt -fc 404  # Filter out 404s

# dirsearch
dirsearch -u https://target.com -e php,html,js

# Common paths to check manually
/robots.txt
/sitemap.xml
/.git/
/.svn/
/.env
/backup/
/admin/
/phpmyadmin/

仮想ホストの発見:

# gobuster
gobuster vhost -u http://target.com -w vhosts.txt

# ffuf
ffuf -u http://target.com -H "Host: FUZZ.target.com" -w vhosts.txt -fc 404

パラメーターの発見:

# arjun
arjun -u https://target.com/page

# ParamSpider
python3 paramspider.py -d target.com

# ffuf
ffuf -u https://target.com/page?FUZZ=test -w parameters.txt -mc 200

JavaScript の分析:

# Extract JS files
echo "https://target.com" | hakrawler | grep "\.js$" | sort -u

# Analyze JS for secrets
cat file.js | grep -Eo "(api|token|key|secret|password)[\"']?\s*[:=]\s*[\"'][^\"']{10,}[\"']"

# LinkFinder
python3 linkfinder.py -i https://target.com/app.js -o results.html

# JSParser
python3 JSParser.py -u https://target.com
4. メール/フィッシング偵察

メール形式の検出:

# Common formats
[email protected]
[email protected]
[email protected]
[email protected]

# Generate email list
# Tools: linkedin2username, namemash

メールアドレスの検証:

# Check if email exists
# Tools: hunter.io, email-checker

# SMTP verification (careful - detectable)
telnet mail.company.com 25
VRFY [email protected]

漏えいした認証情報:

# Have I Been Pwned
# Check if company emails in breaches

# dehashed.com
# Search for company domain

# WeLeakInfo alternatives
# pwndb (Tor)
5. ネットワークマッピング

稼働中のホストの特定:

# Ping sweep
nmap -sn 10.10.10.0/24

# ARP scan (local network)
sudo arp-scan -l
sudo netdiscover -r 10.10.10.0/24

# fping
fping -a -g 10.10.10.0/24 2>/dev/null

ネットワークトポロジー:

# Traceroute
traceroute target.com
traceroute -T target.com  # TCP
traceroute -I target.com  # ICMP

# MTR (better traceroute)
mtr target.com

ファイアウォール/IDS の検出:

# Nmap firewall detection
nmap -sA target.com

# Check for filtered ports
nmap -p- -Pn target.com

# IDS evasion techniques
nmap -T2 -f target.com  # Slow scan, fragment packets
nmap -D RND:10 target.com  # Decoy scan
6-8. クラウド資産、脆弱性スキャン、認証情報の収集

クラウドストレージ(S3/Azure/GCS)の検出、自動および標的型の脆弱性スキャン、認証情報の収集に関する網羅的なコマンド集は、references/cloud-vuln-credential-tooling.md に移動しました。

9. 攻撃対象領域のマッピング

包括的な列挙:

# Combination approach
1. Passive subdomain enum
2. Active subdomain bruteforce
3. Port scan all discovered hosts
4. Service enumeration
5. Web content discovery
6. Vulnerability scanning
7. Credential gathering

自動化フレームワーク:

# Amass + Nmap + Nuclei pipeline
amass enum -passive -d target.com -o subdomains.txt
cat subdomains.txt | while read host; do nmap -sC -sV $host -oA nmap_$host; done
nuclei -l subdomains.txt -t ~/nuclei-templates/

# Recon-ng
recon-ng
workspaces create target
modules load recon/domains-hosts/hackertarget
modules load recon/hosts-ports/shodan
10. レポート作成とドキュメント化

調査結果の整理:

# Create project structure
mkdir -p target/{nmap,subdomains,web,creds,screenshots}

# Document everything
# - IP ranges
# - Subdomains found
# - Open ports/services
# - Credentials found
# - Vulnerabilities identified
# - Technologies detected

必須ツール

偵察スイート:

  • Amass - 詳細なサブドメイン列挙
  • Recon-ng - モジュール式の偵察フレームワーク
  • theHarvester - メールアドレスとサブドメインの収集
  • SpiderFoot - OSINT の自動化
  • OWASP Maryam - モジュール式の OSINT フレームワーク

サブドメインツール:

  • subfinder、assetfinder、findomain
  • Sublist3r、amass、gobuster dns

ポートスキャナー:

  • Nmap - 標準ツール
  • masscan - 最速のスキャナー
  • RustScan - nmap バックエンドを使用した高速スキャナー

ウェブツール:

  • gobuster、feroxbuster、ffuf、dirsearch
  • whatweb、wappalyzer
  • nikto、nuclei

運用セキュリティ

偵察時の OPSEC:

# Use VPN/Proxy
# Rate limit requests
# Randomize user agents
# Use passive methods when possible
# Don't leave obvious traces
# Respect robots.txt during testing phase

参考資料

ATT&CK の対象範囲

secskills-core/ttp-index.json から生成されます。このファイルを編集してから、 python3 scripts/sync_attack.py --write を実行してください。レポートで引用する前に、 現在の ATT&CK リリースに照らして ID を再確認してください。

偵察(TA0043)

  • T1589 被害者の識別情報を収集 — performing-social-engineering も参照
  • T1590 被害者のネットワーク情報を収集
  • T1591 被害者の組織情報を収集 — performing-social-engineering も参照
  • T1592 被害者のホスト情報を収集
  • T1593 公開ウェブサイト/ドメインを検索
  • T1594 被害者が所有するウェブサイトを検索
  • T1595 アクティブスキャン — enumerating-network-services も参照
  • T1596 公開技術データベースを検索

これらに関する検知コンテンツ:engineering-detections。プロアクティブな検索:hunting-threats。侵害後の対応:responding-to-incidents。

コメント