redteam について
redteamは、攻撃者の視点からシステムを評価するセキュリティ向けエージェントスキルです。脆弱性の発見、攻撃のシミュレーション、影響評価を扱い、セキュリティレビューや許可を得た演習に利用できます。
主な機能
- 01さまざまな攻撃者の視点を採用
- 02攻撃対象領域と信頼境界を整理
- 03脆弱性や設定ミスを特定
- 04攻撃やセキュリティ制御の回避をシミュレーション
- 05技術面とビジネス面の影響を評価
活用シーン
- 01セキュリティ監査の準備
- 02許可を得た演習でインシデント対応を検証
- 03セキュリティ重視の設計や連携をレビュー
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ wojons/ skills --skill redteamインストール後、Claude Code で/redteamを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
README.mdreferences/README.mdscripts/recon.sh詳細
レッドチーム
攻撃者の視点に立ち、敵対的な思考、攻撃のシミュレーション、オフェンシブセキュリティテストを通じて、セキュリティ上の脆弱性、侵入経路、システム全体に潜む弱点を特定します。
どのような場合に利用するか
次のような場合に、このスキルを利用してください。
- セキュリティ評価や侵入テストを実施するとき
- セキュリティが重要なシステムや機能を設計するとき
- セキュリティ監査やコンプライアンス審査に備えるとき
- セキュリティインシデントや侵害に対応するとき
- 演習を通じて防御チーム(ブルーチーム)を訓練するとき
- セキュリティ制御や検知能力を評価するとき
- インシデント対応手順をテストするとき
- セキュリティアーキテクチャの決定を検証するとき
- サードパーティのシステムや統合を評価するとき
- セキュリティ意識と攻撃者への理解を深めるとき
できること
1. 攻撃者の視点を取り入れる
-
さまざまな種類の攻撃者のように考えます。
- スクリプトキディ(自動化ツールを使う、技術力は低い)
- 組織犯罪(金銭的動機、中程度の技術力)
- 国家主体(無制限のリソース、高い技術力)
- 内部脅威(知識、アクセス権、動機を持つ)
- ハクティビスト(思想的動機、注目を集めることが目的)
-
攻撃手法を取り入れます。
- 偵察(情報収集、フットプリンティング)
- スキャン(脆弱性の発見、列挙)
- エクスプロイト(脆弱性の悪用)
- 権限昇格(アクセス範囲の拡大)
- 永続化(アクセスの維持)
- 情報持ち出し(データの窃取、抽出)
2. 脆弱性の発見
- 攻撃対象領域と侵入ポイントを特定します
- 信頼境界と権限の移行をマッピングします
- セキュリティ設定の不備を発見します
- ロジックの欠陥やビジネスロジックの脆弱性を発見します
- 認証や認可の弱点を特定します
- 安全でないデータの取り扱いや保存方法を見つけます
- 不足しているセキュリティ制御を見つけます
3. エクスプロイトのシミュレーション
- 脆弱性を連鎖させて影響を最大化します
- 独創的な手法でセキュリティ制御を回避します
- コンポーネント間の信頼関係を悪用します
- (適切な場合)ソーシャルエンジニアリングの手法を使います
- (包括的な評価のために)物理セキュリティをテストします
- 高度な持続的脅威(APT)の戦術をシミュレーションします
4. 影響の評価
- エクスプロイトによる結果(データ損失、システム侵害)を評価します
- ビジネスへの影響(財務、評判、運用)を評価します
- 検知能力(攻撃が検知されない期間)を測定します
- 対応の有効性(インシデント対応、復旧)をテストします
- 可能性と影響に基づいてリスクレベルを定量化します
レッドチームの手法
偵察と情報収集:
- **オープンソースインテリジェンス(OSINT)**の収集
- ネットワークスキャンとサービスの列挙
- アプリケーションのフィンガープリンティングと使用技術の特定
- ソーシャルメディアのプロファイリング(ソーシャルエンジニアリング用)
- DNSの偵察とサブドメインの発見
脆弱性の特定:
- ツール(Nessus、OpenVAS など)を使った自動スキャン
- ロジックの欠陥やビジネスロジックの脆弱性を対象にした手動テスト
- セキュリティ上の弱点を見つけるためのコードレビュー
- セキュリティ設定の不備を見つけるための設定レビュー
- 設計上の欠陥を見つけるためのアーキテクチャ分析
エクスプロイトの手法:
- Web アプリケーション攻撃(SQLi、XSS、CSRF、SSRF など)
- ネットワーク攻撃(中間者攻撃、リプレイ攻撃、なりすまし)
- 認証の回避(パスワード解読、セッションハイジャック)
- 権限昇格(水平および垂直)
- 永続化の仕組み(バックドア、スケジュールされたタスクなど)
ソーシャルエンジニアリング:
- フィッシングのシミュレーション(メール、電話、対面)
- 口実の作成(説得力のある話や人物像)
- ベイティング(悪意のある USB の設置など)
- クイド・プロ・クオ(何かと引き換えに何かを提供する)
- テールゲーティング(物理的なアクセスに便乗する)
例
# Conduct reconnaissance on target system
npm run redteam:recon -- --target example.com --scope external
# Perform vulnerability assessment
npm run redteam:vulnerability-scan -- --target 192.168.1.0/24 --intensity aggressive
# Simulate web application attacks
npm run redteam:web-attack -- --url https://app.example.com --techniques "sql-injection,xss,csrf"
# Test social engineering resilience
npm run redteam:phishing-test -- --targets employees.csv --template "password-reset"
# Full red team engagement
npm run redteam:full-engagement -- --target organization --duration 2weeks --rules-of-engagement approved
出力形式
Red Team Engagement Report
──────────────────────────────
Target: E-commerce Platform (shop.example.com)
Engagement Duration: 72 hours
Rules of Engagement: Approved scope, no production impact
Red Team Lead: Synthetic Attacker #7
Executive Summary:
- Critical Vulnerabilities: 3
- High Severity Vulnerabilities: 7
- Medium Severity Vulnerabilities: 12
- Detection Rate: 42% (58% went undetected)
- Mean Time to Detection: 8.5 hours
- Business Impact Score: 8.2/10 (Severe)
Critical Findings:
1. Vulnerability: SQL Injection in Product Search
CVE Equivalent: CWE-89
Severity: Critical
Attack Path:
- Reconnaissance identified search functionality
- Fuzzing revealed parameter vulnerable to SQL injection
- Exploitation allowed database schema extraction
- Privilege escalation to database administrator
- Data exfiltration possible: 2.3M customer records
Proof of Concept:
GET /search?q=' UNION SELECT username,password FROM users-- Response: admin | 5f4dcc3b5aa765d61d8327deb882cf99
Impact:
- Complete database compromise
- Customer PII exposure (names, emails, addresses)
- Payment information potentially accessible
- Regulatory violations (GDPR, CCPA, PCI-DSS)
Business Consequences:
- Estimated fine: $4.2M (GDPR violation)
- Customer notification costs: $850K
- Reputational damage: 35% customer churn likely
- Legal liability: Class action lawsuits probable
Recommendation:
- Immediate: WAF rule blocking injection patterns
- Short-term: Parameterized queries implementation
- Long-term: Secure coding training, code review process
2. Vulnerability: Authentication Bypass via JWT Tampering
CVE Equivalent: CWE-287
Severity: High
Attack Path:
- Captured JWT token from legitimate user
- Analyzed token structure (header.payload.signature)
- Modified "role" claim from "user" to "admin"
- None signature verification detected
- Full administrative access achieved
Technical Details:
- JWT uses "none" algorithm vulnerability
- No signature validation on server side
- Role-based access control depends solely on token claims
Impact:
- Complete administrative control
- Order manipulation, pricing changes, user data access
- Financial fraud capability
- Platform compromise
Detection Metrics:
- Attack duration before detection: 14 hours
- Detection method: Manual log review (not automated)
- Alert quality: Low (generic "unusual activity")
Recommendation:
- Immediate: Reject "none" algorithm JWTs
- Short-term: Implement proper JWT validation
- Long-term: Add anomaly detection for admin actions
3. Vulnerability: Server-Side Request Forgery (SSRF)
CVE Equivalent: CWE-918
Severity: High
Attack Path:
- Image upload functionality accepts URLs
- SSRF to internal metadata service (169.254.169.254)
- AWS credentials retrieval
- Cloud environment compromise
Impact:
- Complete AWS account compromise
- Data exfiltration from S3 buckets
- Resource hijacking (crypto mining, botnet)
- Infrastructure destruction capability
Business Consequences:
- Cloud resource costs: $50K+/month potential
- Data breach: All cloud-stored data
- Service disruption: Complete outage possible
- Recovery time: Weeks to rebuild infrastructure
Recommendation:
- Immediate: Block metadata service access
- Short-term: Implement URL validation and allowlisting
- Long-term: Network segmentation, outbound proxy
Detection & Response Assessment:
- Security Monitoring Coverage: 65%
- Alert Quality Score: 4.2/10 (High false positives, low true positives)
- Mean Time to Respond: 3.5 hours (excluding undetected incidents)
- Incident Response Effectiveness: 6.1/10
- Forensic Capability: Basic (log review only)
Attack Simulation Metrics:
- Initial Compromise Time: 2.3 hours
- Privilege Escalation Time: 1.1 hours
- Lateral Movement Effectiveness: 8.7/10
- Persistence Established: 5 locations
- Data Exfiltration Simulation: 2.1GB in 4.5 hours
Red Team Observations:
1. Defense-in-depth lacking (single points of failure)
2. Detection focused on perimeter, blind to internal movement
3. Incident response reactive, not proactive
4. Security controls inconsistent across services
5. Developers lack security training (vulnerability density high)
Strategic Recommendations:
1. IMMEDIATE (Next 24 hours):
- Apply WAF rules for SQL injection protection
- Disable "none" algorithm for JWT
- Block metadata service access from applications
2. SHORT-TERM (Next 2 weeks):
- Implement parameterized queries globally
- Add JWT signature validation
- Deploy SSRF protection middleware
- Enhance monitoring for authentication anomalies
3. MEDIUM-TERM (Next 2 months):
- Conduct secure coding training for developers
- Implement automated security testing in CI/CD
- Enhance incident response playbooks
- Deploy endpoint detection and response (EDR)
4. LONG-TERM (Next 6 months):
- Establish security champion program
- Implement threat modeling process
- Deploy deception technology (honeypots, canaries)
- Conduct regular red team exercises (quarterly)
Lessons Learned:
- The most critical vulnerabilities were in business logic, not typical OWASP Top 10
- Detection failed for sophisticated attacks (58% undetected)
- Response was slow even for detected incidents
- Security debt accumulated from rapid feature development
- Attacker mindset revealed blind spots in defensive thinking
Engagement Value:
- Prevented potential breach: High confidence (>90%)
- Cost savings: Estimated $8.4M (fines + breach costs)
- Risk reduction: Significant (addressed critical vulnerabilities)
- Organizational learning: High (attacker perspective gained)
- Security maturity improvement: Foundation for growth
注意事項
- レッドチーム演習には、適切な許可とルール・オブ・エンゲージメントが必要です
- 個人やチームを責めるのではなく、セキュリティの向上に注力します
- 徹底的なテストと業務上の運用ニーズのバランスを取ります
- 実行可能な推奨事項を添えて、調査結果を明確に記録します
- 学んだ教訓を組織全体で共有します
- レッドチームの調査結果を活用して、ブルーチームの能力を向上させます
- 定期的なレッドチーム演習により、セキュリティの停滞を防ぎます
- 優れたレッドチームは、ツールを使うだけでなく、創造的に考えます
- 脆弱性の件数だけでなく、時間の経過に伴う改善を測定します
- レッドチーム演習は、共通理解を通じてセキュリティ文化を築きます
コメント
Markdown 対応