TExcelTAD
Home › Malware Analysis, Digital Forensics & Incident Response › Sharing Indicators: STIX 2.1, TAXII and MISP

Sharing Indicators: STIX 2.1, TAXII and MISP

An indicator in a PDF report helps one human. The same indicator in a machine-readable format reaches the SIEM, the EDR, the proxy and fifty partner organisations by the next morning, with its context attached: what it indicates, how confident the source is, since when, and who may see it. The formats for that are STIX (what to say) and TAXII (how to transport it), both OASIS standards, and the most widely used sharing platform is MISP. This lesson builds a small STIX bundle for the lab sample's indicators. Threat-intelligence programmes, feeds and their use in a SOC are covered in sec-blue-team.

Definitions

  • STIX 2.1 (Structured Threat Information Expression, OASIS standard, 2021): a JSON format of objects:
    • SDOs (domain objects): indicator, malware, attack-pattern, threat-actor, intrusion-set, campaign, infrastructure, tool, vulnerability, report, course-of-action, identity, observed-data, malware-analysis, note, opinion, grouping, location, and incident, which 2.1 defines only as a stub.
    • SCOs (cyber-observable objects): file, domain-name, ipv4-addr, url, process, windows-registry-key, mutex, network-traffic and others: the raw facts.
    • SROs (relationship objects): relationship ("indicator indicates malware") and sighting ("we saw this indicator here, this many times").
    • Every object has type, spec_version, id (type--UUID), created and modified. An indicator also needs pattern, pattern_type and valid_from.
  • STIX patterns: a small language for indicators, for example [domain-name:value = 'update.beacon.lab.test'] or [file:hashes.'SHA-256' = '…' OR file:name = 'labagent.exe'].
  • TAXII 2.1: an HTTPS API for exchanging STIX: a server has API roots, each with collections; clients GET and POST objects in a collection. Feeds publish collections, partners poll them.
  • MISP: an open-source threat-intelligence sharing platform: events, attributes, correlations between them, sharing groups; it imports and exports STIX.
  • TLP 2.0 (Traffic Light Protocol, FIRST, 2022): sharing labels TLP:CLEAR, TLP:GREEN (community), TLP:AMBER (organisation and its clients, on a need-to-know basis), TLP:AMBER+STRICT (organisation only), TLP:RED (named recipients only). Every shared object should carry one.

A bundle for the lab sample

The example builds a STIX 2.1 bundle with an identity (the producer), a malware object for the lab family, two indicators (the domain and the URL path with user agent), and indicates relationships. IDs are derived deterministically from names with UUIDv5 so the output is stable; real producers usually use random UUIDv4. The stix2 Python library does the same with validation; plain dictionaries show the structure.

python · try it yourself
import json, uuid

NS = uuid.UUID("00abedb4-aa42-466c-9c01-fed23315a9b7")      # namespace for deterministic ids in this lesson
TS = "2026-01-15T12:00:00.000Z"
def sid(t, name): return f"{t}--{uuid.uuid5(NS, t + ':' + name)}"

ident = {"type": "identity", "spec_version": "2.1", "id": sid("identity", "lab-cert"),
         "created": TS, "modified": TS, "name": "ExcelTAD Lab CERT", "identity_class": "organization"}
malware = {"type": "malware", "spec_version": "2.1", "id": sid("malware", "labagent"),
           "created": TS, "modified": TS, "created_by_ref": ident["id"], "name": "LabAgent",
           "is_family": True, "malware_types": ["remote-access-trojan"],
           "description": "Benign lab sample used in the course; behaves like a simple RAT."}
def indicator(name, pattern, confidence):
    return {"type": "indicator", "spec_version": "2.1", "id": sid("indicator", name),
            "created": TS, "modified": TS, "created_by_ref": ident["id"], "name": name,
            "pattern": pattern, "pattern_type": "stix", "valid_from": TS,
            "valid_until": "2026-04-15T00:00:00.000Z", "confidence": confidence,
            "indicator_types": ["malicious-activity"]}
ind_dom = indicator("LabAgent beacon domain", "[domain-name:value = 'update.beacon.lab.test']", 80)
ind_http = indicator("LabAgent check-in request",
    "[network-traffic:extensions.'http-request-ext'.request_value LIKE '/api/v1/ping?id=%' AND "
    "network-traffic:extensions.'http-request-ext'.request_header.'User-Agent' = 'LabAgent/1.0']", 70)
rels = [{"type": "relationship", "spec_version": "2.1", "id": sid("relationship", i["name"]),
         "created": TS, "modified": TS, "relationship_type": "indicates",
         "source_ref": i["id"], "target_ref": malware["id"]} for i in (ind_dom, ind_http)]
bundle = {"type": "bundle", "id": sid("bundle", "labagent-2026-01-15"),
          "objects": [ident, malware, ind_dom, ind_http, *rels]}

REQUIRED = {"*": {"type", "spec_version", "id", "created", "modified"},
            "indicator": {"pattern", "pattern_type", "valid_from"}, "malware": {"name", "is_family"},
            "relationship": {"relationship_type", "source_ref", "target_ref"}}
