如何在 Windows 7 x64 上禁用 ASLR(地址空间布局随机化)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9560993/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do you disable ASLR (address space layout randomization) on Windows 7 x64?
提问by user541686
How do you disable ASLR on Windows 7 x64 so that my program will always load the shared CRT at the same address?
如何在 Windows 7 x64 上禁用 ASLR,以便我的程序始终在同一地址加载共享 CRT?
采纳答案by Aditya Vaidyam
A registry setting is available to forcibly enable or disable ASLR for all executables and libraries and is found at HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages
.
注册表设置可用于强制启用或禁用所有可执行文件和库的 ASLR,可在HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\MoveImages
.
回答by Mr. S
Previously you had to opt in to allowing the linker to use ASLR. Now, you have to opt out:
以前,您必须选择允许链接器使用 ASLR。现在,您必须选择退出:
/DYNAMICBASE[:NO]
(Visual Studio 2012: Configuration Properties -> Linker -> Advanced -> "Randomized Base Address")
(Visual Studio 2012:配置属性 -> 链接器 -> 高级 -> “随机基址”)
You can also do it programmatically.
您也可以以编程方式进行。
回答by josh
The Enhanced Mitigation Experience Toolkit (EMET), downloadable from Microsoft, allows to enable/disable ASLR it on a system or process basis.
可从 Microsoft 下载的增强型缓解体验工具包 (EMET)允许在系统或进程的基础上启用/禁用 ASLR。