DEP和ASLR又如何使用呢?

发布于 2024-09-12 10:36:22 字数 602 浏览 2 评论 0原文

ASLRDEP 是两种用于保护应用程序免受黑客攻击的技术。随着许多现代应用程序的安全意识越来越强,这些技术变得越来越重要。目前,我只关注 Windows 7 和这些技术。我想知道何时以及如何才能最好地使用这些技术,尤其是在使用 .NET 编译器以外的开发人员工具开发桌面应用程序时。 (对于 .NET 安全性,这个问题 将提供答案。)我对 Delphi 和 C++Builder 等编译器以及其他 WIN32 编译器特别感兴趣。 基本上,如何让这些应用程序同时支持 DEP 和 ASLR?有什么方法可以从我自己的(WIN32)代码中控制这些选项吗?

ASLR and DEP are two techniques that are used to protect applications from hackers. With many modern applications becoming more security-aware, these techniques are becoming more important. For now, I just focus on Windows 7 and these techniques. I wonder when and how I can best use these techniques, especially when developing desktop applications by using developer tools other than .NET compilers. (For .NET security, this question will provide an answer.) I'm especially interested in compilers like Delphi and C++Builder but also other WIN32 compilers.
Basically, how do I get those applications to support both DEP and ASLR? And is there some way that I can control these options from within my own (WIN32) code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

时光磨忆 2024-09-19 10:36:22

这只是使用正确的链接器选项的问题,因此它会在可执行头文件中翻转一点。 Microsoft 链接器选项为 /NXCOMPAT (DEP) 和 /DYNAMICBASE (ASLR)。我不太了解您的工具,不知道它们是否有类似的选项。 Editbin.exe 也支持这些选项,您始终可以在构建后事件中运行它。

This is simply a matter of using the right linker option so it flips a bit in the executable header. The Microsoft linker options are /NXCOMPAT (DEP) and /DYNAMICBASE (ASLR). I don't know your tools well enough to know if they have similar options. Editbin.exe supports these options too, you can always run it in a post-build event.

方圜几里 2024-09-19 10:36:22
{$SetPEOptFlags $100}//to set the ASLR flag

{$SetPEOptFlags $40}//to set the DEP flag
{$SetPEOptFlags $100}//to set the ASLR flag

{$SetPEOptFlags $40}//to set the DEP flag
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文