📜 ⬆️ ⬇️

Automate the creation of a proxy dll

Greetings

Today, an article appeared on Habré, which tells how to intercept DLL calls from a program and process them as needed - for legitimate, and maybe not quite, purposes. Anyway, this technique can be useful in different cases.

In order not to constantly perform the same actions, I decided to automate the process of creating a Visual Studio project based on the selected dll.

First, I downloaded the source of the project from the article. An AutoIt scripting language was taken for automation, and a simple GUI was written on it:
')


In order not to depend on the dumpbin utility, it was decided to get the export list directly from the program, since the necessary functionality was already written by one of the AutoIt forum users.

Then, source code sections were cut, such as an export list, assembler inserts, and the name of the output library — they will be generated when the project is exported. When compiling a program, these sources are added to the resources section.

Actually, the working cycle of the program:
For those who want to try out this program in practice:
Executable file / source .
The only thing that could not be done at the moment is to create a proxy dll for the library with export in the C ++ style.

Thanks for attention!

Source: https://habr.com/ru/post/139065/


All Articles