| name | implementing-security-information-sharing-with-stix2 |
| description | Use when creating, validating, and sharing STIX 2.1 threat intelligence objects using the stix2 Python library. Covers indicators, malware, campaigns, relationships, bundles, and TAXII 2.1 publishing. |
| domain | cybersecurity |
| tags | ["stix","taxii","threat-sharing","intelligence-exchange"] |
| subdomain | threat-intelligence |
| version | 1.0 |
| author | oyi77 |
| license | Apache-2.0 |
| d3fend_techniques | ["File Metadata Consistency Validation","Application Protocol Command Analysis","Identifier Analysis","Content Format Conversion","Message Analysis"] |
| nist_csf | ["ID.RA-01","ID.RA-05","DE.CM-01","DE.AE-02"] |
Implementing Security Information Sharing With Stix2
Overview
Cybersecurity skill for implementing security information sharing with stix2. Follows industry best practices and security standards.
When to Use
Trigger phrases:
-
"implementing security information sharing with stix2"
-
"Create, validate, and share STIX 2"
-
Building a threat intelligence platform that exchanges IOCs with partner organizations
-
Automating ingestion and export of indicators from MISP, OpenCTI, or other TIP platforms
-
Creating machine-readable intelligence reports for ISAC/ISAO sharing communities
-
Publishing threat data to a TAXII 2.1 server for downstream consumption by SIEMs and SOARs
-
Converting unstructured threat reports into standardized STIX 2.1 bundles
-
Enriching detection rules with context by linking indicators to malware, campaigns, and threat actors
Do not use for sharing simple IP blocklists or CSV-based IOC feeds that do not require relationship context; plain-text feeds with simpler formats like CSV or OpenIOC may be more efficient in those cases.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Python 3.8+ with
stix2 library (pip install stix2)
taxii2-client for consuming TAXII feeds (pip install taxii2-client)
- A TAXII 2.1 server endpoint for publishing (e.g., OpenTAXII, Medallion, or MISP TAXII service)
- Familiarity with STIX 2.1 SDO types: Indicator, Malware, Threat Actor, Campaign, Attack Pattern, Identity
- Familiarity with STIX 2.1 SRO types: Relationship, Sighting
- Optional: OpenCTI or MISP instance for end-to-end integration testing
Workflow
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": ,
: ,
}
() -> :
{k: re.findall(v, text) k, v IOC_PATTERNS.items()}