Communitygithub.com

使用 MITRE ATT&CK Navigator 分析 APT 组织

查询 ATT&CK 数据(使用 attackcti、mitreattack-python 和 stix2 库),构建 MITRE ATT&CK Navigator 图层以及多图层热力图覆盖,用于映射一个或多个 APT 组织的技术、战术和检测覆盖范围。

使用 MITRE ATT&CK Navigator 分析 APT 组织 是什么?

该技能专为安全分析师、威胁情报人员以及检测工程团队设计,旨在利用 MITRE ATT&CK Navigator 对高级持续性威胁(APT)组织进行系统性的技术分析。它通过 attackcti 等 Python 库程序化地查询 ATT&CK 数据库,获取特定 APT 组织的技术、战术和过程(TTPs)信息,并自动生成标准的 Navigator 图层 JSON 文件。技能核心功能包括:创建单个 APT 组织的技术覆盖热力图、生成多组织比较图层以找出共性和独特技术、以及创建检测能力与威胁行为对比的覆盖层(红绿灯图)来识别检测盲区。此外,它还支持战术层面的详细分解分析,帮助团队了解攻击生命周期中各阶段的侧重。该技能适用于 Microsoft Windows、Linux、macOS 以及多种云平台(如 Azure AD、Office 365、SaaS),其输出可直接用于检测规则优先级的制定、安全监控覆盖率验证以及向管理层汇报的可操作情报报告。验证标准包括图层在 Navigator 中正确渲染、跨组织比较的结果准确以及检测差距分析中的技术来源建议是否合理。

兼容平台~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 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

使用 MITRE ATT&CK Navigator 分析 APT 组织 是做什么的?

概述

MITRE ATT&CK Navigator 是一个基于 Web 的工具,用于注释和探索 ATT&CK 矩阵,使分析师能够可视化威胁行为者的技术覆盖范围、比较多个 APT 组织、识别检测差距,并构建威胁驱动的防御策略。本技能涵盖如何以编程方式查询 ATT&CK 数据、将 APT 组织的 TTP(战术、技术和过程)映射到 Navigator 图层、创建用于差距分析的多图层叠加、以及为检测工程团队生成可操作的情报报告。

何时使用

  • 在调查需要分析 APT 组织及 MITRE Navigator 的安全事件时
  • 在为此领域构建检测规则或威胁狩猎查询时
  • 当 SOC 分析师需要针对此类分析的标准化流程时
  • 在验证相关攻击技术的安全监控覆盖范围时

前提条件

  • Python 3.9+ 并安装 attackcti, mitreattack-python, stix2, requests 库
  • ATT&CK Navigator (https://mitre-attack.github.io/attack-navigator/) 或本地部署
  • 了解 ATT&CK 企业矩阵:14 个战术、200+ 技术、子技术
  • 能够访问威胁情报报告或 MISP/OpenCTI 以获取威胁行为者数据
  • 熟悉 STIX 2.1 的入侵集合和攻击模式对象

关键概念

ATT&CK Navigator 图层

Navigator 图层是 JSON 文件,用于对 ATT&CK 技术进行评分、着色、添加注释和元数据标注。每个图层可以代表单个 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 代码标识(例如,G0016 对应 APT29,G0007 对应 APT28,G0032 对应 Lazarus Group)。

多图层分析

Navigator 支持同时加载多个图层,使分析师能够:将威胁行为者 TTP 与检测覆盖范围叠加以发现差距、比较多个 APT 组织以找出值得优先关注的通用技术、以及追踪随时间变化的技术覆盖率。

工作流程

第一步:为 APT 组织查询 ATT&CK 数据

from attackcti import attack_client
import json

lift = attack_client()

# 获取所有威胁组织
groups = lift.get_groups()
print(f"总 ATT&CK 组织数: {len(groups)}")

# 查找 APT29 (Cozy Bear / Midnight Blizzard)
apt29 = next((g for g in groups if g.get('name') == 'APT29'), None)
if apt29:
    print(f"组织: {apt29['name']}")
    print(f"别名: {apt29.get('aliases', [])}")
    print(f"描述: {apt29.get('description', '')[:300]}")

# 获取 APT29 (G0016) 使用的技术
techniques = lift.get_techniques_used_by_group("G0016")
print(f"APT29 使用了 {len(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", []),
        }

第二步:生成 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 覆盖范围",
        "versions": {"attack": "16.1", "navigator": "5.1.0", "layer": "4.5"},
        "domain": "enterprise-attack",
        "description": f"归因于 {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"由 {group_name} 使用", "color": color},
            {"label": "未观察到", "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("[+] 图层已保存: apt29_layer.json")

第三步:比较多个 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"所有组织共有的技术数量: {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"\n{gname} 独有的技术: {len(unique)} 项")

第四步:图层叠加的检测差距分析

# 定义您当前的检测能力
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"=== 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}%)")

# 创建差距图层(红色=未检测到,绿色=已检测到)
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"{'已检测' if tech_id in detected_techniques else '差距'}: {info.get('name', '')}",
            "enabled": True,
            "score": 100 if tech_id in detected_techniques else 0,
        })

gap_layer = {
    "name": "APT29 检测差距分析",
    "versions": {"attack": "16.1", "navigator": "5.1.0", "layer": "4.5"},
    "domain": "enterprise-attack",
    "description": "绿色 = 已检测,红色 = 差距",
    "techniques": gap_techniques,
    "gradient": {"colors": ["#ff3333", "#66ff66"], "minValue": 0, "maxValue": 100},
    "legendItems": [
        {"label": "已检测", "color": "#66ff66"},
        {"label": "检测差距", "color": "#ff3333"},
    ],
}
with open("apt29_gap_layer.json", "w") as f:
    json.dump(gap_layer, f, indent=2)

第五步:战术细分分析

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 战术细分 ===")
for tactic in tactic_order:
    techs = tactic_breakdown.get(tactic, [])
    if techs:
        print(f"\n{tactic.upper()} ({len(techs)} 项技术):")
        for t in techs:
            print(f"  {t['id']}: {t['name']}")

验证标准

  • ATT&CK 数据已通过 TAXII 服务器成功查询
  • 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,

相关技能