Lion Cipher Lab

Decompile a .NET program you built yourself with ILSpy, and read its IL

Why it matters

A huge amount of business software, internal tools and malware samples are written for .NET. A .NET program is not native machine code: it is a compact intermediate language plus metadata that describes every class and method by name. That makes it unusually easy to read back. Analysts use this to understand a suspicious program quickly. Developers should know it too, because anything you put in a .NET program, including a licence key or an API token, can be read by anyone who has the file. Building your own sample means you can check the decompiler against the truth.

What you'll learn

Steps in this lab

  1. Why a .NET program is easy to read back
  2. Install ilspycmd
  3. Build a tiny licence-check program
  4. Hide the source and analyse only the dll
  5. Decompile to C#: the whole assembly, the list of types, one type
  6. Read the IL: the layer under the C#
  7. Hunt for hard-coded strings the cheap way, and compare with the decompiler
  8. Export a project and compare the PDB effect
  9. What obfuscators change, when NOT to trust this, and how a pro does it better

Open the full interactive lab →

Keep learning