Lion Cipher Lab

Emulate shellcode safely with the Unicorn Engine

Why it matters

A huge amount of what a threat-intel or malware analyst has to understand arrives as a raw blob of bytes with no file header, no imports and no obvious structure: the shellcode inside an exploit, the first stage a loader decrypts into memory, the position-independent payload a document macro sprays onto the heap. You cannot just double-click it, and running it on a real machine is exactly what the author wants you to do. Static disassembly gets you the instructions but not the answers — a loader that XOR-decodes its real payload, or computes a C2 address from a runtime value, shows a static…

What you'll learn

Steps in this lab

  1. What emulation buys you — and why not just run it
  2. Install Unicorn's Python binding
  3. The mental model: map memory, write code, run a range
  4. Stub 1 — three instructions you can predict by hand
  5. Instrument it: watch every instruction retire
  6. Meet the classic failure: unmapped memory
  7. Stub 2 — recover an indicator the code computes at runtime
  8. Know the limits — when emulation lies or stalls
  9. Do it better: graduate to Qiling when you need an OS

Open the full interactive lab →