Lion Cipher Lab
Decompile a .NET program you built yourself with ILSpy, and read its IL
- AppSec / DevSecOps
- Intermediate
- ~60 min
- Free · no account required
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
- creating and building a C# console app with dotnet new and dotnet build
- installing and running the ilspycmd command line decompiler
- decompiling a whole assembly, one type, and a compilable project with -p and -o
- viewing the intermediate language (IL) with -il and spotting ldstr string loads and branches
- explaining why names and strings survive in .NET metadata and what a PDB adds
- describing what obfuscators change and what a defender should do about secrets in code
Steps in this lab
- Why a .NET program is easy to read back
- Install ilspycmd
- Build a tiny licence-check program
- Hide the source and analyse only the dll
- Decompile to C#: the whole assembly, the list of types, one type
- Read the IL: the layer under the C#
- Hunt for hard-coded strings the cheap way, and compare with the decompiler
- Export a project and compare the PDB effect
- What obfuscators change, when NOT to trust this, and how a pro does it better
Open the full interactive lab →