MITRE ATT&CKを用いた脅威アクターTTPの分析 は何をしますか?
概要
MITRE ATT&CKは、実際の観測に基づく敵対者の戦術、技法、手順(TTP)に関する世界的にアクセス可能な知識ベースです。このスキルでは、脅威アクターの振る舞いをATT&CKフレームワークに体系的にマッピングし、ATT&CK Navigatorを使用してテクニックカバレッジのヒートマップを作成し、検知ギャップを特定し、Enterprise、Mobile、ICSマトリクス全体で観測されたIOCを特定の敵対者のテクニックにリンクする実用的なインテリジェンスレポートを作成する方法を説明します。
使用すべき状況
- MITRE ATT&CKを用いた脅威アクターTTPの分析を必要とするセキュリティインシデントを調査する場合
- このドメインの検知ルールや脅威ハンティングクエリを作成する場合
- SOCアナリストがこの分析タイプの構造化された手順を必要とする場合
- 関連する攻撃テクニックに対するセキュリティ監視カバレッジを検証する場合
前提条件
- Python 3.9+ と
mitreattack-python、attackcti、stix2ライブラリ - MITRE ATT&CK Navigator(Webベースまたはローカルデプロイメント)
- 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マトリクスビジュアライゼーションを作成するためのWebベースのツールです。アナリストは、脅威アクターのカバレッジ、検知能力、またはリスク評価を可視化するために、テクニックにスコア、色、コメント、メタデータを注釈するレイヤー(JSONファイル)を作成します。
ワークフロー
ステップ1: ATT&CKデータをプログラムでクエリ
from attackcti import attack_client
import json
# ATT&CKクライアントの初期化(MITRE TAXIIサーバーにクエリ)
lift = attack_client()
# すべてのEnterpriseテクニックを取得
enterprise_techniques = lift.get_enterprise_techniques()
print(f"Enterpriseテクニックの総数: {len(enterprise_techniques)}")
# すべての脅威グループを取得
groups = lift.get_groups()
print(f"脅威グループの総数: {len(groups)}")
# 名前で特定のグループを取得
apt29 = [g for g in groups if 'APT29' in g.get('name', '')]
if apt29:
group = apt29[0]
print(f"グループ: {group['name']}")
print(f"別名: {group.get('aliases', [])}")
print(f"説明: {group.get('description', '')[:200]}")
ステップ2: 脅威アクターをATT&CKテクニックにマッピング
from attackcti import attack_client
lift = attack_client()
# APT29が使用するテクニックを取得
apt29_techniques = lift.get_techniques_used_by_group("G0016") # APT29グループ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は{len(technique_map)}個のテクニックを使用:")
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=""):
"""脅威グループのATT&CK NavigatorレイヤーJSONを生成する。"""
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", # 観測されたテクニックに赤色
"comment": info["description"][:200],
"enabled": True,
"score": 100,
"metadata": [
{"name": "group", "value": group_name},
],
})
layer = {
"name": f"{group_name} TTP カバレッジ",
"versions": {
"attack": "16.1",
"navigator": "5.1.0",
"layer": "4.5",
},
"domain": "enterprise-attack",
"description": description or f"{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": "観測されたテクニック", "color": "#ff6666"},
{"label": "観測されていない", "color": "#ffffff"},
],
"showTacticRowBackground": True,
"tacticRowBackground": "#dddddd",
"selectTechniquesAcrossTactics": True,
"selectSubtechniquesWithParent": False,
"selectVisibleTechniques": False,
}
return layer
# レイヤーの生成と保存
layer = create_navigator_layer("APT29", technique_map, "APT29(Cozy Bear)TTP分析")
with open("apt29_navigator_layer.json", "w") as f:
json.dump(layer, f, indent=2)
print("[+] Navigatorレイヤーを apt29_navigator_layer.json に保存しました")
ステップ4: 検知ギャップの特定
from attackcti import attack_client
lift = attack_client()
# データソースを持つすべてのテクニックを取得
all_techniques = lift.get_enterprise_techniques()
# データソースカバレッジマップを構築
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)
# 利用可能な検知と脅威アクターのテクニックを比較
detected_techniques = {"T1059", "T1071", "T1566"} # 例: 検知可能なテクニック
actor_techniques = set(technique_map.keys())
covered = actor_techniques.intersection(detected_techniques)
gaps = actor_techniques - detected_techniques
print(f"\n=== APT29の検知ギャップ分析 ===")
print(f"アクターテクニック: {len(actor_techniques)}")
print(f"検知済み: {len(covered)}({len(covered)/len(actor_techniques)*100:.0f}%)")
print(f"ギャップ: {len(gaps)}({len(gaps)/len(actor_techniques)*100:.0f}%)")
print(f"\n未検知のテクニック:")
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()
# 複数のグループ間でテクニックを比較
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
# 共通と固有のテクニックを見つける
all_groups = list(group_techniques.keys())
common_to_all = set.intersection(*group_techniques.values())
print(f"\nすべての{len(all_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"\n{gname}に固有のテクニック: {len(unique)}個")
検証基準
- TAXIIサーバーまたはローカルコピーを介してATT&CKデータが正常にクエリされた
- 脅威アクターが具体的な手順例を含む特定のテクニックにマッピングされた
- ATT&CK NavigatorレイヤーJSONが有効で、正しくレンダリングされる
- 検知ギャップ分析により、監視されていないテクニックが特定された
- グループ間比較により、共有および固有のTTPが明らかになった
- 出力が検知エンジニアリングの優先順位付けに実用的である