What is the most easy and fast way to edit PE executable file to make it load specified DLL at startup?

StackOverflow https://stackoverflow.com/questions/18018497

سؤال

I need to make some exe file to load my DLL at startup...
What is the easiest way to do it?
I need this exactly, no any injectors or starters.

I though about adding one more code section into exe, rewriting to there entry point logic and placing DLL loading code, then NOPing original entry point and calling my custom made entry point function. Will this work? Are there any other easer ways?

I also thinking about changing one of system dll name in hex editor to name of my DLL. Will this work? If my dll then load that replaced system dll? Any thoughts?

هل كانت مفيدة؟

المحلول

Adding it to the PE's import table should be enough. Woodman's lists a few tools which can do it:

http://www.woodmann.com/collaborative/tools/index.php/Category:Import_Editors

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top