TExcelTAD
Home › Defensive Security: SOC, SIEM, Detection Engineering & Threat Hunting › STIX 2.1, TAXII, TLP 2.0, MISP and OpenCTI

STIX 2.1, TAXII, TLP 2.0, MISP and OpenCTI

An analyst reads a partner's PDF report about a campaign, copies twelve indicators into a spreadsheet, retypes them into the SIEM, and loses the context on the way: which indicator belongs to which stage, how confident the partner was, and who may see it. Structured threat intelligence fixes that. STIX 2.1 (Structured Threat Information Expression, an OASIS standard) describes intelligence as JSON objects and the relationships between them; TAXII 2.1 is the HTTPS API for exchanging it; TLP 2.0 (the Traffic Light Protocol, from FIRST) says who may receive it; and platforms such as MISP and OpenCTI store, enrich and share it. This lesson builds a small STIX bundle in Python, matches its indicators against logs, and places the rest in context.

STIX 2.1 in one table

Kind Objects Example
Domain objects (SDOs): the analysis indicator, malware, intrusion-set, threat-actor, campaign, attack-pattern, tool, vulnerability, identity, course-of-action, report, observed-data… "LabLoader is a malware family used by intrusion set LAB-SET-01"
Cyber-observable objects (SCOs): the facts ipv4-addr, domain-name, url, file (with hashes), email-message, process, network-traffic… domain-name: upd.cdn-lab.example
Relationship objects (SROs) relationship (indicates, uses, targets, attributed-to, mitigates…), sighting indicator indicates malware; malware uses attack-pattern T1059.001
Meta objects marking-definition, language-content, extension-definition TLP markings, translations, custom extensions
Bundle a container to ship a set of objects

Every object has a type, an id of the form type--UUID, spec_version: "2.1", and created / modified timestamps. An indicator carries a pattern in the STIX patterning language, such as [domain-name:value = 'upd.cdn-lab.example'] or [file:hashes.'SHA-256' = '…'], with valid_from and optionally valid_until.

Building a bundle

python · try it yourself
import json, uuid

NS = uuid.UUID("6c2d1d9a-1b6e-4c5e-9a43-2f0b6d0a7e11")      # lab namespace: deterministic ids for a stable example
def sid(kind, name):                                         # real producers draw a fresh UUIDv4 per object
    return f"{kind}--{uuid.uuid5(NS, kind + name)}"

T = "2026-01-15T10:00:00.000Z"
base = lambda kind, name: {"type": kind, "spec_version": "2.1", "id": sid(kind, name), "created": T, "modified": T}

soc = {**base("identity", "soc"), "name": "lab.test SOC", "identity_class": "organization"}
tlp = {"type": "marking-definition", "spec_version": "2.1", "id": sid("marking-definition", "amber-strict"), "created": T,
       "name": "TLP:AMBER+STRICT", "definition_type": "statement",
       "definition": {"statement": "TLP:AMBER+STRICT (FIRST TLP 2.0): recipient's organisation only, need to know."}}
malware = {**base("malware", "labloader"), "name": "LabLoader", "is_family": True, "malware_types": ["remote-access-trojan"],
           "description": "Synthetic family for the course: macro document -> PowerShell -> DLL beacon over DNS/HTTPS."}
technique = {**base("attack-pattern", "T1059.001"), "name": "PowerShell",
             "external_references": [{"source_name": "mitre-attack", "external_id": "T1059.001"}]}
indicators = [
    {**base("indicator", d), "name": f"LabLoader C2 {d}", "indicator_types": ["malicious-activity"],
     "pattern": p, "pattern_type": "stix", "valid_from": T, "valid_until": "2026-02-14T10:00:00.000Z", "confidence": c}
    for d, p, c in [("domain", "[domain-name:value = 'upd.cdn-lab.example']", 85),
                    ("ip", "[ipv4-addr:value = '203.0.113.66'] OR [ipv4-addr:value = '192.0.2.200']", 70)]]
rels = [{**base("relationship", i["id"]), "relationship_type": "indicates", "source_ref": i["id"], "target_ref": malware["id"]}
        for i in indicators]
rels.append({**base("relationship", "uses"), "relationship_type": "uses", "source_ref": malware["id"], "target_ref": technique["id"]})

objects = [soc, tlp, malware, technique, *indicators, *rels]
for o in objects:
    if o["type"] != "marking-definition":
        o.update(created_by_ref=soc["id"], object_marking_refs=[tlp["id"]])
bundle = {"type": "bundle", "id": sid("bundle", "2026-01-15"), "objects": objects}

print(len(bundle["objects"]), "objects:", [o["type"] for o in bundle["objects"]])
print(json.dumps(indicators[0], indent=1))

# Using the bundle: match simple equality patterns against destinations from the logs.
import re
seen = {"ws15": ["upd.cdn-lab.example", "203.0.113.66", "docs.example"], "ws22": ["news.example", "192.0.2.53"]}
for ind in (o for o in objects if o["type"] == "indicator"):
    values = re.findall(r"(?:domain-name|ipv4-addr):value = '([^']+)'", ind["pattern"])
    for host, dests in seen.items():
        for v in set(values) & set(dests):
            print(f"SIGHTING {host} -> {v} | {ind['name']} (confidence {ind['confidence']}, TLP:AMBER+STRICT)")
9 objects: ['identity', 'marking-definition', 'malware', 'attack-pattern', 'indicator', 'indicator', 'relationship', 'relationship', 'relationship']
{
 "type": "indicator",
 "spec_version": "2.1",
 "id": "indicator--dd9f2e83-899b-5ba4-8cca-2fad93ed5a6d",
 "created": "2026-01-15T10:00:00.000Z",
 "modified": "2026-01-15T10:00:00.000Z",
 "name": "LabLoader C2 domain",
 "indicator_types": [
  "malicious-activity"
 ],
 "pattern": "[domain-name:value = 'upd.cdn-lab.example']",
 "pattern_type": "stix",
 "valid_from": "2026-01-15T10:00:00.000Z",
 "valid_until": "2026-02-14T10:00:00.000Z",
 "confidence": 85,
 "created_by_ref": "identity--860e359c-1173-5be7-8dc0-fab68f391ffe",
 "object_marking_refs": [
  "marking-definition--4c54b250-64cc-5705-bd17-431958484b0e"
 ]
}
SIGHTING ws15 -> upd.cdn-lab.example | LabLoader C2 domain (confidence 85, TLP:AMBER+STRICT)
SIGHTING ws15 -> 203.0.113.66 | LabLoader C2 ip (confidence 70, TLP:AMBER+STRICT)

