How to hook MANAGED(.NET) Processes and collect information inside that process?

拜拜、爱过 提交于 2019-12-10 23:15:19

问题


I need to hook managed (C#,C++/CLI) processes, I need to find and send information about how many windows it has(its associated controls and their properties)to the target application which is written in C# managed code.

For that What I need to do? Do I need to explore IAT (Import Address Table) & EAT(Export address Table) of that managed process? Do I need to write injector DLL in C++? What else apart from changing IAT and EAT , do I need?

[EDIT] I need to attach managed running processes to application(which will host or attach other process). After attaching process I need to get the properties of all the controls associated with that process's windows.

One by one I will iterate the windows of that attached process ,will enumerate all the controls associated with that window(will get control's id,name,color,position,size etc), and will send this whole info to other app or the app which attached other apps(actually that app as host again need to redraw same controls with the usage of that information, Dont ask why I need to do this:-))

Regards Usman


回答1:


I believe the answers to this questions may be of help to you:

How to use reflection to create a "reflection machine"




回答2:


Please see this http://www.codeproject.com/Articles/463508/Net-CLR-Injection-Modify-IL-Codes-on-Run-time

You can do that by modifying the IL code on runtime

Also, Profiler interface is another way for you



来源:https://stackoverflow.com/questions/5290842/how-to-hook-managed-net-processes-and-collect-information-inside-that-process

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!