Jump to content
Tuts 4 You

Creating a proxy DLL


amateur

Recommended Posts

Hi.

I would like some help on some advanced subject for me. I'm doing my first steps to create a proxy dlls for practice. I use VS2008 and 2010.

So assuming i have a simple crackme. Ηypothetically to get the registered message, offsets with patches are: 0x1234: 73->90 and 0x1235: 33->90.
 

offsets[]  = {0x1234, 0x1235};
srcbytes[] = {0x73, 0x33};
rplbytes[] = {0x90. 0x90};

Ok with this. Now i will explaing what i do quickly.

I try to locate possible dlls and i'm finding, hypothetically again, "version.dll". (Using Procomon -> filters: Procces name..is ->  crackme.exe, Path...ends -> dll, Result...contains -> NAME NOT FOUND).

Alright.  In VS Studio now. Creating a DLL project (no precompiled headers, and checked export symbols). And we have the basic template:

// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}

I don't know if i do something wrong up to here. Do i?

In this step now, can someone guide/help me on how to apply on this template, the hypothetical patches at the specific offsets that i have mentioned in the small C code snippet, to study the filled template further.

Practical, i think i do mistakes regarding the APIs: WriteProcessMemory, ReadProcessMemory, LoadLibrary and the other related API's that are needed to make it work.

The only things i can do at the moment are: to add messageboxes, splash screens :)

I haven't found a tutorials or something that fits to my needs yet, so any help would be appreciated!

Thanks all!

Edited by amateur
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...