The bundle holds nine objects: who made it (the SOC's identity), how it may be shared (the marking), what it is about (the malware and the ATT&CK attack-pattern), the two indicators with patterns, confidence and an expiry 30 days out, and three relationships that tie them together. Every object points to its creator and its marking, so the context travels with each indicator wherever the bundle goes. Matching the patterns against the destinations in the logs finds two sightings on ws15 and none on ws22, each reported with the indicator's name, confidence and handling label, which is exactly what the analyst lost in the spreadsheet version.

A real pipeline would also report the sighting back as a STIX sighting object (sighting_of_ref the indicator, where_sighted_refs your identity, count, first_seen), so the producer learns its indicator was useful. That feedback is how sharing communities measure quality.

TAXII 2.1

TAXII is a REST API over HTTPS. A server has a discovery endpoint (/taxii2/), one or more API roots, and collections of objects inside each root; clients GET objects (filtered by added_after, type or id) and, where allowed, POST new ones. Requests and responses use the media type application/taxii+json;version=2.1, with STIX content inside. A lab session against a TAXII server in your own lab (taxii.lab.test, credentials for the lab only):

console
$ # lab session: TAXII server inside the lab network; not run here
$ curl -s -u soc:lab-only -H 'Accept: application/taxii+json;version=2.1' \
    https://taxii.lab.test/api1/collections/
{"collections": [{"id": "91a7b528-80eb-42ed-a74d-c6fbd5a26116", "title": "Partner indicators (TLP:AMBER)",
  "can_read": true, "can_write": false, "media_types": ["application/stix+json;version=2.1"]}]}
$ curl -s -u soc:lab-only -H 'Accept: application/taxii+json;version=2.1' \
    'https://taxii.lab.test/api1/collections/91a7b528-80eb-42ed-a74d-c6fbd5a26116/objects/?added_after=2026-01-14T00:00:00Z'
{"more": false, "objects": [ ... STIX objects ... ]}

TLP 2.0

The Traffic Light Protocol labels how far information may travel. Version 2.0 (FIRST, 2022) has five labels:

Label May be shared with
TLP:RED Only the people present in the exchange; no further
TLP:AMBER+STRICT The recipient's own organisation only, on a need-to-know basis
TLP:AMBER The recipient's organisation and its clients, need-to-know
TLP:GREEN The wider community (e.g. peers in a sector), not public channels
TLP:CLEAR Anyone, subject to copyright (replaces TLP:WHITE of version 1.0)

STIX 2.1 itself predefines marking-definition objects for the four TLP 1.0 labels; TLP 2.0 labels are expressed through a separately published STIX extension. The bundle above uses a simple statement marking that names the label, which is enough for a lab but not interoperable: use the published TLP 2.0 marking definitions when exchanging with others.

MISP and OpenCTI, as concepts

  • MISP (an open-source threat-intelligence sharing platform) stores intelligence as events containing attributes (typed values: ip-dst, domain, sha256…) and objects (groups of attributes), tagged with taxonomies (TLP, confidence, kill-chain) and linked to galaxies (threat actors, ATT&CK techniques). Instances synchronise with each other in trusted communities, publish feeds, record sightings and apply decay models to indicator scores. It imports and exports STIX.
  • OpenCTI (open-source, built on STIX 2.1 as its data model) is a knowledge graph of actors, campaigns, malware, techniques, indicators and observables, filled by connectors (MISP, TAXII feeds, ATT&CK, vendor APIs) and used for analysis and for pushing indicators to the SIEM and EDR.

Both are typically deployed in a lab with Docker; in a SOC, they sit between the sources and the detection tools: collect, deduplicate, score, then export the relevant, still-valid part.

How sharing goes wrong, and the fix

  • Indicators without valid_until live forever and turn into false positives; set an expiry (IOC Decay).
  • Markings lost in conversion: copying indicators out of STIX into a spreadsheet drops the TLP. Keep markings attached through the pipeline, and enforce them in the platform's sharing groups.
  • Uncontrolled re-sharing: a TLP:AMBER+STRICT indicator pushed to a public block-list breaks the agreement and can tip off the adversary. Sharing rules must be enforced by the tools, not by memory.

Pitfalls

  • Treating STIX as just an indicator format. Its value is the relationships: which indicator belongs to which malware, which technique, which campaign.
  • Ignoring confidence. A 30-confidence indicator should feed hunting, not blocking.
  • Matching complex patterns with string code. The example handles only simple equality; real patterns have AND, FOLLOWEDBY, WITHIN and qualifiers. Use a STIX pattern library or the platform's matcher.

Practice

1. Write the STIX pattern for a file with SHA-256 `9f…e1` OR a URL `http://203.0.113.66/a.hta`.

[file:hashes.'SHA-256' = '9f…e1'] OR [url:value = 'http://203.0.113.66/a.hta'] (with the full 64-character hash).

2. You received the bundle under TLP:AMBER+STRICT. May you send the indicators to your managed SOC provider?

Not under AMBER+STRICT: it limits sharing to your own organisation. Under TLP:AMBER, sharing with clients and the organisation's need-to-know is allowed; for a provider acting on your behalf, ask the source for permission or for a TLP:AMBER release.

3. Add an `intrusion-set` "LAB-SET-01" that uses LabLoader. Which objects do you add?

An intrusion-set object (name: LAB-SET-01, optional aliases, goals, first_seen) and a relationship with relationship_type: uses, source_ref the intrusion set, target_ref the malware. Both carry created_by_ref and the marking.

Test yourself

What does TAXII 2.1 provide?

  1. A file format for indicators
  2. An HTTPS API to exchange STIX content through collections
  3. A malware sandbox
  4. A SIEM query language

In STIX 2.1, which object type connects an indicator to the malware it detects?

  1. bundle
  2. relationship with relationship_type 'indicates'
  3. identity
  4. marking-definition

Which TLP 2.0 label limits sharing to the recipient's own organisation?

  1. TLP:CLEAR
  2. TLP:GREEN
  3. TLP:AMBER+STRICT
  4. TLP:WHITE

In the program, how many sightings did the two indicators produce, and on which host?

  1. None
  2. Two, both on ws15 (the domain and 203.0.113.66)
  3. Three on ws22
  4. One on each host