Sign in to follow this  
Cornflake2gs

DLL Injection

Recommended Posts

Cornflake2gs    122
How exactly does DLL Injection work? I play a game called Rogue Spear and they dont have dedicated server capabilities, so I wanted to see if I could automate it. I just want to see what exactly I need to know in order to achieve this. The whole idea of it perplexed me because Im assuming you have to have some idea how the program works in order to inject your DLL. I dont even know how to make a DLL nor do I understand how to get the DLL to interface with the program. Any advice you can give me, or any websites you can point me to would be great. I honestly dont know much and I am still learning but this is the type of programming I want to get into. Thanks in advance.

Share this post


Link to post
Share on other sites
PiCkLeD    188
DLL Injection allows you to force any executable file to load your own dynamic link library, you would then have access to that process's memory space available to your DLL.

Once you are in that process's memory space (with the attached DLL), you can do almost anything you wish ...

On DLL_ATTACH:

Create your own Thread.
Modify the contents / program flow of that particular process.
Read from the process's memory directly, Spying etc.
Set up function 'Detours' relative to that process's functions: see Microsoft Detours.

However you should note that you would need permission from the owner should you wish to modify the orginal contents of an exe, as far as I know. It's a pretty touchy subject to say the least.

In relation to your server question, you would need to create some sort of standalone application that 'emulates' the orginal server in order to extend it, this would not require injection but an intimate knowledge of reverse engineering (Assembly language understanding required). Once again you would need permission to this!

All in all it's a pretty advanced topic.

"Microsoft Detours"
http://research.microsoft.com/sn/detours/

"DLL Injection and function interception tutorial"
http://www.codeproject.com/dll/DLL_Injection_tutorial.asp

"Introduction to Reverse Engineering Win32 Applications"
http://www.uninformed.org/?v=1&a=7&t=sumry

It should be noted however that the GameDev.net beginner forum is not related to this kind of discussion but for the development of your own games, so I may be treading a thin line posting this information. I'm happy to remove this post if need be.

Share this post


Link to post
Share on other sites

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

Sign in to follow this