Created
September 30, 2018 11:48
-
-
Save yarjor/82bfe100322d67b8ce605f2154c1cc1d to your computer and use it in GitHub Desktop.
[Get IP control offset] works for simple bof binaries. #eip #overflow #memorycorrupt #binary #radare2 #r2 #systemd #coredump #ragg2 #crash #debruijn
This file contains hidden or 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
get_eip_control() { | |
(ragg2 -P 1024 -r | $*) && echo "No eip control found" && return 1 | |
(coredumpctl dump > eip_control.core) 2>/dev/null | |
local eip=$(r2 -qc "dr eip" eip_control.core | tail -n 1) | |
echo "Offset to control EIP: $(r2 -qc "wopO $eip" --)" | |
rm eip_control.core | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment