Lion Cipher Lab

Build your own threat-intel collection pipeline in Python

Why it matters

Following threat feeds by hand works right up until it doesn't. Six sources, checked properly, is forty-five minutes a day of opening tabs, re-reading the same three headlines you already saw yesterday, and copying indicators into a note — and the first busy week you skip it, then you never restart. A hundred and twenty lines of Python fixes that permanently: it fetches your sources on a schedule, remembers what it has already shown you, pulls the indicators out of the text, ranks each item against the intelligence requirements you actually wrote down, and leaves a short Markdown brief on…

What you'll learn

Steps in this lab

  1. What you are building, and why it is the next rung
  2. First, the judgment: when automating is leverage and when it is a hobby
  3. Set up: a folder, Python, and a virtual environment
  4. Write the collection plan down as config, not as code
  5. Start the script: imports and paths that survive being run from anywhere
  6. Memory: a SQLite table and a stable deduplication key
  7. Fetch politely — and do not re-download what has not changed
  8. Normalize: force every source into one shape
  9. Extract indicators — but refang first, or you will find nothing
  10. Be suspicious of your own regex: the three filters that make the output usable
  11. Score against your PIRs — crude ranking, not intelligence
  12. Emit a brief a human will actually read, then run the whole thing
  13. Run it a second time — this is the moment it becomes a daily tool
  14. Now read your brief critically — your ranking is probably wrong
  15. Say it out loud: NEVER auto-ingest these indicators into a blocklist
  16. Schedule it: cron on Linux/macOS, Task Scheduler on Windows
  17. Build or buy: when this script is right, and when it is MISP or OpenCTI
  18. What you own now

Open the full interactive lab →