Answer the question
In order to leave comments, you need to log in
How to add your DLL to EXE import table?
Good afternoon.
I wrote a hot patch for the program. It works like this: it launches the desired program, "patches" its memory, and ends itself.
I would like the patch to run automatically when this desired program is launched.
There was an idea to simply arrange the patch as a DLL, and add this DLL to the import table of the EXE file, and in the initialization section, simply start the thread that will execute the patch.
Tell me if it is difficult to do and how?
Thank you.
PS The patch fixes a bug in the program (related to the denomination in Belarus). No crime.
Answer the question
In order to leave comments, you need to log in
replace one of the system libraries with your own - by throwing the modification into the program folder.
The import table is hard to fix. You need to carefully study the PE format, disassemble the EXE file into parts, add a new section before the resource section, in which to form a new import table, leaving the old "Thunk RVA". Then compile again by recalculating the location of each section on the disk. But everything has already been written for you by evil virusmakers :), and you don't seem to have even tried to find such utilities. I suggest Google: add dll to import
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question