mcpField
A
analyzing-threat-actor-ttps-with-mitre-attack

analyzing-threat-actor-ttps-with-mitre-attack

github.com/mukul975セキュリティ35.2k314 回インストール8 週間前に更新
リポジトリ

analyzing-threat-actor-ttps-with-mitre-attack について

脅威の行動をMITRE ATT&CKにマッピングする手順を、セキュリティ分析担当者向けにまとめたスキルです。技術の対応付け、Navigatorのヒートマップ、検知ギャップ分析、脅威グループ間のTTP比較を扱います。

主な機能

  1. 01MITRE ATT&CKデータを検索
  2. 02脅威グループを攻撃技術に対応付け
  3. 03ATT&CK Navigatorレイヤーを生成
  4. 04検知範囲のギャップを特定
  5. 05グループ間のTTPを比較

活用シーン

  1. 01脅威グループの行動と技術を分析
  2. 02検知エンジニアリングの優先順位を決定
  3. 03複数グループの共通・固有TTPを比較

インストール

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

$npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill analyzing-threat-actor-ttps-with-mitre-attack

インストール後、Claude Code で/analyzing-threat-actor-ttps-with-mitre-attackを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

LICENSE
assets/
template.md
references/
api-reference.md
standards.md
workflows.md
scripts/
agent.py
process.py

詳細

MITRE ATT&CK を用いた脅威アクターの TTP 分析

概要

MITRE ATT&CK は、現実世界での観察に基づく敵対者の戦術、技法、手順(TTP)に関する、世界中からアクセス可能なナレッジベースです。このスキルでは、脅威アクターの行動を ATT&CK フレームワークに体系的にマッピングする方法、ATT&CK Navigator を使用して技法のカバレッジヒートマップを作成する方法、検知のギャップを特定する方法、そして Enterprise、Mobile、ICS の各マトリックスにわたり、観測された IOC を特定の敵対者の技法に結び付ける実用的なインテリジェンスレポートを作成する方法を扱います。

使用する場面

  • MITRE ATT&CK を用いて脅威アクターの TTP を分析する必要があるセキュリティインシデントを調査するとき
  • この分野の検知ルールや脅威ハンティングクエリを作成するとき
  • SOC アナリストがこの種の分析に関する体系的な手順を必要とするとき
  • 関連する攻撃技法に対するセキュリティ監視のカバレッジを検証するとき

前提条件

  • mitreattack-python、attackcti、stix2 ライブラリを含む Python 3.9 以降
  • MITRE ATT&CK Navigator(ウェブベースまたはローカル環境へのデプロイ)
  • ATT&CK マトリックスの構造(戦術、技法、サブテクニック)に関する理解
  • 脅威アクターデータを得るための脅威インテリジェンスレポート、または MISP/OpenCTI へのアクセス
  • STIX 2.1 Attack Pattern オブジェクトに関する知識

主要な概念

ATT&CK マトリックスの構造

ATT&CK Enterprise マトリックスでは、敵対者の行動を 14 の戦術(「なぜ」)に分類し、それらに技法(「どのように」)とサブテクニック(具体的な実装方法)が含まれます。各技法には、関連するデータソース、検知方法、緩和策、および観測された脅威グループの実際の手順例が記載されています。

脅威グループのプロファイル

ATT&CK には、140 を超える脅威グループ(APT28、APT29、Lazarus Group、FIN7 など)が登録されており、各グループが使用する技法が記録されています。各グループのプロファイルには、別名、標的とするセクター、関連するキャンペーン、使用するソフトウェア、および手順レベルの詳細を含む技法のマッピングが含まれています。

ATT&CK Navigator

ATT&CK Navigator は、カスタムの ATT&CK マトリックスの可視化を作成するためのウェブベースのツールです。アナリストは、技法にスコア、色、コメント、メタデータを付与するレイヤー(JSON ファイル)を作成し、脅威アクターのカバレッジ、検知能力、リスク評価などを可視化します。

ワークフロー

ステップ 1:ATT&CK データをプログラムで照会する
from attackcti import attack_client
import json

# Initialize ATT&CK client (queries MITRE TAXII server)
lift = attack_client()

# Get all Enterprise techniques
enterprise_techniques = lift.get_enterprise_techniques()
print(f"Total Enterprise techniques: {len(enterprise_techniques)}")

# Get all threat groups
groups = lift.get_groups()
print(f"Total threat groups: {len(groups)}")

# Get specific group by name
apt29 = [g for g in groups if 'APT29' in g.get('name', '')]
if apt29:
    group = apt29[0]
    print(f"Group: {group['name']}")
    print(f"Aliases: {group.get('aliases', [])}")
    print(f"Description: {group.get('description', '')[:200]}")
ステップ 2:脅威アクターを ATT&CK 技法にマッピングする
from attackcti import attack_client

lift = attack_client()

# Get techniques used by APT29
apt29_techniques = lift.get_techniques_used_by_group("G0016")  # APT29 group ID

technique_map = {}
for entry in apt29_techniques:
    tech_id = entry.get("external_references", [{}])[0].get("external_id", "")
    tech_name = entry.get("name", "")
    description = entry.get("description", "")
    tactic_refs = [
        phase.get("phase_name", "")
        for phase in entry.get("kill_chain_phases", [])
    ]

    technique_map[tech_id] = {
        "name": tech_name,
        "tactics": tactic_refs,
        "description": description[:300],
    }

print(f"\nAPT29 uses {len(technique_map)} techniques:")
for tid, info in sorted(technique_map.items()):
    print(f"  {tid}: {info['name']} [{', '.join(info['tactics'])}]")
ステップ 3:ATT&CK Navigator レイヤーを生成する
import json

def create_navigator_layer(group_name, technique_map, description=""):
    """Generate ATT&CK Navigator layer JSON for a threat group."""
    techniques_list = []
    for tech_id, info in technique_map.items():
        techniques_list.append({
            "techniqueID": tech_id,
            "tactic": info["tactics"][0] if info["tactics"] else "",
            "color": "#ff6666",  # Red for observed techniques
            "comment": info["description"][:200],
            "enabled": True,
            "score": 100,
            "metadata": [
                {"name": "group", "value": group_name},
            ],
        })

    layer = {
        "name": f"{group_name} TTP Coverage",
        "versions": {
            "attack": "16.1",
            "navigator": "5.1.0",
            "layer": "4.5",
        },
        "domain": "enterprise-attack",
        "description": description or f"Techniques attributed to {group_name}",
        "filters": {"platforms": ["Windows", "Linux", "macOS", "Cloud"]},
        "sorting": 0,
        "layout": {
            "layout": "side",
            "aggregateFunction": "average",
            "showID": True,
            "showName": True,
            "showAggregateScores": False,
            "countUnscored": False,
        },
        "hideDisabled": False,
        "techniques": techniques_list,
        "gradient": {
            "colors": ["#ffffff", "#ff6666"],
            "minValue": 0,
            "maxValue": 100,
        },
        "legendItems": [
            {"label": "Observed technique", "color": "#ff6666"},
            {"label": "Not observed", "color": "#ffffff"},
        ],
        "showTacticRowBackground": True,
        "tacticRowBackground": "#dddddd",
        "selectTechniquesAcrossTactics": True,
        "selectSubtechniquesWithParent": False,
        "selectVisibleTechniques": False,
    }

    return layer


# Generate and save layer
layer = create_navigator_layer("APT29", technique_map, "APT29 (Cozy Bear) TTP analysis")
with open("apt29_navigator_layer.json", "w") as f:
    json.dump(layer, f, indent=2)
print("[+] Navigator layer saved to apt29_navigator_layer.json")
ステップ 4:検知のギャップを特定する
from attackcti import attack_client

lift = attack_client()

# Get all techniques with data sources
all_techniques = lift.get_enterprise_techniques()

# Build data source coverage map
data_source_coverage = {}
for tech in all_techniques:
    tech_id = tech.get("external_references", [{}])[0].get("external_id", "")
    data_sources = tech.get("x_mitre_data_sources", [])

    for ds in data_sources:
        if ds not in data_source_coverage:
            data_source_coverage[ds] = []
        data_source_coverage[ds].append(tech_id)

# Compare threat actor techniques against available detections
detected_techniques = {"T1059", "T1071", "T1566"}  # Example: techniques you can detect
actor_techniques = set(technique_map.keys())

covered = actor_techniques.intersection(detected_techniques)
gaps = actor_techniques - detected_techniques

print(f"\n=== Detection Gap Analysis for APT29 ===")
print(f"Actor techniques: {len(actor_techniques)}")
print(f"Detected: {len(covered)} ({len(covered)/len(actor_techniques)*100:.0f}%)")
print(f"Gaps: {len(gaps)} ({len(gaps)/len(actor_techniques)*100:.0f}%)")
print(f"\nUndetected techniques:")
for tech_id in sorted(gaps):
    if tech_id in technique_map:
        print(f"  {tech_id}: {technique_map[tech_id]['name']}")
ステップ 5:グループ間で技法を比較する
from attackcti import attack_client

lift = attack_client()

# Compare techniques across multiple groups
groups_to_compare = {
    "G0016": "APT29",
    "G0007": "APT28",
    "G0032": "Lazarus Group",
}

group_techniques = {}
for gid, gname in groups_to_compare.items():
    techs = lift.get_techniques_used_by_group(gid)
    tech_ids = set()
    for t in techs:
        tid = t.get("external_references", [{}])[0].get("external_id", "")
        if tid:
            tech_ids.add(tid)
    group_techniques[gname] = tech_ids

# Find common and unique techniques
all_groups = list(group_techniques.keys())
common_to_all = set.intersection(*group_techniques.values())
print(f"\nTechniques common to all {len(all_groups)} groups: {len(common_to_all)}")
for tid in sorted(common_to_all):
    print(f"  {tid}")

for gname, techs in group_techniques.items():
    unique = techs - set.union(*[t for n, t in group_techniques.items() if n != gname])
    print(f"\nUnique to {gname}: {len(unique)} techniques")

検証基準

  • TAXII サーバーまたはローカルコピーを介して ATT&CK データを正常に照会できている
  • 脅威アクターが手順例とともに特定の技法にマッピングされている
  • ATT&CK Navigator のレイヤー JSON が有効で、正しく表示される
  • 検知ギャップ分析で監視対象外の技法が特定されている
  • グループ間の比較で共通する TTP と固有の TTP が明らかになっている
  • 出力が検知エンジニアリングの優先順位付けに活用できる

参考資料

コメント