开发者

Can we inject our code to another sub process?

开发者 https://www.devze.com 2023-03-19 19:34 出处:网络
Is it possible to inject the code into another sub process? Let\'s say we have Silverlight plugin in the browser.. We want to inject our code (something like Snoop) into that plugin\'s process. When I

Is it possible to inject the code into another sub process? Let's say we have Silverlight plugin in the browser.. We want to inject our code (something like Snoop) into that plugin's process. When I'm using Spy++, I can receive the event from the plugin.. SO, I'm assuming that it is possible to inject the code as well..

Thanks in advance.

Edit: I'm currently looking at the code of Snoop and this article http://www.codeproject.com/KB/threads/winspy.aspx.. I understand that we can inject our code into other process.. M开发者_JAVA百科y question is how to hook to other "sub" process..

Please take a look at this screenshot.. I'm trying to hook into "Microsoft SIlverlight" (Red arrow) but it doesn't work.. It would be great if you guys can share me some code example for hooking sub-process.. Thanks..

Can we inject our code to another sub process?


It's not quite "injection", but SetWindowsHookEx is pretty useful.

If you really need injection, take a look at what Process Hacker does.


Yes, it is possible to hook to other process.

For more information read the chapter 22 from the book “Programming Applications for Microsoft Windows” by Jeffrey Richter. It contains different ways of hooking. I think this may help you.

API’s like SetWindowsHookEx(),CreateRemoteThread() ect will help you to hook to other process.


Windows doesn't have 'sub-processes,' but processes can have child processes. If child processes couldn't be hooked, you wouldn't be able to hook most running applications as they're child processes of explorer. Spy++ is showing you child windows, not processes. If you want to hook only input on a particular window you'll need to filter based on the active control.

Note: You're in Spy++ windows view, you can switch to processes view with the gears button.

0

精彩评论

暂无评论...
验证码 换一张
取 消