Skip to content

Commit

Permalink
uploaded gadgetOrganizer
Browse files Browse the repository at this point in the history
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.
24 changes: 24 additions & 0 deletions gadgetOrganizer.sh
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

0 comments on commit 382b6a7

Please sign in to comment.