The idea behind this technique is that a low privileged user can specify a custom Garbage Collector (GC), that a .NET application should use. A custom GC can be specified by setting a command shell environment variable COMPLUS_GCName, that points to a malicious DLL which represents a custom Garbage Collector.
Normally, specifying a custom GC requires administartor privileges, however, since path to a custom GC in COMPLUS_GCName is not sanitized when a custom GC is loaded, directory traversal allows any unprivileged user to specify a custom GC to be loaded from an arbitrary location to which they can drop their DLL.
The Gargage Collector DLL needs to export GC_VersionInfo method for this technique to work - this is the method that will contain our payload, that will be executed once a .NET program starts and loads our custom GC DLL.
Execution
Let's create a DLL that represents a custom Garbage Collector. It needs to export a function GC_VersionInfo, which in our case executes a simple message box: