analyzing-threat-actor-ttps-with-mitre-attack skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Systematically map threat actor behavior and observed IOCs to the MITRE ATT&CK framework, build technique coverage heatmaps with the ATT&CK Navigator, identify detection gaps, and produce actionable threat intelligence reports across the Enterprise, Mobile, and ICS matrices. Use when analyzing threat actor TTPs, correlating IOCs to specific ATT&CK techniques, or assessing defensive detection coverage against adversary behavior. Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/analyzing-threat-actor-ttps-with-mitre-attack/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-threat-actor-ttps-with-mitre-attack, or copy the skill folder into ~/.claude/skills/analyzing-threat-actor-ttps-with-mitre-attack/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/analyzing-threat-actor-ttps-with-mitre-attack/SKILL.md

SKILL.md (verbatim)

name: analyzing-threat-actor-ttps-with-mitre-attack
description: Systematically map threat actor behavior and observed IOCs to the MITRE ATT&CK framework, build technique coverage heatmaps with the ATT&CK Navigator, identify detection gaps, and produce actionable threat intelligence reports across the Enterprise, Mobile, and ICS matrices. Use when analyzing threat actor TTPs, correlating IOCs to specific ATT&CK techniques, or assessing defensive detection coverage against adversary behavior.
domain: cybersecurity
subdomain: threat-intelligence
tags:
- threat-intelligence
- cti
- ioc
- mitre-attack
- stix
- ttp-analysis
- threat-actors
version: '1.0'
author: mahipal
license: Apache-2.0
d3fend_techniques:
- Executable Denylisting
- Execution Isolation
- File Metadata Consistency Validation
- Content Format Conversion
- File Content Analysis
nist_csf:
- ID.RA-01
- ID.RA-05
- DE.CM-01
- DE.AE-02
mitre_attack:
- T1566.001
- T1059.001
- T1071.001
- T1547.001
- T1053.005

Analyzing Threat Actor TTPs with MITRE ATT&CK

Overview

MITRE ATT&CK is a globally-accessible knowledge base of adversary tactics, techniques, and procedures (TTPs) based on real-world observations. This skill covers systematically mapping threat actor behavior to the ATT&CK framework, building technique coverage heatmaps using the ATT&CK Navigator, identifying detection gaps, and producing actionable intelligence reports that link observed IOCs to specific adversary techniques across the Enterprise, Mobile, and ICS matrices.

When to Use

  • When investigating security incidents that require analyzing threat actor ttps with mitre attack
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Python 3.9+ with mitreattack-python, attackcti, stix2 libraries
  • MITRE ATT&CK Navigator (web-based or local deployment)
  • Understanding of ATT&CK matrix structure: Tactics, Techniques, Sub-techniques
  • Access to threat intelligence reports or MISP/OpenCTI for threat actor data
  • Familiarity with STIX 2.1 Attack Pattern objects

Key Concepts

ATT&CK Matrix Structure

The ATT&CK Enterprise matrix organizes adversary behavior into 14 Tactics (the "why") containing Techniques (the "how") and Sub-techniques (specific implementations). Each technique has associated data sources, detections, mitigations, and real-world procedure examples from observed threat groups.

Threat Group Profiles

ATT&CK catalogs over 140 threat groups (e.g., APT28, APT29, Lazarus Group, FIN7) with documented technique usage. Each group profile includes aliases, targeted sectors, associated campaigns, software used, and technique mappings with procedure-level detail.

ATT&CK Navigator

The ATT&CK Navigator is a web-based tool for creating custom ATT&CK matrix visualizations. Analysts create layers (JSON files) that annotate techniques with scores, colors, comments, and metadata to visualize threat actor coverage, detection capabilities, or risk assessments.

Workflow

Step 1: Query ATT&CK Data Programmatically

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]}")

Step 2: Map Threat Actor to ATT&CK Techniques

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'])}]")

Step 3: Generate ATT&CK Navigator Layer

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")

Step 4: Identify Detection Gaps

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']}")

Step 5: Cross-Group Technique Comparison

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")

Validation Criteria

  • ATT&CK data successfully queried via TAXII server or local copy
  • Threat actor mapped to specific techniques with procedure examples
  • ATT&CK Navigator layer JSON is valid and renders correctly
  • Detection gap analysis identifies unmonitored techniques
  • Cross-group comparison reveals shared and unique TTPs
  • Output is actionable for detection engineering prioritization

References

Other files in this skill

assets/template.md (verbatim)

Threat Actor TTP Analysis Report Template

Report Metadata

Field Value
Report ID TTP-YYYY-NNNN
Date YYYY-MM-DD
Threat Actor [Group Name]
ATT&CK ID G[NNNN]
Classification TLP:AMBER
Analyst [Name]

Threat Actor Profile

Attribute Detail
Name
Aliases
Suspected Origin
Motivation Espionage / Financial / Disruption
Active Since
Targeted Sectors
Targeted Regions
Associated Malware

TTP Summary

