RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Hosting CLR] Betcha can't reflector this!

arul

Sorceror
[Hosting CLR] Betcha can't reflector this!

In the archive is a source code for a very basic program that is capable of hosting CLR inside of an unmanaged process.

Over the time I got bored by these 'haxxors' opening my apps in reflector and finding their way to cheat/abuse them. And so I wrote this, with a little update the input assemblies can be encrypted/compressed, all you need to do is make sure that the LoadCodeFromFile() function returns a valid .NET executable, or bypass it completely by fetching the assembly from somewhere else, the only limit is your imagination.

Please note that the error checking, or lack thereof, suggests not using this code in production.

The code has been briefly commented, but I believe that it's self explanatory enough.

Usage:
Code:
CLRSTARTUPINFO * info = malloc(sizeof(CLRSTARTUPINFO));
LoadCodeFromFile("somefile", info);
CreateThread(NULL, 0, CLRThreadProc, info, 0, NULL); // clr thread proc will *not* cleanup info when its done
Have fun!

Questions/Suggestions highly appreciated.
 

Attachments

  • clr host.rar
    85.8 KB · Views: 28
Top