mukul975/anthropic-cybersecurity-skills/modeling-threats-with-opencti
Claude Code and agent skill by mukul975/anthropic-cybersecurity-skills
- community
Checking that the SKILL.md file is still in the repository.
Deploy OpenCTI (Filigran) via Docker Compose and use the pycti Python client to model threat actors, intrusion sets, campaigns, and indicators as a STIX 2.1 knowledge graph with relationships (uses, attributed-to, targets). Use when building a centralized threat-intel knowledge base, correlating IOCs from multiple feeds into one adversary graph, or producing STIX bundles for detection engineering.
Install
npx vskill@latest install mukul975/anthropic-cybersecurity-skills/modeling-threats-with-openctiSKILL.md
The same SKILL.md was published earlier as mukul975/anthropic-cybersecurity-skills/modeling-threats-with-opencti.
Modeling Threats with OpenCTI
Overview
OpenCTI (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.
Architecturally, OpenCTI is built from a GraphQL API backed by Elasticsearch/OpenSearch and a graph database, a Redis stream, RabbitMQ message broker, import/export 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.
This skill follows the official OpenCTI documentation (docs.opencti.io) and the OpenCTI-Platform/client-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.
When to Use
- Building a centralized, STIX-native knowledge base of threat actors, campaigns, and TTPs
- Correlating IOCs and reports from multiple feeds into a single adversary graph
- Mapping observed activity to MITRE ATT&CK techniques for coverage and gap analysis
- Producing structured intelligence (STIX bundles) for downstream detection engineering
- Tracking attribution: which intrusion sets are attributed to which threat actors and campaigns
- Automating CTI ingestion via connectors and the pycti API
Prerequisites
- Docker and Docker Compose (OpenCTI is deployed as a container stack)
- Python 3.8+ for the pycti client:
``bash pip install pycti stix2 ``
- An OpenCTI instance and an API token (Profile > API access in the UI)
- Familiarity with the STIX 2.1 data model (SDOs, SROs, observables)
- RabbitMQ, Redis, and Elasticsearch/OpenSearch reachable by the platform (handled by the reference compose)
Objectives
- Deploy an OpenCTI platform with workers via Docker Compose
- Authenticate to the GraphQL API with pycti using an API token
- Create core STIX domain objects: Threat Actor, Intrusion Set, Campaign, Attack Pattern, Malware
- Build relationships (
uses,attributed-to,targets) to form the adversary graph - Enable connectors (MITRE ATT&CK, MISP) to auto-ingest intelligence
- Submit STIX 2.1 bundles via
send_stix2_bundle - Query the graph and export an actor's full TTP profile
MITRE ATT&CK Mapping
| ID | Name | Relevance | |
|---|---|---|---|
| T1589 | Gather Victim Identity Information | OpenCTI consolidates reconnaissance and victim/target intelligence observed across reporting into a structured, queryable knowledge graph that supports analysis of adversary targeting. |
Workflow
Step 1: Deploy the OpenCTI platform
Use the official Docker Compose stack. Generate the required tokens/UUIDs and start the platform, workers, and dependencies.
Access the UI at http://localhost:8080 and log in with the admin credentials from .env.
Step 2: Authenticate with pycti
Create an OpenCTIApiClient instance using your platform URL and API token.
Step 3: Create core STIX domain objects
Create a Threat Actor, an Intrusion Set, a Campaign, and an Attack Pattern. pycti create() calls act as upserts when update=True.
Step 4: Build relationships to form the graph
Connect the objects with STIX relationships so the graph reflects how the adversary operates.
Step 5: Add indicators and observables
Create an indicator with a STIX pattern and tie it to the intrusion set via an indicates relationship.
Step 6: Submit a STIX 2.1 bundle directly
For bulk ingestion, build a STIX bundle and submit it with send_stix2_bundle — the recommended bulk-ingest path.
Step 7: Enable connectors for automated ingestion
Add connectors to the compose stack so external intelligence (MITRE ATT&CK, MISP) is ingested continuously. Each connector needs its own token.
Step 8: Query the graph and export an actor profile
Read back the adversary's full picture for reporting and detection engineering.
Tools and Resources
| Tool | Purpose | Source | |
|---|---|---|---|
| OpenCTI Platform | STIX 2.1 threat-intel knowledge graph | https://github.com/OpenCTI-Platform/opencti | |
| OpenCTI Docker | Reference compose stack | https://github.com/OpenCTI-Platform/docker | |
| pycti | Official Python client for the GraphQL API | https://github.com/OpenCTI-Platform/client-python | |
| OpenCTI Connectors | Importers (MITRE, MISP, OTX, CISA, abuse.ch) | https://github.com/OpenCTI-Platform/connectors | |
| OpenCTI docs | Official documentation | https://docs.opencti.io/latest/ | |
| STIX 2.1 spec | Underlying data model | https://oasis-open.github.io/cti-documentation/ |
STIX Object Cheat Sheet (pycti entities)
| pycti entity | STIX type | Use | |
|---|---|---|---|
threat_actor_group | threat-actor | Named adversary group | |
intrusion_set | intrusion-set | Clustered activity / tracked set | |
campaign | campaign | Time-bounded operation | |
attack_pattern | attack-pattern | MITRE ATT&CK technique | |
malware | malware | Tooling/implant | |
indicator | indicator | Detection pattern (STIX/Sigma/YARA) | |
vulnerability | vulnerability | CVE | |
stix_core_relationship | relationship | uses, attributed-to, targets, indicates |
Validation Criteria
- [ ] OpenCTI platform and workers deployed and reachable at the base URL
- [ ] pycti authenticates with a valid API token
- [ ] Threat Actor, Intrusion Set, Campaign, and Attack Pattern objects created
- [ ] Relationships (
attributed-to,uses,indicates) built between objects - [ ] At least one indicator created and linked to an intrusion set
- [ ] A STIX 2.1 bundle ingested via
import_bundle_from_json - [ ] MITRE ATT&CK connector enabled and importing techniques
- [ ] Intrusion-set TTP profile queryable and exportable
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/modeling-threats-with-opencti/SKILL.md
Popularity
- Repository stars
- 27,514
- Repository forks
- 3,334
- 7-day trend score
- 51
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mukul975/anthropic-cybersecurity-skills/modeling-threats-with-opencti)