Tactic Technique Count Key Techniques
Reconnaissance
Resource Development
Initial Access
Execution
Persistence
Privilege Escalation
Defense Evasion
Credential Access
Discovery
Lateral Movement
Collection
Command and Control
Exfiltration
Impact

Detailed Technique Mapping

[Tactic Name]

ATT&CK ID Technique Sub-technique Procedure Example
T1566.001 Phishing Spearphishing Attachment Actor sends macro-enabled documents

Detection Coverage

Status Count Percentage
Detected %
Partial Detection %
No Detection (Gap) %

Detection Gaps (Priority Order)

Priority ATT&CK ID Technique Required Data Source Effort
1 Low/Med/High
2
Data Source Techniques Covered Current Status
Process Creation X techniques Collecting/Not Collecting
Network Traffic Flow X techniques
File Monitoring X techniques

ATT&CK Navigator Layer

Layer file: [group]_navigator_layer.json

Load at: https://mitre-attack.github.io/attack-navigator/

Recommendations

  1. Immediate: Deploy detections for [top 3 gap techniques]
  2. Short-term: Enable [data source] collection to cover N techniques
  3. Long-term: Build behavioral analytics for [tactic] coverage

references/api-reference.md (verbatim)

API Reference: Threat Actor TTP Analysis with MITRE ATT&CK

ATT&CK STIX Data

Download

curl -o enterprise-attack.json   https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json

STIX Object Types

Type Description
attack-pattern Techniques and sub-techniques
intrusion-set Threat actor groups
relationship Links (group "uses" technique)
malware Malware families
tool Legitimate tools abused

mitreattack-python

Installation

pip install mitreattack-python

Query Techniques

from mitreattack.stix20 import MitreAttackData
attack = MitreAttackData("enterprise-attack.json")

# Get all techniques
techniques = attack.get_techniques()

# Get group techniques
group = attack.get_group_by_alias("APT29")
techs = attack.get_techniques_used_by_group(group.id)

Get Technique Mitigations

mitigations = attack.get_mitigations_mitigating_technique(technique.id)
for m in mitigations:
    print(m.name, m.description)

ATT&CK Navigator Layer Format

Technique Entry

{
  "techniqueID": "T1566.001",
  "tactic": "initial-access",
  "color": "#ff6666",
  "score": 100,
  "comment": "Spearphishing Attachment",
  "enabled": true
}

ATT&CK Tactic IDs

Tactic ID
Reconnaissance TA0043
Resource Development TA0042
Initial Access TA0001
Execution TA0002
Persistence TA0003
Privilege Escalation TA0004
Defense Evasion TA0005
Credential Access TA0006
Discovery TA0007
Lateral Movement TA0008
Collection TA0009
Command and Control TA0011
Exfiltration TA0010
Impact TA0040

TAXII Server Access

from stix2 import TAXIICollectionSource, Filter
from taxii2client.v20 import Collection

collection = Collection(
    "https://cti-taxii.mitre.org/stix/collections/95ecc380-afe9-11e4-9b6c-751b66dd541e/"
)
src = TAXIICollectionSource(collection)
groups = src.query([Filter("type", "=", "intrusion-set")])

references/standards.md (verbatim)

Standards and Frameworks Reference

MITRE ATT&CK Framework

Matrix Structure

  • Enterprise ATT&CK: Windows, macOS, Linux, Cloud (AWS, Azure, GCP, SaaS, Office 365), Network, Containers
  • Mobile ATT&CK: Android, iOS
  • ICS ATT&CK: Industrial Control Systems

14 Enterprise Tactics (Kill Chain Order)

  1. Reconnaissance (TA0043): Gathering information for planning
  2. Resource Development (TA0042): Establishing resources for operations
  3. Initial Access (TA0001): Gaining initial foothold
  4. Execution (TA0002): Running adversary-controlled code
  5. Persistence (TA0003): Maintaining access across restarts
  6. Privilege Escalation (TA0004): Gaining higher-level permissions
  7. Defense Evasion (TA0005): Avoiding detection
  8. Credential Access (TA0006): Stealing credentials
  9. Discovery (TA0007): Understanding the environment
  10. Lateral Movement (TA0008): Moving through the environment
  11. Collection (TA0009): Gathering data of interest
  12. Command and Control (TA0011): Communicating with compromised systems
  13. Exfiltration (TA0010): Stealing data
  14. Impact (TA0040): Manipulating, interrupting, or destroying systems

Technique Naming Convention

  • Technique: T[NNNN] (e.g., T1059 - Command and Scripting Interpreter)
  • Sub-technique: T[NNNN].[NNN] (e.g., T1059.001 - PowerShell)
  • Group: G[NNNN] (e.g., G0016 - APT29)
  • Software: S[NNNN] (e.g., S0154 - Cobalt Strike)
  • Mitigation: M[NNNN] (e.g., M1049 - Antivirus/Antimalware)

Data Sources

ATT&CK v16+ uses structured data sources:

  • Process: Process Creation, Process Access, OS API Execution
  • File: File Creation, File Modification, File Access
  • Network Traffic: Network Connection Creation, Network Traffic Flow
  • Command: Command Execution
  • Module: Module Load
  • Windows Registry: Windows Registry Key Modification

