-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chasing rop gadgets
- Loading branch information
rex_a
committed
Jan 10, 2020
1 parent
482230f
commit 382b6a7
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# | ||
# gadgetOrganizer.sh | ||
# leveraging ROPgadget, sort gadgets | ||
# by address; mindful of the stack | ||
# | ||
# REQUIREMENTS: | ||
# -capstone | ||
# sudo pip install capstone | ||
# http://www.capstone-engine.org/ | ||
# -ropgadget | ||
# sudo pip install ropgadget | ||
# https://github.com/JonathanSalwan/ROPgadget | ||
# | ||
# ************** | ||
# * escollapse * | ||
# * CISSP, PT+ * | ||
# * 20200109 * | ||
# ************** | ||
if [[ $1 ]]; then | ||
ROPgadget --binary $1 | tail -$(expr $(ROPgadget --binary $1 | wc -l) - 2) | head -n -2 | sort | grep -v leave | grep -v 'pop ebp' | ||
else | ||
echo "Usage: $0 </path/to/binary>" | ||
fi |