Sunday, July 14, 2013

My Bash Script to Convert Binary to Shell code

Posted by John ( Admin ) on 10:12 PM
I took the shortcut command from commandlinefu to create a bash script which will convert Binary to shellcode using objdump


echo   "########################################"
echo -e"###### Convert binary to shell code ####"
echo   "########################################"

printf "Enter the name of the program......> "



read name

echo "[+]Converting Binary into shellcode.. "

echo -e "[+]Done!\n[+]Now You can use the output in your shellcode... \n"

objdump -d ./$name|grep '[0-9a-f]:'|grep -v 'file'|cut -f2 -d:|cut -f1-6 -d' '|tr -s ' '|tr '\t' ' '|sed 's/ $//g'|sed 's/ /\\x/g'|paste -d '' -s |sed 's/^/"/'|sed 's/$/"/g'
 

Kindly Bookmark and Share it:

0 comments:

Post a Comment