Created
November 28, 2012 08:07
-
-
Save gcmurphy/4159781 to your computer and use it in GitHub Desktop.
Usage of checksec
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
# Check a file: | |
checksec a.out | |
# Check an entire directory: | |
checksec dir/* | |
# Check a running process: | |
checksec /proc/$(pgrep firefox)/exe | |
#Check all running processes : | |
for pid in `ps -e -o pid |grep -E "[0-9]+"`; do | |
echo "$(ps -o cmd $pid | grep -v CMD | sed 's/ *$//g'),"\ | |
"$(checksec /proc/$pid/exe)" | |
done | |
# Check a binary within an RPM file: | |
rpm2cpio sudo-1.8.3p1-6.fc17.x86_64.rpm \ | |
| cpio --to-stdout -iv ./usr/bin/sudoedit 2>/dev/null\ | |
| checksec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment