monodis
Disassemble .NET bytecode
TLDR
Disassemble an assembly to textual CIL
Save the output to a file
Show information about an assembly
List the references of an assembly
List all the methods in an assembly
List resources embedded within an assembly
Extract all the embedded resources to the current directory
SYNOPSIS
monodis [options] assembly_file
PARAMETERS
-output=filename
Specifies the output file for the disassembled code. If not specified, the output is written to standard output.
-il
Displays only the IL code. Omits the metadata and other information.
-metadata
Displays only the metadata.
-tokens
Shows all metadata tokens.
-hex
Output the data in hexadecimal
-ignore
Do not resolve method names
DESCRIPTION
The monodis command is a disassembler for .NET assemblies, providing a human-readable representation of the Intermediate Language (IL) code and metadata contained within a .dll or .exe file.
It allows developers to inspect the structure and logic of compiled .NET code, aiding in debugging, reverse engineering, and understanding how .NET applications function.
monodis can display the IL code, class definitions, method signatures, metadata tables (assembly manifest, type definitions, method definitions, etc), resources and other information.
The output format can vary depending on the options used, but generally aims to present the code in a way that resembles assembly language but operates at a higher level of abstraction.
CAVEATS
The output of monodis can be verbose and complex, requiring a good understanding of .NET IL and metadata structures to interpret effectively.
USE CASES
Some common use cases include investigating the implementation details of a third-party library, verifying the correctness of compiled code, and reverse engineering applications to understand their functionality. It is helpful when source code is unavailable.
SEE ALSO
ildasm(1), mono(1)