Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

[JOEBOB'S POST] Inject DLL before program

User can't post in the proper forum, I'm posting this here on their behalf.

Quote:I'm trying to hook the Direct Input function "DirectInput8Create" but it happens too early so that starting the target program then manually injecting the DLL isn't an option as I would be too late to catch the event.

I know programs like Ollydbg and x64dbg can essentially load a program but stop it from executing on the first line of code until you tell it to start, would something like this be the best option? If so, does anyone have any tips on how to accomplish it? Or is there some better way to handle this?

Thanks.

edit: I found this blog post that helped explain most of what I needed. (can't post links yet)

However I'm a bit stuck on finding the entry point. Using x64dbg to find my program's entry point works great but I get a different value when I try reading the .exe file using the WinNT.h functions and doing:

entryPoint = ntHeader->OptionalHeader.ImageBase + ntHeader->OptionalHeader.AddressOfEntryPoint;

Anyone have any idea why that wouldn't be giving the correct address?

Selling signature space - PM if interested


hi mr fbi


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by odeseyAug 20, 2021 11:57 AM 6 489 Aug 20, 2021 11:57 AM
Last Post: Sajuuk
[C#] by SicknessAug 16, 2020 10:19 AM 19 426 Aug 16, 2020 10:19 AM
Last Post: Sickness
[C] by SecurifierJan 17, 2020 07:20 AM 12 416 Jan 17, 2020 07:20 AM
Last Post: SIM-3602340