我如何钩到Windows的其他程序? [英] How do I hook into other programs in Windows?

查看:116
本文介绍了我如何钩到Windows的其他程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能解释如何做一个节目勾成,并在Windows修改其他程序的行为?

Can anyone explain how does one program hook into and modify behavior of other programs in Windows?

这怎么可能呢?不要小程序保护自己免受进入他们的记忆等其他程序? (我不知道它是如何工作,所以我只是说:到他们的记忆的内部 - 我敢打赌,它比这更复杂)

How is it even possible? Don't windows programs protect themselves from other programs going into their memory, etc? (I don't know the internals how it works so I just said "into their memory" -- I bet it's more complex than that.)

也做现代的Windows,如Windows 7还允许吗?

Also does modern Windows like Windows 7 still allow it?

谢谢,博大Cydo

推荐答案

有几种不同的方式挂接到和修改其他程序的行为。

There are several different ways to hook into and modify the behavior of other programs.

例如,你可以直接写信到另一个程序的内存(WriteProcessMemory的),或者你可以注入一个线程到另一个程序的内存(CreateRemoteThread的)。这presumes你有权利来控制其他程序。

For example, you can directly write to another program's memory (WriteProcessMemory) or you can inject a thread into another program's memory (CreateRemoteThread). This presumes you have some rights to control that other program.

您也可以通过注入一个SetWindowsHookEx函数窗口挂钩。这presumes你是在用户的会话在你注入程序的相同或更高的完整性级别运行。

You can also inject a window hook via SetWindowsHookEx. This presumes you are running in the user's session at the same or higher integrity level of the program you are injecting into.

此仍允许有几个原因。没有一种方法来修改其它程序的行为,你将无法实现调试器。 windows钩子是用于测试程序,辅助程序,即改变它的外表和感觉的Windows等。

This is still allowed for several reasons. Without a way to modify behavior of other programs you would not be able to implement a debugger. Windows hooks are used by testing programs, accessibility programs, programs that change the look and feel of Windows, etc.

这篇关于我如何钩到Windows的其他程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