一个进程如何访问外部TIB? [英] How can one process access foreign TIB?
本文介绍了一个进程如何访问外部TIB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能(以及如何)访问某个其他进程的线程的线程信息块?
Is it possible (and how) to access Thread Information Block of a thread of some another process?
推荐答案
有可能.
第一步是使用NtQueryInformationThread 函数,ThreadInformationClass 设置为 ThreadBasicInformation.THREAD_BASIC_INFORMATION 结构包含指向线程 TEB 的指针.然后你可以使用 ReadProcessMemory 和 WriteProcessMemory 以读取或修改 TEB 的内容.
The first step is to get the adress of the Thread Information Block by using the NtQueryInformationThread function with ThreadInformationClass set to ThreadBasicInformation. The THREAD_BASIC_INFORMATION structure contains a pointer to the TEB of the thread. Then you can use ReadProcessMemory and WriteProcessMemory in order to read or modify the content of the TEB.
这篇关于一个进程如何访问外部TIB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文