[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71BAPTAZAP2J31MYGTN2AZ6":3,"skill-same:01M71BAPTAZAP2J31MYGTN2AZ6":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":67},"01M71BAPTAZAP2J31MYGTN2AZ6","cyber-modeling-threats-with-opencti",null,"Model threat actors, intrusion sets, campaigns, and TTPs as a STIX 2.1 knowledge graph in OpenCTI (Filigran) using the pycti Python client, connectors, and import workers for structured cyber threat intelligence.","nexuslinkproductions\u002Fyuri-os","nexuslinkproductions","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273246263?v=4","01M718YX9NZRCW50B59B8ZVDKN","Marcel Spatz","01M718YXAQ7530F4B1VKN6SFQV",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-modeling-threats-with-opencti\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"modeling","cyber modeling threats with opencti","with","opencti","modeling threats with opencti","threat","intelligence","threat-intelligence","subdomain","threat intelligence","knowledge-graph","pycti","stix2","knowledge graph","mitre-attack","false","cybersecurity","knowledge","model","threat-modeling","2026-11-10 10:12:30",false,"---\nname: cyber-modeling-threats-with-opencti\ndescription: \"Model threat actors, intrusion sets, campaigns, and TTPs as a STIX 2.1 knowledge graph in OpenCTI (Filigran) using the pycti Python client, connectors, and import workers for structured cyber threat intelligence.\"\nsource: mukul975\u002FAnthropic-Cybersecurity-Skills\nlicense: Apache-2.0\nauthorized_lab: false\norigin_frontmatter: \"name: modeling-threats-with-opencti | description: Model threat actors, intrusion sets, campaigns, and TTPs as a STIX 2.1 knowledge graph in OpenCTI (Filigran) using the pycti Python client, connectors, and import workers for structured cyber threat intelligence. | domain: cybersecurity | subdomain: threat-intelligence | tags: | - opencti | - threat-intelligence | - stix2 | - pycti | - knowledge-graph | - threat-modeling | - mitre-attack | - cti | version: '1.0' | author: mahipal | license: Apac\"\nhide: true\n---\n\n> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Modeling Threats with OpenCTI\n\n## Overview\n\nOpenCTI (Open Cyber Threat Intelligence) is an open-source threat-intelligence platform developed by **Filigran** that lets analysts store, organize, visualize, and share structured cyber threat intelligence as a knowledge graph. Every object — Threat Actors, Intrusion Sets, Campaigns, Attack Patterns, Malware, Indicators, Observables, Vulnerabilities — is modeled on the **STIX 2.1** standard, and the relationships between them (`uses`, `attributed-to`, `targets`, `indicates`) form a graph that reveals how adversaries operate end to end.\n\nArchitecturally, OpenCTI is built from a GraphQL API backed by Elasticsearch\u002FOpenSearch and a graph database, a Redis stream, RabbitMQ message broker, **import\u002Fexport workers**, and **connectors**. Connectors retrieve information from external sources (MITRE ATT&CK, MISP, AlienVault OTX, CISA, abuse.ch, etc.), convert it into STIX 2.1 bundles, and submit those bundles to the platform; workers then ingest the bundles into the graph. The official Python client, **pycti** (`OpenCTIApiClient`), is the programmatic interface analysts use to create entities, build relationships, and push STIX bundles.\n\nThis skill follows the official OpenCTI documentation (docs.opencti.io) and the `OpenCTI-Platform\u002Fclient-python` (pycti) repository. It maps to MITRE ATT&CK **T1589 (Gather Victim Identity Information)** as part of the broader CTI analysis lifecycle — OpenCTI is where reconnaissance and adversary tradecraft observed across reporting is consolidated, deduplicated, and modeled so detection and response teams can act on it. The threat context is the volume and fragmentation of modern CTI: hundreds of vendor reports, IOC feeds, and ATT&CK updates that are useless until correlated into a single, queryable adversary picture.\n\n## When to Use\n\n- Building a centralized, STIX-native knowledge base of threat actors, campaigns, and TTPs\n- Correlating IOCs and reports from multiple feeds into a single adversary graph\n- Mapping observed activity to MITRE ATT&CK techniques for coverage and gap analysis\n- Producing structured intelligence (STIX bundles) for downstream detection engineering\n- Tracking attribution: which intrusion sets are attributed to which threat actors and campaigns\n- Automating CTI ingestion via connectors and the pycti API\n\n## Prerequisites\n\n- Docker and Docker Compose (OpenCTI is deployed as a container stack)\n- Python 3.8+ for the pycti client:\n  ```bash\n  pip install pycti stix2\n  ```\n- An OpenCTI instance and an API token (Profile > API access in the UI)\n- Familiarity with the STIX 2.1 data model (SDOs, SROs, observables)\n- RabbitMQ, Redis, and Elasticsearch\u002FOpenSearch reachable by the platform (handled by the reference compose)\n\n## Objectives\n\n- Deploy an OpenCTI platform with workers via Docker Compose\n- Authenticate to the GraphQL API with pycti using an API token\n- Create core STIX domain objects: Threat Actor, Intrusion Set, Campaign, Attack Pattern, Malware\n- Build relationships (`uses`, `attributed-to`, `targets`) to form the adversary graph\n- Enable connectors (MITRE ATT&CK, MISP) to auto-ingest intelligence\n- Submit STIX 2.1 bundles via `send_stix2_bundle`\n- Query the graph and export an actor's full TTP profile\n\n## MITRE ATT&CK Mapping\n\n| ID | Name | Relevance |\n|----|------|-----------|\n| T1589 | Gather Victim Identity Information | OpenCTI consolidates reconnaissance and victim\u002Ftarget intelligence observed across reporting into a structured, queryable knowledge graph that supports analysis of adversary targeting. |\n\n## Workflow\n\n### Step 1: Deploy the OpenCTI platform\nUse the official Docker Compose stack. Generate the required tokens\u002FUUIDs and start the platform, workers, and dependencies.\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fdocker.git opencti-docker\ncd opencti-docker\n\n# Generate required secrets (UUID v4 for tokens, base64 for app secret)\ncat > .env \u003C\u003CEOF\nOPENCTI_ADMIN_EMAIL=admin@opencti.local\nOPENCTI_ADMIN_PASSWORD=$(openssl rand -hex 16)\nOPENCTI_ADMIN_TOKEN=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nOPENCTI_BASE_URL=http:\u002F\u002Flocalhost:8080\nMINIO_ROOT_USER=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nMINIO_ROOT_PASSWORD=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nRABBITMQ_DEFAULT_USER=guest\nRABBITMQ_DEFAULT_PASS=guest\nELASTIC_MEMORY_SIZE=4G\nCONNECTOR_HISTORY_ID=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nCONNECTOR_EXPORT_FILE_STIX_ID=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nEOF\n\n# Increase vm.max_map_count for Elasticsearch, then start the stack\nsudo sysctl -w vm.max_map_count=1048575\ndocker compose up -d\n```\nAccess the UI at http:\u002F\u002Flocalhost:8080 and log in with the admin credentials from `.env`.\n\n### Step 2: Authenticate with pycti\nCreate an `OpenCTIApiClient` instance using your platform URL and API token.\n```python\nfrom pycti import OpenCTIApiClient\n\nopencti = OpenCTIApiClient(\n    \"http:\u002F\u002Flocalhost:8080\",\n    \"YOUR_API_TOKEN\",  # from Profile > API access, or OPENCTI_ADMIN_TOKEN\n)\n```\n\n### Step 3: Create core STIX domain objects\nCreate a Threat Actor, an Intrusion Set, a Campaign, and an Attack Pattern. pycti `create()` calls act as upserts when `update=True`.\n```python\n# Threat Actor (group)\nactor = opencti.threat_actor_group.create(\n    name=\"APT-EXAMPLE\",\n    description=\"Financially motivated intrusion group tracked in this case.\",\n    threat_actor_types=[\"crime-syndicate\"],\n)\n\n# Intrusion Set\nintrusion_set = opencti.intrusion_set.create(\n    name=\"EXAMPLE-SET\",\n    description=\"Cluster of activity sharing infrastructure and TTPs.\",\n)\n\n# Campaign\ncampaign = opencti.campaign.create(\n    name=\"Operation Example 2026\",\n    description=\"Spearphishing campaign targeting the finance sector.\",\n)\n\n# Attack Pattern linked to MITRE ATT&CK (x_mitre_id maps to the technique)\ntechnique = opencti.attack_pattern.create(\n    name=\"Spearphishing Attachment\",\n    x_mitre_id=\"T1566.001\",\n)\n```\n\n### Step 4: Build relationships to form the graph\nConnect the objects with STIX relationships so the graph reflects how the adversary operates.\n```python\n# Intrusion set attributed to the threat actor\nopencti.stix_core_relationship.create(\n    fromId=intrusion_set[\"id\"],\n    toId=actor[\"id\"],\n    relationship_type=\"attributed-to\",\n)\n\n# Campaign attributed to the intrusion set\nopencti.stix_core_relationship.create(\n    fromId=campaign[\"id\"],\n    toId=intrusion_set[\"id\"],\n    relationship_type=\"attributed-to\",\n)\n\n# Intrusion set uses the technique\nopencti.stix_core_relationship.create(\n    fromId=intrusion_set[\"id\"],\n    toId=technique[\"id\"],\n    relationship_type=\"uses\",\n)\n```\n\n### Step 5: Add indicators and observables\nCreate an indicator with a STIX pattern and tie it to the intrusion set via an `indicates` relationship.\n```python\nfrom dateutil.parser import parse\n\ndate = parse(\"2026-06-01\").strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n\nindicator = opencti.indicator.create(\n    name=\"C2 domain for Operation Example\",\n    pattern_type=\"stix\",\n    pattern=\"[domain-name:value = 'malicious-c2.example']\",\n    x_opencti_main_observable_type=\"Domain-Name\",\n    valid_from=date,\n)\n\nopencti.stix_core_relationship.create(\n    fromId=indicator[\"id\"],\n    toId=intrusion_set[\"id\"],\n    relationship_type=\"indicates\",\n)\n```\n\n### Step 6: Submit a STIX 2.1 bundle directly\nFor bulk ingestion, build a STIX bundle and submit it with `send_stix2_bundle` — the recommended bulk-ingest path.\n```python\nimport json\n\nwith open(\"threat_report_bundle.json\") as f:\n    bundle = json.load(f)\n\nopencti.stix2.import_bundle_from_json(\n    json.dumps(bundle),\n    update=True,\n)\n```\n\n### Step 7: Enable connectors for automated ingestion\nAdd connectors to the compose stack so external intelligence (MITRE ATT&CK, MISP) is ingested continuously. Each connector needs its own token.\n```yaml\n# Append to docker-compose.yml under services:\n  connector-mitre:\n    image: opencti\u002Fconnector-mitre:latest\n    environment:\n      - OPENCTI_URL=http:\u002F\u002Fopencti:8080\n      - OPENCTI_TOKEN=${CONNECTOR_MITRE_TOKEN}\n      - CONNECTOR_ID=${CONNECTOR_MITRE_ID}\n      - CONNECTOR_TYPE=EXTERNAL_IMPORT\n      - CONNECTOR_NAME=MITRE ATT&CK\n      - CONNECTOR_SCOPE=tool,report,malware,identity,attack-pattern,intrusion-set,campaign\n      - MITRE_INTERVAL=7   # days\n    restart: always\n```\n```bash\ndocker compose up -d connector-mitre\n```\n\n### Step 8: Query the graph and export an actor profile\nRead back the adversary's full picture for reporting and detection engineering.\n```python\n# Resolve all techniques an intrusion set uses\niset = opencti.intrusion_set.read(filters={\n    \"mode\": \"and\",\n    \"filters\": [{\"key\": \"name\", \"values\": [\"EXAMPLE-SET\"]}],\n    \"filterGroups\": [],\n})\n\nrels = opencti.stix_core_relationship.list(\n    fromId=iset[\"id\"],\n    relationship_type=\"uses\",\n)\nfor r in rels:\n    print(r[\"to\"][\"name\"], r[\"to\"].get(\"x_mitre_id\"))\n```\n\n## Tools and Resources\n\n| Tool | Purpose | Source |\n|------|---------|--------|\n| OpenCTI Platform | STIX 2.1 threat-intel knowledge graph | https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fopencti |\n| OpenCTI Docker | Reference compose stack | https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fdocker |\n| pycti | Official Python client for the GraphQL API | https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fclient-python |\n| OpenCTI Connectors | Importers (MITRE, MISP, OTX, CISA, abuse.ch) | https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fconnectors |\n| OpenCTI docs | Official documentation | https:\u002F\u002Fdocs.opencti.io\u002Flatest\u002F |\n| STIX 2.1 spec | Underlying data model | https:\u002F\u002Foasis-open.github.io\u002Fcti-documentation\u002F |\n\n## STIX Object Cheat Sheet (pycti entities)\n\n| pycti entity | STIX type | Use |\n|--------------|-----------|-----|\n| `threat_actor_group` | threat-actor | Named adversary group |\n| `intrusion_set` | intrusion-set | Clustered activity \u002F tracked set |\n| `campaign` | campaign | Time-bounded operation |\n| `attack_pattern` | attack-pattern | MITRE ATT&CK technique |\n| `malware` | malware | Tooling\u002Fimplant |\n| `indicator` | indicator | Detection pattern (STIX\u002FSigma\u002FYARA) |\n| `vulnerability` | vulnerability | CVE |\n| `stix_core_relationship` | relationship | `uses`, `attributed-to`, `targets`, `indicates` |\n\n## Validation Criteria\n\n- [ ] OpenCTI platform and workers deployed and reachable at the base URL\n- [ ] pycti authenticates with a valid API token\n- [ ] Threat Actor, Intrusion Set, Campaign, and Attack Pattern objects created\n- [ ] Relationships (`attributed-to`, `uses`, `indicates`) built between objects\n- [ ] At least one indicator created and linked to an intrusion set\n- [ ] A STIX 2.1 bundle ingested via `import_bundle_from_json`\n- [ ] MITRE ATT&CK connector enabled and importing techniques\n- [ ] Intrusion-set TTP profile queryable and exportable\n","> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Modeling Threats with OpenCTI\n\n## Overview\n\nOpenCTI (Open Cyber Threat Intelligence) is an open-source threat-intelligence platform developed by **Filigran** that lets analysts store, organize, visualize, and share structured cyber threat intelligence as a knowledge graph. Every object — Threat Actors, Intrusion Sets, Campaigns, Attack Patterns, Malware, Indicators, Observables, Vulnerabilities — is modeled on the **STIX 2.1** standard, and the relationships between them (`uses`, `attributed-to`, `targets`, `indicates`) form a graph that reveals how adversaries operate end to end.\n\nArchitecturally, OpenCTI is built from a GraphQL API backed by Elasticsearch\u002FOpenSearch and a graph database, a Redis stream, RabbitMQ message broker, **import\u002Fexport workers**, and **connectors**. Connectors retrieve information from external sources (MITRE ATT&CK, MISP, AlienVault OTX, CISA, abuse.ch, etc.), convert it into STIX 2.1 bundles, and submit those bundles to the platform; workers then ingest the bundles into the graph. The official Python client, **pycti** (`OpenCTIApiClient`), is the programmatic interface analysts use to create entities, build relationships, and push STIX bundles.\n\nThis skill follows the official OpenCTI documentation (docs.opencti.io) and the `OpenCTI-Platform\u002Fclient-python` (pycti) repository. It maps to MITRE ATT&CK **T1589 (Gather Victim Identity Information)** as part of the broader CTI analysis lifecycle — OpenCTI is where reconnaissance and adversary tradecraft observed across reporting is consolidated, deduplicated, and modeled so detection and response teams can act on it. The threat context is the volume and fragmentation of modern CTI: hundreds of vendor reports, IOC feeds, and ATT&CK updates that are useless until correlated into a single, queryable adversary picture.\n\n## When to Use\n\n- Building a centralized, STIX-native knowledge base of threat actors, campaigns, and TTPs\n- Correlating IOCs and reports from multiple feeds into a single adversary graph\n- Mapping observed activity to MITRE ATT&CK techniques for coverage and gap analysis\n- Producing structured intelligence (STIX bundles) for downstream detection engineering\n- Tracking attribution: which intrusion sets are attributed to which threat actors and campaigns\n- Automating CTI ingestion via connectors and the pycti API\n\n## Prerequisites\n\n- Docker and Docker Compose (OpenCTI is deployed as a container stack)\n- Python 3.8+ for the pycti client:\n  ```bash\n  pip install pycti stix2\n  ```\n- An OpenCTI instance and an API token (Profile > API access in the UI)\n- Familiarity with the STIX 2.1 data model (SDOs, SROs, observables)\n- RabbitMQ, Redis, and Elasticsearch\u002FOpenSearch reachable by the platform (handled by the reference compose)\n\n## Objectives\n\n- Deploy an OpenCTI platform with workers via Docker Compose\n- Authenticate to the GraphQL API with pycti using an API token\n- Create core STIX domain objects: Threat Actor, Intrusion Set, Campaign, Attack Pattern, Malware\n- Build relationships (`uses`, `attributed-to`, `targets`) to form the adversary graph\n- Enable connectors (MITRE ATT&CK, MISP) to auto-ingest intelligence\n- Submit STIX 2.1 bundles via `send_stix2_bundle`\n- Query the graph and export an actor's full TTP profile\n\n## MITRE ATT&CK Mapping\n\n| ID | Name | Relevance |\n|----|------|-----------|\n| T1589 | Gather Victim Identity Information | OpenCTI consolidates reconnaissance and victim\u002Ftarget intelligence observed across reporting into a structured, queryable knowledge graph that supports analysis of adversary targeting. |\n\n## Workflow\n\n### Step 1: Deploy the OpenCTI platform\nUse the official Docker Compose stack. Generate the required tokens\u002FUUIDs and start the platform, workers, and dependencies.\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fdocker.git opencti-docker\ncd opencti-docker\n\n# Generate required secrets (UUID v4 for tokens, base64 for app secret)\ncat > .env \u003C\u003CEOF\nOPENCTI_ADMIN_EMAIL=admin@opencti.local\nOPENCTI_ADMIN_PASSWORD=$(openssl rand -hex 16)\nOPENCTI_ADMIN_TOKEN=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nOPENCTI_BASE_URL=http:\u002F\u002Flocalhost:8080\nMINIO_ROOT_USER=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nMINIO_ROOT_PASSWORD=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nRABBITMQ_DEFAULT_USER=guest\nRABBITMQ_DEFAULT_PASS=guest\nELASTIC_MEMORY_SIZE=4G\nCONNECTOR_HISTORY_ID=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nCONNECTOR_EXPORT_FILE_STIX_ID=$(cat \u002Fproc\u002Fsys\u002Fkernel\u002Frandom\u002Fuuid)\nEOF\n\n# Increase vm.max_map_count for Elasticsearch, then start the stack\nsudo sysctl -w vm.max_map_count=1048575\ndocker compose up -d\n```\nAccess the UI at http:\u002F\u002Flocalhost:8080 and log in with the admin credentials from `.env`.\n\n### Step 2: Authenticate with pycti\nCreate an `OpenCTIApiClient` instance using your platform URL and API token.\n```python\nfrom pycti import OpenCTIApiClient\n\nopencti = OpenCTIApiClient(\n    \"http:\u002F\u002Flocalhost:8080\",\n    \"YOUR_API_TOKEN\",  # from Profile > API access, or OPENCTI_ADMIN_TOKEN\n)\n```\n\n### Step 3: Create core STIX domain objects\nCreate a Threat Actor, an Intrusion Set, a Campaign, and an Attack Pattern. pycti `create()` calls act as upserts when `update=True`.\n```python\n# Threat Actor (group)\nactor = opencti.threat_actor_group.create(\n    name=\"APT-EXAMPLE\",\n    description=\"Financially motivated intrusion group tracked in this case.\",\n    threat_actor_types=[\"crime-syndicate\"],\n)\n\n# Intrusion Set\nintrusion_set = opencti.intrusion_set.create(\n    name=\"EXAMPLE-SET\",\n    description=\"Cluster of activity sharing infrastructure and TTPs.\",\n)\n\n# Campaign\ncampaign = opencti.campaign.create(\n    name=\"Operation Example 2026\",\n    description=\"Spearphishing campaign targeting the finance sector.\",\n)\n\n# Attack Pattern linked to MITRE ATT&CK (x_mitre_id maps to the technique)\ntechnique = opencti.attack_pattern.create(\n    name=\"Spearphishing Attachment\",\n    x_mitre_id=\"T1566.001\",\n)\n```\n\n### Step 4: Build relationships to form the graph\nConnect the objects with STIX relationships so the graph reflects how the adversary operates.\n```python\n# Intrusion set attributed to the threat actor\nopencti.stix_core_relationship.create(\n    fromId=intrusion_set[\"id\"],\n    toId=actor[\"id\"],\n    relationship_type=\"attributed-to\",\n)\n\n# Campaign attributed to the intrusion set\nopencti.stix_core_relationship.create(\n    fromId=campaign[\"id\"],\n    toId=intrusion_set[\"id\"],\n    relationship_type=\"attributed-to\",\n)\n\n# Intrusion set uses the technique\nopencti.stix_core_relationship.create(\n    fromId=intrusion_set[\"id\"],\n    toId=technique[\"id\"],\n    relationship_type=\"uses\",\n)\n```\n\n### Step 5: Add indicators and observables\nCreate an indicator with a STIX pattern and tie it to the intrusion set via an `indicates` relationship.\n```python\nfrom dateutil.parser import parse\n\ndate = parse(\"2026-06-01\").strftime(\"%Y-%m-%dT%H:%M:%SZ\")\n\nindicator = opencti.indicator.create(\n    name=\"C2 domain for Operation Example\",\n    pattern_type=\"stix\",\n    pattern=\"[domain-name:value = 'malicious-c2.example']\",\n    x_opencti_main_observable_type=\"Domain-Name\",\n    valid_from=date,\n)\n\nopencti.stix_core_relationship.create(\n    fromId=indicator[\"id\"],\n    toId=intrusion_set[\"id\"],\n    relationship_type=\"indicates\",\n)\n```\n\n### Step 6: Submit a STIX 2.1 bundle directly\nFor bulk ingestion, build a STIX bundle and submit it with `send_stix2_bundle` — the recommended bulk-ingest path.\n```python\nimport json\n\nwith open(\"threat_report_bundle.json\") as f:\n    bundle = json.load(f)\n\nopencti.stix2.import_bundle_from_json(\n    json.dumps(bundle),\n    update=True,\n)\n```\n\n### Step 7: Enable connectors for automated ingestion\nAdd connectors to the compose stack so external intelligence (MITRE ATT&CK, MISP) is ingested continuously. Each connector needs its own token.\n```yaml\n# Append to docker-compose.yml under services:\n  connector-mitre:\n    image: opencti\u002Fconnector-mitre:latest\n    environment:\n      - OPENCTI_URL=http:\u002F\u002Fopencti:8080\n      - OPENCTI_TOKEN=${CONNECTOR_MITRE_TOKEN}\n      - CONNECTOR_ID=${CONNECTOR_MITRE_ID}\n      - CONNECTOR_TYPE=EXTERNAL_IMPORT\n      - CONNECTOR_NAME=MITRE ATT&CK\n      - CONNECTOR_SCOPE=tool,report,malware,identity,attack-pattern,intrusion-set,campaign\n      - MITRE_INTERVAL=7   # days\n    restart: always\n```\n```bash\ndocker compose up -d connector-mitre\n```\n\n### Step 8: Query the graph and export an actor profile\nRead back the adversary's full picture for reporting and detection engineering.\n```python\n# Resolve all techniques an intrusion set uses\niset = opencti.intrusion_set.read(filters={\n    \"mode\": \"and\",\n    \"filters\": [{\"key\": \"name\", \"values\": [\"EXAMPLE-SET\"]}],\n    \"filterGroups\": [],\n})\n\nrels = opencti.stix_core_relationship.list(\n    fromId=iset[\"id\"],\n    relationship_type=\"uses\",\n)\nfor r in rels:\n    print(r[\"to\"][\"name\"], r[\"to\"].get(\"x_mitre_id\"))\n```\n\n## Tools and Resources\n\n| Tool | Purpose | Source |\n|------|---------|--------|\n| OpenCTI Platform | STIX 2.1 threat-intel knowledge graph | https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fopencti |\n| OpenCTI Docker | Reference compose stack | https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fdocker |\n| pycti | Official Python client for the GraphQL API | https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fclient-python |\n| OpenCTI Connectors | Importers (MITRE, MISP, OTX, CISA, abuse.ch) | https:\u002F\u002Fgithub.com\u002FOpenCTI-Platform\u002Fconnectors |\n| OpenCTI docs | Official documentation | https:\u002F\u002Fdocs.opencti.io\u002Flatest\u002F |\n| STIX 2.1 spec | Underlying data model | https:\u002F\u002Foasis-open.github.io\u002Fcti-documentation\u002F |\n\n## STIX Object Cheat Sheet (pycti entities)\n\n| pycti entity | STIX type | Use |\n|--------------|-----------|-----|\n| `threat_actor_group` | threat-actor | Named adversary group |\n| `intrusion_set` | intrusion-set | Clustered activity \u002F tracked set |\n| `campaign` | campaign | Time-bounded operation |\n| `attack_pattern` | attack-pattern | MITRE ATT&CK technique |\n| `malware` | malware | Tooling\u002Fimplant |\n| `indicator` | indicator | Detection pattern (STIX\u002FSigma\u002FYARA) |\n| `vulnerability` | vulnerability | CVE |\n| `stix_core_relationship` | relationship | `uses`, `attributed-to`, `targets`, `indicates` |\n\n## Validation Criteria\n\n- [ ] OpenCTI platform and workers deployed and reachable at the base URL\n- [ ] pycti authenticates with a valid API token\n- [ ] Threat Actor, Intrusion Set, Campaign, and Attack Pattern objects created\n- [ ] Relationships (`attributed-to`, `uses`, `indicates`) built between objects\n- [ ] At least one indicator created and linked to an intrusion set\n- [ ] A STIX 2.1 bundle ingested via `import_bundle_from_json`\n- [ ] MITRE ATT&CK connector enabled and importing techniques\n- [ ] Intrusion-set TTP profile queryable and exportable\n",{"hide":44,"name":5,"source":45,"license":15,"description":7,"authorized_lab":40,"origin_frontmatter":46},true,"mukul975\u002FAnthropic-Cybersecurity-Skills","name: modeling-threats-with-opencti | description: Model threat actors, intrusion sets, campaigns, and TTPs as a STIX 2.1 knowledge graph in OpenCTI (Filigran) using the pycti Python client, connectors, and import workers for structured cyber threat intelligence. | domain: cybersecurity | subdomain: threat-intelligence | tags: | - opencti | - threat-intelligence | - stix2 | - pycti | - knowledge-graph | - threat-modeling | - mitre-attack | - cti | version: '1.0' | author: mahipal | license: Apac","main","4c6d8d65f3d6096e2fc25b0845e481dda73c2794",".claude\u002Fskills\u002Fcyber-modeling-threats-with-opencti",0,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions","Building deterministic AI governance and continuity systems. Workflow architect + visual storyteller","2026-11-14 03:05:17",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":44},[57,60,63],{"tool":58,"command":59},"npx","npx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-modeling-threats-with-opencti",{"tool":61,"command":62},"bunx","bunx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-modeling-threats-with-opencti",{"tool":64,"command":65},"pnpm","pnpm dlx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-modeling-threats-with-opencti","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-modeling-threats-with-opencti\u002FSKILL.md",[],[69,92,116,145,174,193],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":39},"01M71CG1AME5WC0A79AE65WT0X","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","MIT","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[77,78,21,79,80,81,82,83,84,85,86,87,88,89,90,91],"zoom out","zoom","harness","how","section","re","true","understand","use","perspective","when","you","code","it","context",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":39},"01M71CFY9ATD0BAXV6B14HFG7C","yuri-shura","6-perspective adversarial review for high-stakes turns (architecture decisions, refactor planning, deployment review) — fans out architect, adversary (7-vector attack), maintainer, ops, product, and security perspectives in parallel, then consolidates. Use when user says 'review this decision', '\u002Fshura', 'adversarial review', 'what could go wrong', 'architecture review', or 'deployment review'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-shura\u002FSKILL.md",[],[99,100,79,101,102,103,104,105,106,107,108,85,109,87,110,111,112,113,114,115],"yuri shura","parallel","architecture review","planning","for","deployment","vector","strategic review","decision","strategic","ops","workflow","decisions","architecture","review","perspectives","adversarial",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":127,"publishedAt":39},"01M71CFTTYW1HA2MNX38EV1GJ5","yuri-sales-intelligence","Unified sales and outreach skill generating cold outreach openers, social selling sequences, objection rebuttals, and ad creative for any paid platform — multi-persona aware, adapting tone and offer frame to buyer type. Use when user says 'write a cold email', 'outreach sequence', 'objection handling', 'ad copy', or 'sales pitch'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-sales-intelligence\u002FSKILL.md",[122],{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000005","邮件与沟通","SCENARIO","使用场景",[25,128,129,130,131,132,133,134,135,87,136,137,138,139,140,141,142,103,143,144],"sales intelligence","yuri sales intelligence","sales","cold","paid","social","persona","pitch","cold email","ad creative","write","sequences","sequence","platform","email","cold outreach","frame",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":159,"publishedAt":39},"01M71CFQMBFTFADJNGP0Z2WCYK","yuri-code-intelligence","Unified code quality intelligence layer that diagnoses code smells (Long Method, Feature Envy, design pattern issues), prescribes targeted Fowler refactoring techniques, and reviews code for security, performance, and clarity. Use when user says 'review this code', 'refactor this', 'what's wrong with this method', 'code smells', or 'clean this up'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-code-intelligence\u002FSKILL.md",[151,154],{"categoryNo":152,"categoryName":153,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":155,"categoryName":156,"taxonomyType":157,"taxonomyTypeDesc":158},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[160,89,161,25,79,162,163,164,103,165,166,167,168,169,170,171,172,173,85,87],"yuri code intelligence","code intelligence","reviews","code quality","feature","performance","code review","long","up","issues","clean","techniques","improve","design",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":39},"01M71CFP32RT6GD3GKNHCJP8VP","yuri-adw","Invoke when user asks to run the ADW loop \u002F agentic engineering loop \u002F software factory workflow.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-adw\u002FSKILL.md",[],[181,182,183,184,185,186,187,188,189,87,190,110,191,192],"yuri adw","run","engineering loop","software factory","software","agentic engineering","factory","loop","invoke","engineering","agentic","user",{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":197,"categories":198,"keywords":211,"publishedAt":39},"01M71CFK4VPEKY6A73237P7RSN","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[199,202,205,208],{"categoryNo":200,"categoryName":201,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":203,"categoryName":204,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":206,"categoryName":207,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":209,"categoryName":210,"taxonomyType":157,"taxonomyTypeDesc":158},"01JBSEEDCAT000000000000036","内容创作者",[212,213,214,87,110,215,79,216,104,85,217],"writing","writing skills","new","work","editing","Existing"]