Defined by Microsoft for use in recent versions of Windows, an assembly in the Common Language Infrastructure (CLI) is a compiled code library used for deployment, versioning, and security.
In the .NET Framework implementation, this compiler is part of the Common Language Runtime (CLR).
To solve this issue, the CLI introduces the GAC (Global Assembly Cache) that is treated as a single folder by run-time, but is actually implemented using nested file system folders.
The developer of the intended assembly keeps the private key secret, so a cracker cannot have access to it nor simply guess it.
Thus the cracker cannot make his assembly impersonate something else, lacking the possibility to sign it correctly after the change.
[3] CLI Code Access Security is based on assemblies and evidence.
This means that the code will perform some privileged action only if all of the assemblies of all of the methods in the call stack have the specified permission.
The CLI code can also perform Linked Demand for getting the permission from the call stack.
In this case the CLR will look at only one method in the call stack in the TOP position for the specified permission.
The framework internally converts the CIL (bytecode) into native assembly code.
If we have a program that prints "Hello World", the equivalent CIL code for the method is: The CIL code loads the String onto the stack, then calls the WriteLine function and returns.