ids = {o["id"] for o in bundle["objects"]}
for o in bundle["objects"]:
    missing = (REQUIRED["*"] | REQUIRED.get(o["type"], set())) - o.keys()
    dangling = [o[k] for k in ("source_ref", "target_ref", "created_by_ref") if k in o and o[k] not in ids]
    print(f"{o['type']:<13} {o['id'][:46]}…  missing={sorted(missing) or '-'}  dangling={dangling or '-'}")
print(json.dumps(ind_dom, indent=1)[:420])
identity      identity--467f9345-28e9-520f-bb61-bf75dc18a215…  missing=-  dangling=-
malware       malware--0f647d7e-0669-5f63-bd61-b182a98aae7d…  missing=-  dangling=-
indicator     indicator--df6b7b67-c319-5d2a-92db-6aca427e081…  missing=-  dangling=-
indicator     indicator--03d40a25-a084-52e2-9382-68b47d43dc3…  missing=-  dangling=-
relationship  relationship--7947e177-4d12-53aa-ac47-d189eef8…  missing=-  dangling=-
relationship  relationship--60383d7c-6ce9-5755-8d6c-1bbe5313…  missing=-  dangling=-
{
 "type": "indicator",
 "spec_version": "2.1",
 "id": "indicator--df6b7b67-c319-5d2a-92db-6aca427e0814",
 "created": "2026-01-15T12:00:00.000Z",
 "modified": "2026-01-15T12:00:00.000Z",
 "created_by_ref": "identity--467f9345-28e9-520f-bb61-bf75dc18a215",
 "name": "LabAgent beacon domain",
 "pattern": "[domain-name:value = 'update.beacon.lab.test']",
 "pattern_type": "stix",
 "valid_from": "2026-01-15T12:00:00.000Z",

The checks are the ones a consumer applies before importing: every object has its required properties, and every reference points to an object in the bundle (or one the consumer already has). The indicator carries what a bare domain in an email doesn't: who produced it, from when until when it is valid, how confident the producer is, and (through the relationship) what it indicates.

How shared indicators are used for detection

  • Automated import: SIEMs and threat-intelligence platforms poll TAXII collections and turn STIX patterns into searches; MISP exports to IDS rules, DNS block lists and SIEM lookups.
  • Sightings flow back: when the indicator matches, the consumer can send a sighting to the producer, which tells everyone the indicator is live.
  • Expiry: valid_until lets consumers drop stale indicators automatically, avoiding the false positives of old IPs and domains.

How to share responsibly

  • Label every object with TLP and respect the labels you receive; a TLP:RED indicator in a public feed burns a source.
  • Remove victim data: internal host names, user names, file names that reveal projects. Share the technical indicator, not the incident.
  • Prefer indicators higher on the pyramid (behaviours, tool artefacts, YARA and Sigma rules, which STIX can carry as pattern_type yara or sigma) together with atomic ones.
  • Check legal and contractual limits on sharing (data protection, NDAs); sector ISACs provide agreed rules.

Pitfalls

  • Pattern typos. A misspelt property path makes a pattern that never matches and nobody notices; validate patterns with the STIX tools.
  • Defanged values in STIX. Machine formats carry real values; defang only for humans (sample handling).
  • No confidence, no expiry. Consumers then treat a guess like a confirmed indicator, forever.
  • Mixing STIX 1.x and 2.x. STIX 1 was XML; most tools now expect 2.1 JSON.

Practice

1. Write a STIX pattern for the mutex Global\LabAgent-Mutex-7f3a.

[mutex:name = 'Global\\LabAgent-Mutex-7f3a']. The backslash is escaped inside the pattern's string literal (and escaped again in JSON).

2. Add a sighting object that says your organisation saw the domain indicator 3 times on 2026-01-16.

{"type": "sighting", "spec_version": "2.1", "id": sid("sighting", "dom-0116"), "created": TS, "modified": TS, "sighting_of_ref": ind_dom["id"], "count": 3, "first_seen": "2026-01-16T08:00:00.000Z", "last_seen": "2026-01-16T09:00:00.000Z", "where_sighted_refs": [ident["id"]]}; add it to the bundle and rerun the checks.

3. Which TLP label fits indicators you may share with partner organisations in your sector but not publish?

TLP:GREEN (shareable within the community, not publicly). TLP:AMBER restricts to the recipient organisation and its clients on a need-to-know basis.

Test yourself

What is the relationship between STIX and TAXII?

  1. They are competing formats
  2. STIX describes threat information; TAXII is the API to exchange it
  3. TAXII is the XML version of STIX
  4. STIX encrypts TAXII traffic

Which properties must every STIX 2.1 indicator have besides the common ones?

  1. name and description
  2. pattern, pattern_type and valid_from
  3. confidence and labels
  4. source_ref and target_ref

Which object reports that an indicator was observed?

  1. relationship
  2. sighting
  3. malware
  4. identity

Why does valid_until matter on shared indicators?

  1. It sets the TLP level
  2. It lets consumers drop stale indicators automatically, avoiding later false positives
  3. It encrypts the indicator
  4. It is required for every object