如何在 C# 和 C++/CLI 中序列化来自注入器挂钩进程的数据?

发布于 2024-11-06 05:23:59 字数 751 浏览 4 评论 0 原文

我在序列化来自注入器的挂钩进程的数据时遇到一个奇怪的问题(它将间谍 dll 注入到其他进程中)。我成功地将间谍 dll 登陆到其他托管进程中。但是当我想从该spyDll(它实际上落在其他被挂钩的托管进程中)序列化自定义对象时,就会出现问题。在这里,我想序列化数据和列表或 .NET 字典,例如 Dictionary>。有时它会遇到异常,例如“无法序列化 Dictionary>.....”,有时它会说将挂钩进程内的所有类和类型标记为可序列化。我也尝试过 Json 来做到这一点,但不知何故我未能正确使用它。

任何有经验的人都可以成功地将数据从间谍DLL获取到注入器,然后可以将其传输到使用注入器通过挂钩和注入从远程进程获取一些数据的模块,然后再进行。序列化在简单的控制台基础上工作得很好应用程序,但我想要获取数据的方式完全不同,因为有一个 MessageHookProc 函数,它负责将托管程序集加载到其他托管进程中。

有哪位专家擅长 .NET 进程的注入和挂钩,并成功使用了挂钩进程的一些信息?

注意:

====

通过 .NET 远程处理作为进程间通信将数据从挂钩进程分派到挂钩进程(在注入器和间谍 DLL 的帮助下挂钩其他进程的进程)所需的建议?如果有的话,如何没有解决方案将数据从挂钩进程序列化到挂钩进程......?

问候

乌斯曼

I am facing a strange problem while serializing the data from hooked process for injector (which injected the spy dll into some other process). I am successfully landing spy dll into other managed process. But when there I want to serialize custom objects from that spyDll (which actually landed inside other managed process which was hooked) , here problem occurs. Here I want to serialize the data and Lists or .NET dictionaries e.g say Dictionary<IntPtr,List<Objects>>. Sometime it throughs exception such as "cannot serialize Dictionary<IntPtr,List<Objects>>.....", some time it says that mark all classes and types inside hooked process as serializeable. I also tried Json to do that but I failed somehow to use it properly.

Can any body having experience to get the data from spy dll to injector Successfully, which then can be transmitted to the module which is using injector to get some data from remote processes via hooking and injection then after.Serialization works perfectly fine in simple console bases applications, but the way I want to get the data is totally different , as there's one MessageHookProc function , which is responsible to load managed assembly into other managed process.

Any body who is expert in injection and hooking for .NET processes and used some information of hooked processes successfully?

Note :

====

Suggestion required for for dispatching data from hooked process towards hooking process(the process which hooked the other processes with the help of injector and spy dll) via .NET remoting as inter process communication? If some how there's no solution for serialization of the data from hooked process towards hooking process...?

Regards

Usman

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文