Created
January 29, 2019 08:25
-
-
Save safebuffer/8d4d46ae2678a704776d1a10f6d5239e to your computer and use it in GitHub Desktop.
get libc address to check ASLR stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Filee=$1 | |
getaddr(){ | |
addr=`ldd $Filee | cut -d " " -f2 | head -n 1|tr -d "(|)" ` | |
echo $addr | |
} | |
for i in {1..5}; do | |
if [ "$( getaddr )" == "$( getaddr )" ]; then | |
echo "[+] $( getaddr ) == $( getaddr ) " | |
echo "[+] ASLR disabled ! " | |
exit 1 | |
fi | |
echo "[+] Address " $( getaddr ) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment