Fix stackoverflow link about address space randomization
This commit is contained in:
@@ -34,7 +34,7 @@ One issue with mem.c is that address space randomization is usually on by
|
|||||||
default. To turn it off:
|
default. To turn it off:
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
From [stackoverflow](stackoverflow.com/questions/23897963/documented-way-to-disable-aslr-on-os-x)
|
From [stackoverflow](http://stackoverflow.com/questions/23897963/documented-way-to-disable-aslr-on-os-x)
|
||||||
|
|
||||||
Just compile/link as follows:
|
Just compile/link as follows:
|
||||||
gcc -o mem mem.c -Wall -Wl,-no_pie
|
gcc -o mem mem.c -Wall -Wl,-no_pie
|
||||||
@@ -43,9 +43,9 @@ Just compile/link as follows:
|
|||||||
|
|
||||||
From Giovanni Lagorio:
|
From Giovanni Lagorio:
|
||||||
|
|
||||||
Under Linux you can disable ASLR, without using a debugger, in (at least) two ways:
|
Under Linux you can disable ASLR, without using a debugger, in (at least) two ways:
|
||||||
* Use the command setarch to run a process with ASLR disabled; I typically run
|
* Use the command setarch to run a process with ASLR disabled; I typically run
|
||||||
bash, with which I can execute examples, like this:
|
bash, with which I can execute examples, like this:
|
||||||
`setarch $(uname --machine) --addr-no-randomize /bin/bash`
|
`setarch $(uname --machine) --addr-no-randomize /bin/bash`
|
||||||
* Writing 0 into `/proc/sys/kernel/randomize_va_space`; you need to be
|
* Writing 0 into `/proc/sys/kernel/randomize_va_space`; you need to be
|
||||||
root to do this and this change has (a non-permament) effect on the
|
root to do this and this change has (a non-permament) effect on the
|
||||||
|
|||||||
Reference in New Issue
Block a user