Lion Cipher Lab

Hunt for IOCs in your logs with grep, awk, and jq

Why it matters

When a security team gets a warning — a government advisory, a threat report, a vendor email — it almost always arrives as a list of indicators of compromise: 'if you see these IPs, domains, or file hashes, you may be affected.' The very first thing a defender does is turn that list on their OWN logs and ask a blunt question: is any of this in my environment, and how much? That search is the heartbeat of a Security Operations Center, and the surprise for most newcomers is that the core tools are free, already installed, and decades old: grep, awk, and jq. You do not need an expensive platform…

What you'll learn

Steps in this lab

  1. The words first: log, IOC, threat hunting, terminal
  2. The three tools: grep, awk, jq — and the one that ties them together, the pipe
  3. Open a terminal and confirm your tools (macOS, Linux, or Windows)
  4. Generate your sample data (you are never blocked on logs)
  5. Meet your IOC list: what each indicator is
  6. Your first hunt: grep one IOC and count the hits
  7. Hunt the WHOLE list at once with grep -f
  8. Add context with awk: columns, top talkers, and matched fields
  9. Search JSON logs with jq (by field name, not by guessing)
  10. Watch for false positives: not every match is a real hit
  11. Write the findings summary: the artifact that matters
  12. Why this reflex is worth building

Open the full interactive lab →