Disabling ASLR in Mac OS X Snow Leopard
Asked Answered
L

2

3

Essentially I want to disable ASLR in Mac OS X Snow Leopard and use gcc todo some buffer overflowing and stack overflows. Anyone know how to disable ASLR?

Leyes answered 12/6, 2011 at 23:57 Comment(2)
I was going to say google it, but google just turns up your question. :(Illuse
The aslr is kernel technology which needs only PIE code generation from gcc. Buffer overflow and stack overflow protection is wider than just ASLR.Edythedythe
E
3

Asan authors listed several ways to disable ASLR in MacOS: https://code.google.com/p/address-sanitizer/issues/detail?id=29

For 10.6

export DYLD_NO_PIE=1 

For 10.7 and newer:

And there is also hard method used by gdb: http://reverse.put.as/2011/08/11/how-gdb-disables-aslr-in-mac-os-x-lion/

Edythedythe answered 24/2, 2014 at 23:54 Comment(0)
R
1

You can set the environment variable "DYLD_NO_PIE". See "man dyld". This works on OS X 10.6 but not on 10.5.

Rubrician answered 21/7, 2011 at 15:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.