在32位和64位Linux和Windows中,ASLR将随机分配多少位内存地址


0

ASLR在32位和64位linux和Windows中将随机分配多少位内存地址?请举一些例子。

Answers:


0

以下内容摘自Technet文章,其中包含其他信息。

在Windows 8之前的版本中,64位可执行文件映像具有与随机化32位可执行文件映像时相同的熵(8位或256分之一的正确猜测机会)。从Windows 8开始,在大多数情况下,应用于64位图像的熵的数量已大大增加:

DLL images based above 4 GB: 19 bits of entropy (1 in 524,288 chance of guessing correctly)
DLL images based below 4 GB: 14 bits of entropy (1 in 16,384 chance of guessing correctly). 
EXE images based above 4 GB: 17 bits of entropy (1 in 131,072 chance of guessing correctly).
EXE images based below 4 GB: 8 bits of entropy (1 in 256 chance of guessing correctly).

由于图像的基地址而存在熵差的原因也是出于兼容性原因。Windows内核当前使用映像的首选基址作为提示,以决定映像是否支持基于4 GB以上的映像。低于4 GB的映像可能未在重定位至4 GB以上的场景中进行测试,因此可能存在潜在的指针截断问题。因此,Windows内核会尽力确保这些映像加载到4 GB以下。由于这些限制,Windows 8和Windows 8.1中的绝大多数64位EXE和DLL都基于4 GB以上,以确保它们从最大程度的熵中受益。默认情况下,Visual C ++工具链生成的64位图像还基于4 GB以上的图像。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.