STIX 2.1 Representation

Attack Pattern (SDO)

Maps to ATT&CK techniques:

{
  "type": "attack-pattern",
  "id": "attack-pattern--uuid",
  "name": "Spearphishing Attachment",
  "external_references": [
    {"source_name": "mitre-attack", "external_id": "T1566.001"}
  ],
  "kill_chain_phases": [
    {"kill_chain_name": "mitre-attack", "phase_name": "initial-access"}
  ]
}

Intrusion Set (SDO)

Maps to ATT&CK groups:

{
  "type": "intrusion-set",
  "name": "APT29",
  "aliases": ["Cozy Bear", "The Dukes", "NOBELIUM"],
  "goals": ["espionage"],
  "resource_level": "government"
}

ATT&CK Navigator Layer Specification

Layer Version 4.5 Schema

  • name: Layer display name
  • domain: enterprise-attack, mobile-attack, ics-attack
  • techniques[]: Array of technique annotations
    • techniqueID: ATT&CK ID
    • score: Numeric score (0-100)
    • color: Hex color override
    • comment: Analyst notes
    • enabled: Show/hide technique
    • metadata[]: Key-value pairs for additional context

References

references/workflows.md (verbatim)

MITRE ATT&CK Analysis Workflows

Workflow 1: Threat Actor TTP Mapping

[Threat Report] --> [Extract Behaviors] --> [Map to ATT&CK] --> [Navigator Layer]
                                                                       |
                                                                       v
                                                              [Detection Priorities]

Steps:

  1. Report Ingestion: Obtain threat intelligence report (vendor, OSINT, internal)
  2. Behavior Extraction: Identify adversary actions described in the report
  3. Technique Mapping: Map each behavior to ATT&CK technique IDs using the ATT&CK knowledge base
  4. Sub-technique Precision: Drill down to sub-techniques where procedure details allow
  5. Layer Creation: Generate ATT&CK Navigator layer with mapped techniques
  6. Priority Assessment: Rank techniques by detection feasibility and impact

Workflow 2: Detection Gap Analysis

[Current Detections] --> [Detection Layer] --> [Overlay with Threat Layer] --> [Gap Layer]
                                                                                    |
                                                                                    v
                                                                          [Engineering Backlog]

Steps:

  1. Detection Inventory: Catalog existing detection rules mapped to ATT&CK techniques
  2. Detection Layer: Create Navigator layer showing detected techniques (green)
  3. Threat Layer: Create layer showing adversary techniques (red)
  4. Overlay Analysis: Combine layers to identify uncovered threat techniques
  5. Gap Prioritization: Rank gaps by threat actor relevance and detection feasibility
  6. Engineering Plan: Create detection engineering backlog from prioritized gaps

Workflow 3: Cross-Actor Comparison

[Group A TTPs] --+
                 |--> [Intersection Analysis] --> [Common Techniques] --> [Priority Detections]
[Group B TTPs] --+                                                               |
                 |                                                               v
[Group C TTPs] --+                                                    [Unique Techniques per Group]

Steps:

  1. Group Selection: Choose threat groups relevant to your industry/region
  2. TTP Extraction: Pull technique lists for each group from ATT&CK
  3. Common Analysis: Find techniques shared across all selected groups
  4. Unique Analysis: Identify techniques unique to specific groups
  5. Detection ROI: Prioritize detections for commonly used techniques (highest coverage ROI)
  6. Actor Attribution: Use unique techniques as potential attribution indicators

Workflow 4: Campaign-to-TTP Analysis

[Campaign IOCs] --> [Sandbox/Analysis] --> [Behavior Extraction] --> [TTP Mapping]
                                                                          |
                                                                          v
                                                                 [Compare to Known Groups]
                                                                          |
                                                                          v
                                                                 [Attribution Hypothesis]

Steps:

  1. IOC Collection: Gather campaign IOCs (malware hashes, C2 domains, phishing emails)
  2. Dynamic Analysis: Execute samples in sandbox, capture behavioral artifacts
  3. Behavior Documentation: Document file operations, registry changes, network connections, process activity
  4. ATT&CK Mapping: Map observed behaviors to techniques and sub-techniques
  5. Group Comparison: Compare campaign TTPs against known group profiles
  6. Attribution Assessment: Assess likelihood of attribution based on TTP overlap

Workflow 5: Threat-Informed Defense

[ATT&CK Mappings] --> [Data Source Analysis] --> [Telemetry Assessment] --> [Control Mapping]
                                                                                   |
                                                                                   v
                                                                          [Security Roadmap]

Steps:

  1. Threat Profile: Identify relevant threat actors and their techniques
  2. Data Source Mapping: Determine which data sources can detect each technique
  3. Telemetry Audit: Assess which data sources are currently collected
  4. Control Assessment: Map existing security controls to technique mitigations
  5. Gap Identification: Find techniques with neither detection nor mitigation coverage
  6. Roadmap Creation: Build security improvement roadmap addressing highest-risk gaps

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.