Lion Cipher Lab

Recover a hidden algorithm with Ghidra (reverse engineering, part 2)

Why it matters

The first thing a malware author does to hide a secret — a command-and-control address, a decryption key, an unlock code — is stop storing it in plaintext, because plaintext falls out of a five-second `strings` scan. They store it transformed and reconstruct it at runtime. So the analyst's real job is rarely "spot the constant"; it is "read what the code DOES and undo it." This lab is that skill in miniature. On a binary you built and understand, you follow a loop's control flow in Ghidra's decompiler, recognise a simple XOR transform, read the hardcoded target bytes, and invert the transform…

What you'll learn

Steps in this lab

  1. What changed since part 1 — and the words you need
  2. The safety envelope, unchanged — reverse only what you own
  3. Confirm your toolchain from part 1 is ready
  4. Write and compile the transformed-key checker
  5. Import, analyze, and prove the strings trick fails
  6. Read the control flow: find the loop and the transform
  7. Read the target bytes and invert the transform
  8. What you just learned — and where it goes next

Open the full interactive lab →