Well, I decided to respond to part 1 of this series with a little shell script which automatically grabs a suite of ethical (and not-so-ethical) hacking and programming tools freely available on Ubuntu’s software repository listings. This should work fine under Debian or other similar distributions as it uses simple apt-get commands, but I cannot promise anything. I will revise this series of posts periodically to improve the listings and fix scripting bugs as time progresses.

 #!/bin/bash
#####################################################################################
## Title: Hacking Toolbox Installer v1.2                                           ##
## File:  HackToolInstaller.sh                                                     ##
##                                                                                 ##
## Copyright (C) 2011-2013 Eyal Kalderon                                           ##
##                                                                                 ##
## This program is free software; you can redistribute it and/or                   ##
## modify it under the terms of the GNU General Public License                     ##
## as published by the Free Software Foundation; either version 2                  ##
## of the License, or (at your option) any later version.                          ##
##                                                                                 ##
## This program is distributed in the hope that it will be useful,                 ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of                  ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                   ##
## GNU General Public License for more details.                                    ##
##                                                                                 ##
## You should have received a copy of the GNU General Public License               ##
## along with this program; if not, write to the Free Software                     ##
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. ##
##                                                                                 ##
## Created on: Apr 07 2011                                                         ##
## Updated on: May 26 2013                                                         ##
#####################################################################################

##########################################
## Make some functions...               ##
##########################################
# Create the install function.
function installPack {
    echo [*] Installing core items...
    sudo apt-get install bum firestarter ipcalc p7zip-full startupmanager tofrodos unp unrar unzip sharutils xclip xinetd
    echo

    echo [*] Installing libraries...
    sudo apt-get install build-essential dpkg-dev fakeroot g++ gcc libpcap libssl0.9.8 libregistry0 openssh-blacklist openssh-blacklist-extra patch
    echo

    echo [*] Installing hacking basics...
    sudo apt-get install apf-client iptables openssh-client putty putty-tools telnet-ssl traceroute vinagre vpnc
    echo

    echo [*] Installing tunneling tools...
    sudo apt-get install corkscrew cryptcat netcat-openbsd netrw socat stunnel4 udptunnel
    echo

    echo [*] Installing scanning tools...
    sudo apt-get install hping3 nmap tcptraceroute sslscan xprobe zenmap
    echo

    echo [*] Installing stealthy scanning tools...
    sudo apt-get install p0f pads
    echo

    echo [*] Installing sniffers...
    sudo apt-get install dsniff ettercap ettercap-gtk flowscan fprobe ngrep ssldump tcpdump tcpreplay tcpslice tcptrace
    echo

    echo [*] Installing network monitoring utilities...
    sudo apt-get install darkstat ntop tcpflow tcpspy tshark wireshark
    echo

    echo [*] Installing password crackers...
    sudo apt-get install aircrack-ng john medusa
    echo

    echo [*] Installing penetration testing tools...
    echo [!] Note: Installing latest GIT checkout of Metasploit! Installing GIT client first...
    sudo apt-get install git
    echo
    printf "[?] In what folder and where will you save Metasploit? (please type carefully)\nhti> "
    read inputVarTmp03
    echo [*] OK, checking out Metasploit from trunk. This may take a while...
    echo
    git clone git://github.com/rapid7/metasploit-framework.git $inputVarTmp03
    echo
    echo [*] OK, done! Metasploit has been saved in '$inputVarTmp03'.
    echo

    echo [*] Installing personal protection tools...
    sudo apt-get install bleachbit snort
    echo

    echo [*] Installing MS Windows manipulation tools...
    sudo apt-get install chntpw registry-tools reglookup
    echo

    echo [*] Installing archive extraction/cracking libraries...
    sudo apt-get install cabextract fcrackzip orange
    echo

    echo [*] Installing web/p2p snarfing utilities...
    sudo apt-get install apt-p2p nikto curl snarf wget wput
    echo

    echo [*] ------ Installation complete! ------
    printf "    If you ever want to remove these packages, then run this script again and\n"
    printf "    type 2 at the prompt.\n\n"
    printf "[*] NOTES:\n"
    printf "    -> Your GIT copy of Metasploit is saved at '$inputVarTmp03'\n"
    printf "    -> To re-read the list of tools that this script has installed, go to\n"
    printf "       https://nullpwd.wordpress.com and look for the article 'A list of ethical\n"
    printf "       hacking tools: part 1'.\n"
    printf "    -> Any errors can be reported to me at <xplinux557[at]gmail[dot]com>.\n"
    printf "    -> Hope you enjoy these new programs!\n"
}

# Create the uninstall function.
function removePack {
    echo [*] Removing core items...
    sudo apt-get remove bum firestarter ipcalc p7zip-full startupmanager tofrodos unp unrar unzip sharutils xclip xinetd
    echo

    echo [*] Removing libraries...
    sudo apt-get remove build-essential dpkg-dev fakeroot g++ gcc libpcap libssl0.9.8 libregistry0 openssh-blacklist openssh-blacklist-extra patch
    echo

    echo [*] Removing hacking basics...
    sudo apt-get remove apf-client iptables openssh-client putty putty-tools telnet-ssl traceroute vinagre vpnc
    echo

    echo [*] Removing tunneling tools...
    sudo apt-get remove corkscrew cryptcat netcat-openbsd netrw socat stunnel4 udptunnel
    echo

    echo [*] Removing scanning tools...
    sudo apt-get remove hping3 nmap tcptraceroute sslscan xprobe zenmap
    echo

    echo [*] Removing stealthy scanning tools...
    sudo apt-get remove p0f pads
    echo

    echo [*] Removing sniffers...
    sudo apt-get remove dsniff ettercap ettercap-gtk flowscan fprobe ngrep ssldump tcpdump tcpreplay tcpslice tcptrace
    echo

    echo [*] Removing network monitoring utilities...
    sudo apt-get remove darkstat ntop tcpflow tcpspy tshark wireshark
    echo

    echo [*] Removing password crackers...
    sudo apt-get remove aircrack-ng john medusa
    echo

    echo [*] Removing penetration testing tools...
    echo [!] Note: Removing GIT client first...
    sudo apt-get remove git
    echo
    printf "[?] What is Metasploit's full folderpath? (please type carefully)\nhti> "
    read inputVarTmp03
    echo [*] OK, removing Metasploit. This may take a while...
    echo
    sudo rm -r $inputVarTmp03
    echo
    echo [*] OK, done! Metasploit has been removed!
    echo

    echo [*] Removing personal protection tools...
    sudo apt-get remove bleachbit snort
    echo

    echo [*] Removing MS Windows manipulation tools...
    sudo apt-get remove chntpw registry-tools reglookup
    echo

    echo [*] Removing archive extraction/cracking libraries...
    sudo apt-get remove cabextract fcrackzip orange
    echo

    echo [*] Removing web/p2p snarfing utilities...
    sudo apt-get remove apt-p2p nikto curl snarf wget wput
    echo

    echo [*] ------ Removal complete! ------
    printf "    Any feedback/bug reports on this script are welcome!\n"
    printf "    You can contact me at: <xplinux557[at]gmail[dot]com>."
}

# Create the credits output function.
function showCredits {
    echo Hacking Toolbox Installer v1.2
    printf "Copyright (C) 2011-2013 Eyal Kalderon\n"
    echo Written from May 7-12, 2011. This program is subject to the terms
    echo of the GNU General Public License v2. Please feel free to improve.
    echo See 'https://nullpwd.wordpress.com/legal' for licensing details.
    echo
    printf "Bugs can be reported to me at <xplinux557[at]gmail[dot]com>.\n"
}

##########################################
## Begin the program here!              ##
##########################################
echo Welcome to the Hacking Toolbox Installer v1.2!
printf "Copyright (C) 2011-2013 Eyal Kalderon\n"
echo -----------------------------------------------------------------------
echo INFO:
printf "  The tools installed here can be listed in full in the 4/7/2011\n"
printf "  article 'A list of ethical hacking tools: Part 1' at my blog site,\n"
printf "  nullpwd. PLEASE BE SURE YOU WANT TO INSTALL THESE TO YOUR COMPUTER.\n"
printf "  Check the article if you wish to verify.\n"
echo
echo NOTE:
printf " This program currently ONLY WORKS ON UBUNTU AND ITS DERIVATIVE DISTROS.\n"
printf " You may attempt to use this on pure Debian or pure Debian-based distros,\n"
printf " but some programs may not install as they might not be in the repos.\n"
echo
echo USAGE:
printf " 1 - Install the hacking tools pack.\n"
printf " 2 - Uninstall the hacking tools pack.\n"
printf " 3 - Credits\n"
echo

# Read the input...
printf "hti> "
read inputVar

if [ $inputVar == "1" ] then
    # Confirm action.
    echo NOTE: You may need to have 'restricted', 'universe', and 'multiverse' repos enabled
    echo to install these tools!
    echo
    printf "[?] Are you sure you want to install the toolbox? (y/n)\n"

    # Read the input...
    printf "hti> "
    read inputVarTmp01

    # Act accordingly.
    if [ $inputVarTmp01 == "y" ] then
        installPack
    elif [ $inputVarTmp01 == "n" ] then
        printf "[*] Quitting...\n"
    else
        printf "[-] Don't know what that is...\n"
        printf "[*] Quitting...\n"
    fi
elif [ $inputVar == "2" ] then
    # Confirm action.
    printf "[?] Are you sure you want to remove the toolbox? (y/n)\n"

    # Read the input...
    printf "hti> "
    read inputVarTmp02

    # Act accordingly.
    if [ $inputVarTmp02 == "" ] then
        removePack
    elif [ $inputVarTmp02 == "" ]; then
        printf "[*] Quitting...\n"
    else
        printf "[-] Don't know what that is...\n"
        printf "[*] Quitting...\n"
    fi
elif [ $inputVar == &quot;3&quot; ] then
    showCredits
else
    printf "[-] Don't know what that is...\n"
    printf "[*] Quitting...\n"
fi

##########################################
## Quit the program.                    ##
##########################################
exit 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s