Does Linux (kernel and applications) support the NX-bit on ARM processors? If so, how can I check if an ARM-binary is compiled with this protection enabled?
Asked
Active
Viewed 2,237 times
1 Answers
5
The NX-bit implementation its supported since ARMv6, and yes, linux also has support for it. (NX implementations needs both OS support and CPU support)
Now if you want to check the nx bit, you can do it like with any other platform, there's a good old script called checksec.sh from the trapkit team, here you can see the implementation:
# check for NX support
if readelf -W -l $1 2>/dev/null | grep 'GNU_STACK' | grep -q 'RWE'; then
echo -n -e '\033[31mNX disabled\033[m '
else
echo -n -e '\033[32mNX enabled \033[m '
fi
Full script: http://www.trapkit.de/tools/checksec.html
If you want to see a implementation in python, Peda (Python Exploit Development Assistance for GDB) also has one (they ported the trapkit script)
jmingov
- 844
- 5
- 11