在Windows中使用EncodePointer / DecodePointer有什么好处?
MSDN说:
Encoding globally available pointers helps protect them from being exploited. The **EncodePointer** function obfuscates the pointer value with a secret so that it cannot be predicted by an external agent. The secret used **EncodePointer** is different for each process.现在的问题是:如果攻击者在我的程序之外,那么它的地址空间与我的地址空间不同,所以我的应用程序中的地址是不可用的。如果它可以在我的地址空间中执行一个代码,它可以调用DecodePointer并使用该地址调用编码的指针。
那么,这些函数的用途是什么,它们如何帮助我提高安全性呢?
发布于 2013-11-28 08:46:29
您没有意识到,EncodePointer()可以防止恶意的数据。在恶意代码变得有害之前,它需要先开始运行。完成此操作的基本方法是覆盖函数调用的返回地址或覆盖函数指针。程序本身现在通过分别从函数返回或通过函数指针调用来激活代码。EncodePointer保护一个函数指针,攻击者无法猜测如何对他编写的数据进行编码,以便在程序的DecodePointer()调用之后,它仍然指向他的代码。
数据不能调用EncodePointer。
发布于 2013-11-28 08:26:29
具有提升权限的攻击者可以在进程中创建线程。内核代码还可以将进程的部分虚拟地址映射到另一个用户进程和/或系统进程。
使用EncodePointer只会使攻击者更加困难,但不能保证任何事情。
https://stackoverflow.com/questions/20260523
复制相似问题