Jump to content
  • Advertisement
Sign in to follow this  
shoez

Forcing a process to execute code?

This topic is 2559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What methods are available where i can have my application FORCE an external process to execute code in the targets address space? ( besides using createremotethread() ) -thanks!

Share this post


Link to post
Share on other sites
Advertisement
Use the facilities provided by the external process.Modify the external process to provide said facilities.
Everything else involves exploiting vulnerabilities in the external process (hacking).

Share this post


Link to post
Share on other sites

What methods are available where i can have my application FORCE an external process to execute code in the targets address space? ( besides using createremotethread() ) -thanks!

I immediately question: Why?

If you own the source program you can simply load the library and run it.

The OS has very strict permissions restrictions about who can load what code. Most PCs (except some old decade-old PCs) help the OS to enforce those restrictions by marking only certain pages of memory as executable. Further, there are many rules enforced for memory management.

If you don't own the target application, you can use the debugger api to attempt to open it. Again, this is subject to proper permissions on the app and digital signatures.


If you don't own the app and you don't have debugger permissions and an unsigned executable (or signed executable and also have the key), then I really question the reason of why you want to do this.

Obviously there are hacks and back-doors and undocumented methods to do it. But attempting to do so voids the guarantees of your API: Microsoft can (and does) change that behavior all the time with updates and patches and hotfixes. There is a very good chance that whatever method you use will end up vanishing underneath you with each Tuesday Patch Day.


What are you attempting to accomplish? What (legitimate) problem are you trying to solve?

Share this post


Link to post
Share on other sites

I immediately question: Why?
.
.
.

What are you attempting to accomplish? What (legitimate) problem are you trying to solve?


I second this. It sounds to me as though you have some kind of problem elsewhere and you've decided that this is the way to solve it, but you haven't yet done a full analysis of the cause. If you use something like this to solve such a problem you may very well succeed, but the underlying bug that caused the problem in the first place will still be there.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!