.NET Loader

PollIs this useful?
9 votes
Posts 113 of 13 · Page 1 of 1
.NET Loader
Hey guys, here is code where it will load the CLR runtime into a executable and execute your .NET DLL, allowing hacks written in VB.NET or C# or w/e other language you use the .NET framework in. Hope it helps you guys.

Credits to Void and some website called thecodingwheel(?)

I think it took me a couple of hours to make it work and I used it for my hack a few months ago... Guess its time to give back. I might post the source for my .DLL hack written in C# (and CPP) a bit later, I still need to clean out some of the stuff I'm not supposed to release /

Yes I suck at CPP, and its extremely messy but it gets the job done

[php]
#include "MSCorEE.h"
#include <windows.h>
#pragma comment (lib, "mscoree.lib")

#include <iostream>
#include <iomanip>
#include <fstream>

#include <stdio.h> //put these with the rest of your inclues
#include <stdlib.h>

using namespace std;

void StartTheDotNetRuntime();

BOOLEAN WINAPI DllMain(HINSTANCE hInst,DWORD Reason,void* lpReserved)
{
if(Reason == DLL_PROCESS_ATTACH)
{
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)StartTheDotNetRuntime, NULL, NULL, NULL);
}
return true;
}



void StartTheDotNetRuntime()
{
// Bind to the CLR runtime..
ICLRRuntimeHost *pClrHost = NULL;
HRESULT hr = CorBindToRuntimeEx(
NULL, L"wks", 0, CLSID_CLRRuntimeHost,
IID_ICLRRuntimeHost, (PVOID*)&pClrHost);

// Push the big START button shown above
hr = pClrHost->Start();
// Okay, the CLR is up and running in this (previously native) process.
DWORD dwRet = 0;
hr = pClrHost->ExecuteInDefaultAppDomain(
L"DLLName.dll", //If .NET DLL is placed in CA folder just use './DLLName.dll'
L"Namespace.Class", L"Function", L"String Argument", &dwRet);

//Optionally stop the CLR runtime (we could also leave it running)
//hr = pClrHost->Stop();

// Don't forget to clean up.
pClrHost->Release();
}
[/php]

Have fun!
I dont get it? first post
Quote Originally Posted by eXaLtIc View Post
I dont get it? first post
1. Loads .NET framework into your host app
2. Loads your CLR (VB .NET / C# .NET) DLL
3. Calls a function in the designated namespace
4. Your code runs.

I had this from a while back, and I actually got it to work with MapleStory ... except reading and writing memory was a huge pain, so I dumped it and moved to C++.
Quote Originally Posted by scimmyboy View Post
wat the fuck mike. where the hell have you been??
Dead, and now I'm dying again

Quote Originally Posted by freedompeace View Post
1. Loads .NET framework into your host app
2. Loads your CLR (VB .NET / C# .NET) DLL
3. Calls a function in the designated namespace
4. Your code runs.

I had this from a while back, and I actually got it to work with MapleStory ... except reading and writing memory was a huge pain, so I dumped it and moved to C++.
P/Invokes
If you code a hack in .NET you can inject it with this CLR loader, if you try injecting a .NET DLL like a non.NET DLL it won't work
Nice user1.
wat the fuck mike. where the hell have you been??
Great Work
I like this
Ima make one later.... FOSHO
Great idea but you can do so much more with C++ than with those .net languages.
I'd rather code correct, easily debuggable high-level code than error-prone low-level nonsense.

For some things, C++ is the tool of choice, for others -- C#.

Don't hammer screws. In this case, using C# may/may not be doing just that. I can imagine in some cases though, having C# collect information and communicate with a C++ component that actually performs the cheating.

What I am thinking about is something like in-game authorization and monitoring of outside information sources like my steamworks plugin. It allowed cheats in-game to determine whether another player was on the current player's friend's list. I'd have rather written that in C# if it were any more complicated than it was.
I used C# for the hotkeys and some other stuff and had the actual hacking done using Platform Invoke...

Thank god for P/Invoke, where would .NET be without it?!!??
Posts 113 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?