Communitygithub.com

analyzing-apt-group-with-mitre-navigator

attackcti、mitreattack-python、stix2を使ってATT&CKデータをクエリし、MITRE ATT&CK Navigatorのレイヤーや複数APTグループのマルチレイヤーヒートマップオーバーレイを構築します。

analyzing-apt-group-with-mitre-navigator とは?

このスキルは、MITRE ATT&CK Navigatorを使用してAPTグループの戦術、技術、手順(TTP)を分析するための包括的なワークフローを提供します。attackctiライブラリを使ってATT&CKデータをプログラムでクエリし、APTグループの技術使用状況を視覚化するNavigatorレイヤーJSONを作成します。さらに、複数のAPTグループ間で共通する技術や独自の技術を比較したり、検出カバレッジとのギャップ分析を実施し、赤/緑のヒートマップオーバーレイを生成します。このスキルは、SOCアナリストや検出エンジニアが脅威インテリジェンスに基づいた防御戦略を策定するのに役立ちます。Python 3.9+とattackcti、mitreattack-python、stix2、requestsライブラリが必要で、ATT&CK NavigatorはWebツールまたはローカルデプロイメントで使用できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-apt-group-with-mitre-navigator

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

MITRE ATT&CK Navigator を使用した APT グループの分析

概要

MITRE ATT&CK Navigator は、ATT&CK マトリックスに注釈を付け、探索するための Web ベースのツールです。これにより、アナリストは脅威アクターの技術カバレッジを可視化し、複数の APT グループを比較し、検出のギャップを特定し、脅威情報に基づいた防御戦略を構築できます。このスキルでは、ATT&CK データをプログラムでクエリし、APT グループの TTP を Navigator レイヤーにマッピングし、ギャップ分析のためのマルチレイヤーオーバーレイを作成し、検出エンジニアリングチーム向けの実用的なインテリジェンスレポートを生成する方法を説明します。

使用するタイミング

  • MITRE Navigator を使用した APT グループの分析が必要なセキュリティインシデントを調査する場合
  • このドメインの検出ルールや脅威ハンティングクエリを構築する場合
  • SOC アナリストがこの分析タイプの構造化された手順を必要とする場合
  • 関連する攻撃手法に対するセキュリティ監視カバレッジを検証する場合

