robot icon indicating copy to clipboard operation
robot copied to clipboard

Add ability to inject and execute assembly

Open karliky opened this issue 9 years ago • 1 comments

I guess that is a good feature to be able to write your own assembly code and execute it in the target process.

In windows it should be something like this:

  • Write the assembly using Buffer API, like new Buffer([0xF3,0x0F,0x11,0x4F,0x6C])
  • process.injectAndExecute(); // This creates a new thread, places the function in it's stack and frees the meory after executing the code

And example of what I say can be found here: http://www.mpgh.net/forum/showthread.php?t=986479

I don't know how to do it multiplatform but I guess that this should be possible in multiple platforms

This might be related https://github.com/Robot/robot/issues/13

karliky avatar Jul 05 '16 10:07 karliky

Yes, #12, #13, and #28 are closely related to this and I would expect that most of the functionality you're looking for would come as a result from these features. However, I don't think #12 would be implemented because it's a bit out of the scope of the project, but there's no reason you couldn't use something like AsmJit in place of it.

Ideally I want to be able to have access to the thread CONTEXT but I'm not really sure how that would play with Mac and Linux.

dkrutsko avatar Jul 06 '16 20:07 dkrutsko