Forum Thread: How to Bind an Exe That Starts and Ends with the First?

Hi, first of all many thanks for all the great tutorials and info offered in this site!

I would like to know how would it be possible to bind an exe let's call it program2 to another one let's call it program1 so that,

1) program1 starts
2) program2 starts
3) while program1 is active (say, it is present in taskmanager) program2 continues its execution
4) program1 finishes
5) program2 finishes

I know how to program so that would not be a problem to code step 3 (coding program2) but for the other steps I would appreciate any help! Ideally I would like only program1 to be visible in taskmanager.

PS: I posted somewhere and answer with this question before figuring out how to make this post, if mods would like to delete that one, I appreciate it.

5 Responses

That would depend on program2's execution condition(s) unless you plan to have it execute indefinitely until you forcefully terminate it, or use a global object to trigger its execution state.

If your point is to get Meterpreter to run in background while another program is shown, look into the program Shellter. Shellter can take an exe file and inject Meterpreter into a code cave. The original exe can still execute as normal.

Second thing to look into is Iexpress in Windows.

Thank you for your guidance! I will look into Meterpreter and Shellter (I already know about Iexpress). Actually what I would like is to inject a program that I would create (program2) into another program (program1) so that it starts when program1 starts and finishes when program1 finishes and program2 does not show in taskbar.

Does this have to do with Hacking?

From what I know, you can inject program2's raw bytes into a newly created section in program1, inject shellcode that will load and execute program2 via process hollowing (using SW_HIDE in the ShowWindow parameter to hide the window) and point AddressOfEntryPoint to it. If this is successful, it will create a thread to the original AddressOfEntryPoint and then use WaitForSingleObject using the process-hollowed-program2's handle. Because program2 will be a child process, if program1 terminates, program2 should also be forced to terminate.

This is actually an interesting idea. I might look into developing it.

Share Your Thoughts

  • Hot
  • Active