前提条件

  • attackcti、mitreattack-python、stix2、requests ライブラリがインストールされた Python 3.9+
  • ATT&CK Navigator (https://mitre-attack.github.io/attack-navigator/) またはローカルデプロイメント
  • ATT&CK Enterprise マトリックスの理解: 14 の戦術、200 以上の技術、サブ技術
  • 脅威アクターデータのための脅威インテリジェンスレポートまたは MISP/OpenCTI へのアクセス
  • STIX 2.1 Intrusion Set および Attack Pattern オブジェクトに精通していること

主要な概念

ATT&CK Navigator レイヤー

Navigator レイヤーは、ATT&CK 技術にスコア、色、コメント、メタデータを注釈する JSON ファイルです。各レイヤーは、単一の APT グループの技術使用状況、検出機能マップ、または結合されたオーバーレイを表すことができます。レイヤーバージョン 4.5 は、enterprise-attack、mobile-attack、ics-attack ドメインをサポートし、プラットフォーム (Windows、Linux、macOS、Cloud、Azure AD、Office 365、SaaS) によるフィルタリングが可能です。

ATT&CK における APT グループプロファイル

ATT&CK は、140 を超える脅威グループの文書化された技術使用状況をカタログ化しています。各グループプロファイルには、別名、標的となるセクター、関連するキャンペーン、使用されるソフトウェア、手順レベルの詳細を含む技術マッピングが含まれます。グループは G コード (例: APT29 は G0016、APT28 は G0007、Lazarus Group は G0032) で識別されます。

マルチレイヤー分析

Navigator は複数のレイヤーを同時に読み込むことをサポートしており、アナリストは脅威アクターの TTP を検出カバレッジと重ね合わせてギャップを特定し、複数の APT グループを比較して優先すべき共通の技術を見つけ、時間の経過に伴う技術カバレッジの変化を追跡できます。

ワークフロー

ステップ 1: APT グループの ATT&CK データをクエリ

from attackcti import attack_client
import json

lift = attack_client()

# すべての脅威グループを取得
groups = lift.get_groups()
print(f"Total ATT&CK groups: {len(groups)}")

# APT29 (Cozy Bear / Midnight Blizzard) を見つける
apt29 = next((g for g in groups if g.get('name') == 'APT29'), None)
if apt29:
    print(f"Group: {apt29['name']}")
    print(f"Aliases: {apt29.get('aliases', [])}")
    print(f"Description: {apt29.get('description', '')[:300]}")

# APT29 (G0016) が使用する技術を取得
techniques = lift.get_techniques_used_by_group("G0016")
print(f"APT29 uses {len(techniques)} techniques")

technique_map = {}
for tech in techniques:
    tech_id = ""
    for ref in tech.get("external_references", []):
        if ref.get("source_name") == "mitre-attack":
            tech_id = ref.get("external_id", "")
            break
    if tech_id:
        tactics = [p.get("phase_name", "") for p in tech.get("kill_chain_phases", [])]
        technique_map[tech_id] = {
            "name": tech.get("name", ""),
            "tactics": tactics,
            "description": tech.get("description", "")[:500],
            "platforms": tech.get("x_mitre_platforms", []),
            "data_sources": tech.get("x_mitre_data_sources", []),
        }

ステップ 2: Navigator レイヤー JSON を生成

def create_navigator_layer(group_name, technique_map, color="#ff6666"):
    techniques_list = []
    for tech_id, info in technique_map.items():
        for tactic in info["tactics"]:
            techniques_list.append({
                "techniqueID": tech_id,
                "tactic": tactic,
                "color": color,
                "comment": info["name"],
                "enabled": True,
                "score": 100,
                "metadata": [
                    {"name": "group", "value": group_name},
                    {"name": "platforms", "value": ", ".join(info["platforms"])},
                ],
            })

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

layer = create_navigator_layer("APT29", technique_map)
with open("apt29_layer.json", "w") as f:
    json.dump(layer, f, indent=2)
print("[+] Layer saved: apt29_layer.json")

ステップ 3: 複数の APT グループを比較

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:
        for ref in t.get("external_references", []):
            if ref.get("source_name") == "mitre-attack":
                tech_ids.add(ref.get("external_id", ""))
    group_techniques[gname] = tech_ids

common_to_all = set.intersection(*group_techniques.values())
print(f"Techniques common to all groups: {len(common_to_all)}")
for tid in sorted(common_to_all):
    print(f"  {tid}")

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

ステップ 4: レイヤーオーバーレイによる検出ギャップ分析

# 現在の検出機能を定義
detected_techniques = {
    "T1059", "T1059.001", "T1071", "T1071.001", "T1566", "T1566.001",
    "T1547", "T1547.001", "T1053", "T1053.005", "T1078", "T1027",
}

actor_techniques = set(technique_map.keys())
covered = actor_techniques.intersection(detected_techniques)
gaps = actor_techniques - detected_techniques

print(f"=== 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}%)")

# ギャップレイヤーを作成 (赤 = 未検出, 緑 = 検出済み)
gap_techniques = []
for tech_id in actor_techniques:
    info = technique_map.get(tech_id, {})
    for tactic in info.get("tactics", [""]):
        color = "#66ff66" if tech_id in detected_techniques else "#ff3333"
        gap_techniques.append({
            "techniqueID": tech_id,
            "tactic": tactic,
            "color": color,
            "comment": f"{'DETECTED' if tech_id in detected_techniques else 'GAP'}: {info.get('name', '')}",
            "enabled": True,
            "score": 100 if tech_id in detected_techniques else 0,
        })

gap_layer = {
    "name": "APT29 Detection Gap Analysis",
    "versions": {"attack": "16.1", "navigator": "5.1.0", "layer": "4.5"},
    "domain": "enterprise-attack",
    "description": "Green = detected, Red = gap",
    "techniques": gap_techniques,
    "gradient": {"colors": ["#ff3333", "#66ff66"], "minValue": 0, "maxValue": 100},
    "legendItems": [
        {"label": "Detected", "color": "#66ff66"},
        {"label": "Detection Gap", "color": "#ff3333"},
    ],
}
with open("apt29_gap_layer.json", "w") as f:
    json.dump(gap_layer, f, indent=2)

ステップ 5: 戦術別内訳分析

from collections import defaultdict

tactic_breakdown = defaultdict(list)
for tech_id, info in technique_map.items():
    for tactic in info["tactics"]:
        tactic_breakdown[tactic].append({"id": tech_id, "name": info["name"]})

tactic_order = [
    "reconnaissance", "resource-development", "initial-access",
    "execution", "persistence", "privilege-escalation",
    "defense-evasion", "credential-access", "discovery",
    "lateral-movement", "collection", "command-and-control",
    "exfiltration", "impact",
]

print("\n=== APT29 Tactic Breakdown ===")
for tactic in tactic_order:
    techs = tactic_breakdown.get(tactic, [])
    if techs:
        print(f"\n{tactic.upper()} ({len(techs)} techniques):")
        for t in techs:
            print(f"  {t['id']}: {t['name']}")

検証基準

  • TAXII サーバー経由で ATT&CK データが正常にクエリされたこと
  • APT グループが、手順例を含むすべての文書化された技術にマッピングされていること
  • Navigator レイヤー JSON が検証され、ATT&CK Navigator で正しくレンダリングされること
  • マルチレイヤーオーバーレイが脅威アクターと検出カバレッジを示していること
  • 検出ギャップ分析により、監視されていない技術とデータソースの推奨事項が特定されること
  • グループ間比較により、共有および固有の TTP が明らかになること
  • 出力が検出エンジニアリングの優先順位付けに実用的であること

参考文献

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

analyzing-docker-container-forensics

Investigate compromised Docker containers by analyzing images, layers,

関連スキル