1

I'm working on a project that needs to be a stand-alone executable but run another executable whenever it is started.

Unfortunately I don't have access to the source code of the second program to embed it in my own code, so I was thinking about some dirty workaround like below in assembly:

enter image description here

This means to join the binary of two files and use jmp to control the program flow. I've tried ollydbg but could not open x64 executables. Is there another way to achieve this?

Thanks in advance

  • why don't just create a batch file and call those 2 binaries? – phuclv May 7 '17 at 0:18
2

To debug 64 bit Windows executables you can use x64dbg. It also has the same patching functionalities ollydbg has. You will also need to resolve imports manually (or adjust the second executable's code to use the PE import table) and relocations.

However, there might be easier ways to do that by extracting the executable and ruining it. An automated way to do that is using WinRar SFX (self extracting) executable. This let's you create an executable that when starts will extract multiple files into a temporary directory and will run one of the extracted files. You can also implement something similar yourself by dropping an executable and running it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.