Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / dark_injector - Inject code into early stages of dbpro exe loading for DirectX version checking and more

Author
Message
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 19th Nov 2005 20:24 Edited at: 20th Jul 2006 23:04


Dbpro exes consist of a normal exe with data appended on the end. The exe part is very similar between all dbpro exes. The same exe handles the three different types of dbpro exes, normal, compressed and exe with .pck file.

With a compressed exe the exe sees that the first appended file is "compress.dll". It then extracts "compress.dll" and then calls the decompress_block function within the dll. To this function it passes a pointer to the rest of the appended data and its size. The "compress.dll" then decompresses the data and returns a pointer to the decompressed data back to the dbpro exe.

If we inject our own "compress.dll" as the first attached file then the dbpro exe will extract our dll and call the compress_block function it contains passing a pointer to the rest of the appended data and its size.

We can then just pass back the already decompressed appended data and the dbpro exe will start as normal. We can also return 0 which will tell the dbpro exe an error occurred and it will silently exit.

This is mainly useful if used to inject a user friendly directx version check but it could be used to do anything that you can be done in a dll and needs to be done as soon as possible after the exe starts.

This program provides a simple way to inject a dll as the first attached file and some dlls to inject.

Download, with source.
http://winch.pinkbile.com/dark_injector.php

By way of demonstration, he emitted a batlike squeak that was indeed bothersome.
xtom
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Ireland
Posted: 20th Nov 2005 20:20
Cool utility. Nice work.

At the moment I would just warn people about the DirectX requirement before downloading and if they run the program and it silently exits then it's not a big deal, they'll probably check out troubleshooting info or the requirements. Less work than injecting the dll and playing around with the exe, but then I am feeling lazy at the moment. Anyways nice program, I wonder what else you could inject.

Is it possible to inject other dlls instead of having them beside the exe?

Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 21st Nov 2005 15:41
Sweet!

thanks alot for this! I've always wanted something like this


btw xtom i've said this before but bubble bobble rocks

"We make the worst games in the universe..."
Hawkeye
21
Years of Service
User Offline
Joined: 19th Sep 2003
Location: SC, USA
Posted: 21st Nov 2005 17:48
Wowwww..... this little gadget looks like it would be bloody useful


I am but mad north north-west; when the wind is southerly I know a hawk from a handsaw - Hamlet, Hamlet
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 21st Nov 2005 21:04
Another cool utility from the winch

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
jrowe
22
Years of Service
User Offline
Joined: 12th Oct 2002
Location: Here
Posted: 21st Nov 2005 21:17
VERY useful, thanks the_winch!

Tinnedhead Productions

For Fathers and Sons who enjoy wholy spirits.

Login to post a reply

Server time is: 2024-11-19 09:34:56
Your offset time is: 2024-11-19 09:34:56