Hi guys,
I would like to share two tools which will help you to extract shellcode.
1. nasmc - A simple NASM compilation helper
`nasmc` is a simple NASM compilation helper. The steps to install `nasmc` in your computer is,
1. Execute command,
$ sudo nano /usr/bin/nasmc
2 Copy the code bellow and paste it in `nano` editor
3. Save file by press Ctrl + O
4. Exit `nano` editor by press Ctrl + X
5. Finish. Now you can compile NASM based assembly code by command,
$ nasmc myasmcode.asm
#!/bin/bash echo "NASM Tool" echo "Coded By AJITH KP (ajithkp560)" if [ "$#" -ne 1 ]; then echo "Enter assembly file name. Eg. $0 filename" else nasm -f elf $1 file=${1%%.*} filex="$file.o" ld -s -o $file $filex echo "'$1' is compiled. You can execute the file '$file'." fi
2. dumper - A simple dumper for binary files
`dumper` is a simple dumper application which will dump the shellcode of binary file. The steps to install `dumper` in your computer is,
1. Execute command,
$ sudo nano /usr/bin/dumper
2 Copy the code bellow and paste it in `nano` editor
3. Save file by press Ctrl + O
4. Exit `nano` editor by press Ctrl + X
5. Finish. Now you can compile NASM based assembly code by command,
$ dumper mybinfile
#!/bin/bash echo "Dumper Tool" echo "Coded By AJITH KP (ajithkp560)" echo if [ "$#" -ne 1 ]; then echo "Enter binary file name. Eg. $0 filename" else objdump -d $1|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' fi