Lion Cipher Lab

Reverse a custom network protocol from a capture and write your own client for it

Why it matters

Analysts meet custom protocols everywhere: a vendor appliance, an industrial device, a home-grown service, or malware talking to its controller. Often there is no documentation and no source. The method is the same each time: record the bytes, look for repetition, form a guess for each field, test each guess against all the traffic, then prove your understanding by speaking the protocol yourself. This lab runs the whole method on a protocol you build on your own machine, so you can check every answer. You will also see why home-made protocols are easy to read and forge, which is the…

What you'll learn

Steps in this lab

  1. The situation, and the plan
  2. Save the sealed boxes
  3. Write a tap that records the bytes
  4. Run the server, the tap and the client
  5. Find the frame: magic, command, sequence, length
  6. Identify the last byte: test checksum guesses
  7. Write the decoder
  8. Prove it: write your own client
  9. Read it like a defender: what is wrong with this protocol
  10. Clean up

Open the full interactive lab →

Keep learning