Lion Cipher Lab

Work with STIX 2.1 in Python (build and parse real threat intel)

Why it matters

Threat intelligence is only useful if machines can act on it. A PDF report that says "watch out for evil.example" cannot feed a firewall, a SIEM, or a detection rule — a human has to retype it, and things get lost. STIX 2.1 is the common JSON language that lets tools and teams exchange intel without that manual step: one team's indicator becomes another team's detection automatically. Being able to build and parse STIX in code — not just click it out of a platform — is what lets you wire feeds together, script bulk imports, sanity-check what a vendor sent you, and understand what your…

What you'll learn

Steps in this lab

  1. What STIX 2.1 is, and why it exists
  2. Set up a clean workspace (a virtual environment)
  3. Install the stix2 library and confirm the import
  4. Create an Indicator, a Malware SDO, and a Relationship SRO
  5. Wrap it in a Bundle, serialize, and save the JSON
  6. Parse a bundle back in and pull fields out
  7. Add ATT&CK context — and meet the TAXII transport
  8. Versioning, revocation, and when a platform is the right answer

Open the full interactive lab →