Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ASLR and DEP on snappyjava.dll #288

Open
djelinski opened this issue Aug 30, 2021 · 2 comments
Open

Enable ASLR and DEP on snappyjava.dll #288

djelinski opened this issue Aug 30, 2021 · 2 comments

Comments

@djelinski
Copy link

ASLR is a technique designed to make various types of buffer overruns more difficult to exploit, by moving segments around a bit. The stack could be shifted a few bytes (or pages), the sections of your program (and even the libraries your code uses) can be loaded at different addresses, etc.

Data Execution Prevention (DEP) is a security feature that can help prevent damage to your computer from viruses and other security threats. DEP can help protect your computer by monitoring your programs to make sure that they use system memory safely.

ASLR and DEP are not enabled on snappyjava.dll files contained in jar downloaded from mavencentral:

PS D:\test> Import-Module .\Get-PESecurity.psm1
PS D:\test> get-pesecurity -file .\snappyjava.dll


FileName         : D:\test\snappyjava.dll
ARCH             : AMD64
DotNET           : False
ASLR             : False
DEP              : False
Authenticode     : False
StrongNaming     : N/A
SafeSEH          : N/A
ControlFlowGuard : False
HighentropyVA    : False
@xerial
Copy link
Owner

xerial commented Oct 1, 2023

Do you mean adding -Wl,dynamicbase, -Wl,nxcompat compiler flags?

@djelinski
Copy link
Author

I think so; these two, and also -Wl,--high-entropy-va.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants