├── README.md ├── apps.conf ├── core ├── f_dependencies.sh ├── f_install_RFID.sh ├── f_install_database.sh ├── f_install_exploits.sh ├── f_install_forensic.sh ├── f_install_mobile.sh ├── f_install_network.sh ├── f_install_pwcracking.sh ├── f_install_recon.sh ├── f_install_reverse.sh ├── f_install_thickClients.sh ├── f_install_web.sh ├── f_install_windows.sh ├── f_install_wordlist.sh ├── f_wrapup.sh └── functions.sh ├── install.sh └── todo /README.md: -------------------------------------------------------------------------------- 1 | # Pentest-Tools 2 | 3 | A quick script to install "all required" tools (Kali-like) for penetration tests, as I grew tired of re-installing them manually. 4 | As always, do not install on your own host. 5 | Not recommended to run as root. 6 | 7 | ## Tested 8 | 9 | - Ubuntu (various flavors) 18.10 & 18.04 LTS 10 | 11 | ## How to run 12 | 13 | * Set up and install everything (with your current user): 14 | ``` 15 | $ ./install.sh -i 16 | ``` 17 | 18 | * Download (only) all tools: 19 | ``` 20 | $ ./install.sh 21 | ``` 22 | 23 | * Download and specify a custom directory (default is /home/username/Tools): 24 | ``` 25 | $ ./install.sh -d /opt/Tools 26 | ``` 27 | 28 | * Install and get verbose: 29 | ``` 30 | $ ./install.sh -i -v 31 | ``` 32 | 33 | ## Tools 34 | ### Network 35 | - Wireshark 36 | - TestSSL 37 | - Enum4Linux 38 | - Responder 39 | - Impacket 40 | 41 | ### Wi-Fi 42 | - Aircrack-ng 43 | 44 | ### Web 45 | - Burp (free) 46 | - SQLMap 47 | - WFuzz 48 | - Dirbuster 49 | - ReGeorg 50 | - Tunna 51 | - Loubia 52 | - Spartan 53 | - SoapUI 54 | 55 | ### Windows 56 | - Mimikatz 57 | - CrackMapExec 58 | - Nishang 59 | - PowerSploit 60 | - Empire 61 | - BloodHound 62 | - SysInternals 63 | 64 | ### Password cracking 65 | - John the Ripper 66 | - Hashcat 67 | - CUPP 68 | 69 | ### Forensic 70 | - Volatility 71 | 72 | ### Wordlists 73 | - FuzzDB 74 | - Seclists 75 | - ProbableWordlist 76 | - NaughtyStrings 77 | 78 | ### Exploit 79 | - Metasploit 80 | - Windows Exploit Suggester 81 | - GDB + PEDA 82 | 83 | ### Reverse 84 | - OllyDBG (Windows) 85 | - IDA Pro (free v.7) 86 | - Radare2 87 | - Hopper (free version) 88 | 89 | ### Database 90 | - DbVisualizer 91 | - Odat 92 | - MSdat 93 | 94 | ### Mobile 95 | - JD-GUI 96 | - Dex2Jar 97 | 98 | ### RFID 99 | - Proxmark3 100 | 101 | ### General 102 | - Bless 103 | - Hexedit 104 | - wxhexeditor 105 | -------------------------------------------------------------------------------- /apps.conf: -------------------------------------------------------------------------------- 1 | # All required dependencies 2 | 3 | PKG=( 4 | build-essential make binutils curl p7zip-full git net-tools openjdk-8-jre vim htop # default 5 | python2.7 python-dev python-pip python3 python3-pip # python (and related) 6 | rdesktop vinagre libxfreerdp-client1.1 xtightvncviewer # remote access 7 | aircrack-ng gdb hydra nmap smbclient wireshark cifs-utils socat openvpn samdump2 # Some tools 8 | bless wxhexeditor hexedit # hex editors (pick your favorite) 9 | # dependencies 10 | libssl-dev libffi-dev # CME 11 | yasm libgmp-dev libpcap-dev pkg-config libbz2-dev zlib1g-dev libopenmpi-dev openmpi-bin # JtR 12 | libgconf-2-4 # BloodHound 13 | libreadline5 libreadline-dev libusb-0.1-4 libusb-dev libqt4-dev perl pkg-config wget libncurses5-dev gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib libpcsclite-dev pcscd # Proxmarkv3 14 | libqt5xml5 libncurses5 # Hopper 15 | ) 16 | 17 | PIP_PKG="requests beautifulsoup4" # TheHarvester 18 | 19 | ### Tools 20 | ## Git 21 | # Network 22 | GIT_TESTSSL="https://github.com/drwetter/testssl.sh.git" 23 | GIT_ENUM4LINUX="https://github.com/portcullislabs/enum4linux.git" 24 | GIT_RESPONDER="https://github.com/SpiderLabs/Responder.git" 25 | GIT_IMPACKET="https://github.com/CoreSecurity/impacket.git" 26 | 27 | # Recon 28 | GIT_SUBLIST3R="https://github.com/aboul3la/Sublist3r.git" 29 | GIT_THEHARVESTER="https://github.com/laramies/theHarvester.git" 30 | 31 | # Web 32 | URL_BURP="https://portswigger.net/burp/releases/download?product=community&version=1.7.36&type=jar" 33 | GIT_REGEORG="https://github.com/sensepost/reGeorg.git" 34 | GIT_TUNA="https://github.com/SECFORCE/Tunna.git" 35 | GIT_SQLMAP="https://github.com/sqlmapproject/sqlmap.git" 36 | GIT_WFUZZ="https://github.com/xmendez/wfuzz.git" 37 | GIT_LOUBIA="https://github.com/metalnas/loubia.git" 38 | URL_DIRBUSTER="https://downloads.sourceforge.net/dirbuster/DirBuster-0.12.tar.bz2" 39 | GIT_SPARTAN="https://github.com/sensepost/SPartan.git" 40 | URL_SOAPUI="https://s3.amazonaws.com/downloads.eviware/soapuios/5.4.0/SoapUI-x64-5.4.0.sh" 41 | 42 | # Windows 43 | GIT_CME="https://github.com/byt3bl33d3r/CrackMapExec" 44 | GIT_NISHANG="https://github.com/samratashok/nishang.git" 45 | GIT_POWERSPLOIT="https://github.com/PowerShellMafia/PowerSploit.git" 46 | GIT_EMPIRE="https://github.com/EmpireProject/Empire.git" 47 | GITRELEASE_MIMIKATZ="https://github.com/gentilkiwi/mimikatz/releases/download/2.1.1-20180616/mimikatz_trunk.7z" 48 | GITRELEASE_BLOODHOUND="https://github.com/BloodHoundAD/BloodHound/releases/download/2.0.1/BloodHound-linux-x64.zip" 49 | URL_SYSINTERNALS="https://download.sysinternals.com/files/SysinternalsSuite.zip" 50 | 51 | # Pwcracking 52 | GIT_JTR="https://github.com/magnumripper/JohnTheRipper.git" 53 | URL_HASHCAT="https://hashcat.net/files/hashcat-4.2.1.7z" 54 | GIT_CUPP="https://github.com/Mebus/cupp.git" 55 | 56 | # Forensic 57 | GIT_VOLATILITY="https://github.com/volatilityfoundation/volatility.git" 58 | 59 | # Wordlist 60 | GIT_FUZZDB="https://github.com/fuzzdb-project/fuzzdb.git" 61 | GIT_SECLIST="https://github.com/danielmiessler/SecLists.git" 62 | GIT_PROBABLEWORDLIST="https://github.com/berzerk0/Probable-Wordlists.git" 63 | GIT_NAUGHTYSTRINGS="https://github.com/minimaxir/big-list-of-naughty-strings.git" 64 | 65 | # Database 66 | URL_DBVIS="http://www.dbvis.com/product_download/dbvis-10.0.16/media/dbvis_linux_10_0_16.deb" 67 | GIT_ODAT="https://github.com/quentinhardy/odat.git" 68 | GIT_MSDAT="https://github.com/quentinhardy/msdat.git" 69 | 70 | # Exploits 71 | GIT_WINDOWSEXPLOITSUGGESTER="https://github.com/GDSSecurity/Windows-Exploit-Suggester.git" 72 | GIT_PEDA="https://github.com/longld/peda.git" 73 | URL_METASPLOIT="https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb" 74 | 75 | # Reverse 76 | URL_OLLY="http://www.ollydbg.de/odbg201.zip" 77 | GIT_RADARE2="https://github.com/radare/radare2.git" 78 | URL_IDA="https://out7.hex-rays.com/files/idafree70_linux.run" 79 | URL_HOPPER="https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-v4-4.4.8-Linux.deb" 80 | 81 | # Mobile 82 | GIT_JDGUI="https://github.com/java-decompiler/jd-gui/releases/download/v1.4.0/jd-gui-1.4.0.jar" 83 | URL_DEX2JAR="https://downloads.sourceforge.net/project/dex2jar/dex2jar-2.0.zip" 84 | 85 | # RFID 86 | GIT_PROXMARK="https://github.com/Proxmark/proxmark3.git" 87 | -------------------------------------------------------------------------------- /core/f_dependencies.sh: -------------------------------------------------------------------------------- 1 | 2 | # Install all required dependencies 3 | function f_install_dependencies() { 4 | 5 | if [ "$install" == "true" ]; then 6 | 7 | f_print "\n[*] Doint update/upgrade\n" 8 | f_update_upgrade 9 | 10 | f_print "\n[*] The following dependencies will be installed\n" 11 | 12 | # Display list of dependencies 13 | for i in ${PKG[@]}; do echo $i; done 14 | f_print "" 15 | for i in ${PIP_PKG[@]}; do echo $i; done 16 | f_print "" 17 | 18 | # Ask user for confirmation 19 | while true; do 20 | read -p "Are you sure (y/n)? " -n 1 -r 21 | echo "" 22 | if [[ $REPLY =~ ^[Yy]$ ]]; then 23 | break 24 | elif [[ $REPLY =~ ^[Nn]$ ]]; then 25 | f_print "Exiting..." "error" 26 | exit 1 27 | fi 28 | done 29 | 30 | f_print "\n[*] Installing dependencies\n" 31 | 32 | # Don't ask for user input 33 | $ECHO "wireshark-common wireshark-common/install-setuid boolean true" | $SUDO /usr/bin/debconf-set-selections 34 | 35 | # Install dependencies 36 | $SUDO $APT -qq -y install ${PKG[@]} 37 | $SUDO -H $PIP install $QUIET -U "pipenv" 38 | $PIP install $QUIET --user $PIP_PKG 39 | 40 | f_print "\n[*] Installing dependencies - done" "ok" 41 | else 42 | f_print "\n[*] Skipping dependencies" "ok" 43 | fi 44 | 45 | f_check_installed "pip pipenv python2.7 python3" 46 | } 47 | -------------------------------------------------------------------------------- /core/f_install_RFID.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # RFID 3 | ######################################## 4 | function f_install_tools_RFID() { 5 | prefix="$directory/RFID" 6 | f_print "\n[*] Install RFID tools ($prefix)" 7 | 8 | # Proxmark 9 | f_dl_git "Proxmarkv3" "$GIT_PROXMARK" "$prefix/proxmark3" 10 | 11 | if [ "$install" == "true" ]; then 12 | $CD "$prefix/proxmark3" 13 | # Add UDEV rules 14 | $SUDO $CP -rf "driver/77-mm-usb-device-blacklist.rules" "/etc/udev/rules.d/77-mm-usb-device-blacklist.rules" 15 | $SUDO udevadm control --reload-rules # Reload 16 | $SUDO adduser $username dialout # Add user to group 17 | 18 | # Build 19 | $CD "client" 20 | $MAKE clean > "install.log" && $MAKE all >> "install.log" 21 | $CD "$prefix" 22 | fi 23 | 24 | f_print "\n[*] Install RFID tools - done" "ok" 25 | } 26 | -------------------------------------------------------------------------------- /core/f_install_database.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # DATABASE 3 | ######################################## 4 | function f_install_tools_database() { 5 | prefix="$directory/database" 6 | f_print "\n[*] Install database tools ($prefix)" 7 | 8 | # DbVis 9 | f_dl_wget "DbVis" "$URL_DBVIS" "$prefix/dbvis.deb" 10 | f_install "dpkg" "$prefix/dbvis.deb" 11 | #$RM "/tmp/dbvis.deb" 12 | # Odat 13 | f_dl_git "Odat" "$GIT_ODAT" "$prefix/odat" 14 | # MSdat 15 | f_dl_git "MSdat" "$GIT_MSDAT" "$prefix/msdat" 16 | 17 | f_print "\n[*] Install database tools - done" "ok" 18 | } 19 | -------------------------------------------------------------------------------- /core/f_install_exploits.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # Exploits 3 | ######################################## 4 | function f_install_tools_exploits() { 5 | prefix="$directory/exploits" 6 | f_print "\n[*] Install exploits tools ($prefix)" 7 | 8 | # WindowsExploitSuggester 9 | f_dl_git "WindowsExploitSuggester" "$GIT_WINDOWSEXPLOITSUGGESTER" "$prefix/windows-exploit-suggester" 10 | # metasploit 11 | f_dl_wget "Metasploit" "$URL_METASPLOIT" "/tmp/msfinstall" 12 | if [ "$install" == "true" ]; then 13 | $CHMOD 755 "/tmp/msfinstall" 14 | $SUDO "/tmp/msfinstall" 15 | # Setup database 16 | msfconsole <<< "yes;exit" 2>/dev/null 17 | fi 18 | # Peda 19 | f_dl_git "Peda" "$GIT_PEDA" "$prefix/peda" 20 | $ECHO "source $prefix/peda/peda.py" >> "/home/$username/.gdbinit" 21 | 22 | f_print "\n[*] Install exploits tools - done" "ok" 23 | } 24 | -------------------------------------------------------------------------------- /core/f_install_forensic.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # FORENSIC 3 | ######################################## 4 | function f_install_tools_forensic() { 5 | prefix="$directory/forensic" 6 | f_print "\n[*] Install forensic tools ($prefix)" 7 | 8 | # Volatility 9 | f_dl_git "Volatility" "$GIT_VOLATILITY" "$prefix/Volatility" 10 | f_install_pipenv "$prefix/Volatility" "" "setup.py" 11 | 12 | f_print "\n[*] Install forensic tools - done" "ok" 13 | } 14 | -------------------------------------------------------------------------------- /core/f_install_mobile.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # MOBILE 3 | ######################################## 4 | function f_install_tools_mobile() { 5 | prefix="$directory/mobile" 6 | f_print "\n[*] Install mobile tools ($prefix)" 7 | 8 | # JD-GUI 9 | f_dl_wget "JD-GUI" "$GIT_JDGUI" "$prefix/jd-gui.jar" 10 | 11 | # Dex2Jar 12 | f_dl_wget "DEX2JAR" "$URL_DEX2JAR" "/tmp/dex2jar.zip" 13 | f_quiet_unzip_and_remove "/tmp/dex2jar.zip" "$prefix/dex2jar" 14 | 15 | f_print "\n[*] Install mobile tools - done" "ok" 16 | } 17 | -------------------------------------------------------------------------------- /core/f_install_network.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # NETWORK 3 | ######################################## 4 | function f_install_tools_network() { 5 | prefix="$directory/network" 6 | f_print "\n[*] Install network tools ($prefix)" 7 | 8 | # testSSL 9 | f_dl_git "TestSSL" "$GIT_TESTSSL" "$prefix/testSSL" "--depth 1" 10 | # Enum4Linux 11 | f_dl_git "Enum4Linux" "$GIT_ENUM4LINUX" "$prefix/enum4linux" 12 | # Responder 13 | f_dl_git "Responder" "$GIT_RESPONDER" "$prefix/responder" 14 | # impacket 15 | f_dl_git "Impacket" "$GIT_IMPACKET" "$prefix/impacket" 16 | f_install_pipenv "$prefix/impacket" "requirements.txt" "setup.py" 17 | #f_install "requirements" "$prefix/impacket/requirements.txt" 18 | #f_install "setup" "$prefix/impacket/setup.py" 19 | 20 | f_print "\n[*] Install network tools - done" "ok" 21 | } 22 | -------------------------------------------------------------------------------- /core/f_install_pwcracking.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # PWCRACKING 3 | ######################################## 4 | function f_install_tools_pwcracking() { 5 | prefix="$directory/pwcracking" 6 | f_print "\n[*] Install password cracking tools ($prefix)" 7 | 8 | # JTR 9 | f_dl_git "JohnTheRipper" "$GIT_JTR" "$prefix/johnTheRipper-1.8.0-jumbo" "-b bleeding-jumbo" 10 | if [ "$install" == "true" ]; then 11 | current_dir=$(/bin/pwd) 12 | cd "$prefix/johnTheRipper-1.8.0-jumbo/src/" && ./configure > configure.result && $MAKE -s clean > make.result && $MAKE -sj4 >> make.result 13 | cd "$current_dir" 14 | fi 15 | 16 | # Hashcat 17 | f_dl_wget "Hashcat" "$URL_HASHCAT" "/tmp/hashcat.7z" 18 | $ZZ x "/tmp/hashcat.7z" -o"$prefix/" 19 | $RM "/tmp/hashcat.7z" 20 | 21 | # CUPP 22 | f_dl_git "CUPP" "$GIT_CUPP" "$prefix/cupp" 23 | 24 | f_print "\n[*] Install password cracking tools - done" "ok" 25 | } 26 | -------------------------------------------------------------------------------- /core/f_install_recon.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # RECON 3 | ######################################## 4 | function f_install_tools_recon() { 5 | prefix="$directory/recon" 6 | f_print "\n[*] Install recon tools ($prefix)" 7 | 8 | # Sublist3r 9 | f_dl_git "Sublist3r" "$GIT_SUBLIST3R" "$prefix/sublist3r" 10 | f_install_pipenv "$prefix/sublist3r" "requirements.txt" "setup.py" 11 | 12 | # theHarvester 13 | f_dl_git "TheHarvester" "$GIT_THEHARVESTER" "$prefix/theHarvester" 14 | f_install_pipenv "$prefix/theHarvester" "requirements.txt" 15 | 16 | f_print "\n[*] Install reco tools - done" "ok" 17 | } 18 | -------------------------------------------------------------------------------- /core/f_install_reverse.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # REVERSE 3 | ######################################## 4 | function f_install_tools_reverse() { 5 | prefix="$directory/reverse" 6 | f_print "\n[*] Install reverse tools ($prefix)" 7 | 8 | # OllyDBG 9 | f_dl_wget "OllyDBG" "$URL_OLLY" "/tmp/olly.zip" 10 | f_quiet_unzip_and_remove "/tmp/olly.zip" "$prefix/ollyDBG2" 11 | # Immunity 12 | token="$($CURL -s "https://debugger.immunityinc.com/ID_register.py" | $GREP -i csrfmiddlewaretoken | $SED "s/.*value='\([^ ]*\)'.*/\1/")" 13 | hash="$($CURL -s -d "address=a&company=a&csrfmiddlewaretoken=$token&email=a@a.com&fullname=a" -H "Referer: https://debugger.immunityinc.com/ID_register.py" -b "csrftoken=$token" "https://debugger.immunityinc.com/ID_register.py" | $GREP ID | $SED "s/.*hash=\([^ ]*\)><.*/\1/")" 14 | f_dl_wget "ImmunityDebugger" "https://debugger.immunityinc.com/getID.py?hash=$hash" "$prefix/immunityDebugger.exe" 15 | 16 | # IDA Pro 17 | f_dl_wget "IDAPro" "$URL_IDA" "$prefix/ida_free.run" 18 | # Radare2 19 | f_dl_git "Radare2" "$GIT_RADARE2" "$prefix/radare2" 20 | $prefix/radare2/sys/user.sh &>>"$prefix/radare2/install.log" 21 | 22 | # Hopper - Free 23 | f_dl_wget "Hopper" "$URL_HOPPER" "$prefix/hopper.deb" 24 | f_install "dpkg" "$prefix/hopper.deb" 25 | 26 | f_print "\n[*] Install reverse tools - done" "ok" 27 | } 28 | -------------------------------------------------------------------------------- /core/f_install_thickClients.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # thickClients 3 | ######################################## 4 | function f_install_tools_thickClients() { 5 | prefix="$directory/thickClients" 6 | f_print "\n[*] Install thickClients tools ($prefix)" 7 | 8 | # ProcessHacker 9 | f_dl_wget "ProcessHacker" "https://wj32.org/processhacker/rel/processhacker-2.39-bin.zip" "/tmp/processhacker.zip" 10 | f_quiet_unzip_and_remove "/tmp/processhacker.zip" "$prefix/processHacker" 11 | # EchoMirage 12 | f_dl_wget "EchoMirage" "https://kent.dl.sourceforge.net/project/echomirage.oldbutgold.p/Echo Mirage.zip" "/tmp/echomirage.zip" 13 | f_quiet_unzip_and_remove "/tmp/echomirage.zip" "$prefix/echoMirage" 14 | # Sysinternals 15 | $LN -s "$directory/Tools/windows/sysinternals" "$prefix/sysinternals" 16 | 17 | f_print "\n[*] Install thickClients tools - done" "ok" 18 | } 19 | -------------------------------------------------------------------------------- /core/f_install_web.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # WEB 3 | ######################################## 4 | function f_install_tools_web() { 5 | prefix="$directory/web" 6 | f_print "\n[*] Install web tools ($prefix)" 7 | 8 | # Burp 9 | f_dl_wget "Burp (free)" "$URL_BURP" "$prefix/burp.jar" 10 | 11 | # reGeorg 12 | f_dl_git "reGeorg" "$GIT_REGEORG" "$prefix/reGeorg" 13 | 14 | # Tunna 15 | f_dl_git "Tunna" "$GIT_TUNA" "$prefix/tunna" 16 | 17 | # SQLMap 18 | f_dl_git "SQLMap" "$GIT_SQLMAP" "$prefix/sqlmap" 19 | 20 | # WFuzz 21 | f_dl_git "WFuzz" "$GIT_WFUZZ" "$prefix/wfuzz" 22 | 23 | # Loubia 24 | f_dl_git "Loubia" "$GIT_LOUBIA" "$prefix/loubia" 25 | 26 | # Dirbuster 27 | f_dl_wget "Dirbuster" "$URL_DIRBUSTER" "$prefix/dirbuster-0.12.tar.bz2" 28 | $TAR -xf "$prefix/dirbuster-0.12.tar.bz2" -C "$prefix" 29 | $RM "$prefix/dirbuster-0.12.tar.bz2" 30 | 31 | # Spartan 32 | f_dl_git "Spartan" "$GIT_SPARTAN" "$prefix/spartan" 33 | f_install_pipenv "$prefix/spartan" "requirements.txt" 34 | #f_install "requirements" "$prefix/spartan/requirements.txt" 35 | 36 | # SoapUI 37 | f_dl_wget "SoapUI" "$URL_SOAPUI" "$prefix/soapUI.sh" 38 | 39 | f_print "\n[*] Install web tools - done" "ok" 40 | } 41 | -------------------------------------------------------------------------------- /core/f_install_windows.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # WINDOWS 3 | ######################################## 4 | function f_install_tools_windows() { 5 | prefix="$directory/windows" 6 | f_print "\n[*] Install Windows-related tools ($prefix)" 7 | 8 | # Mimikatz 9 | f_dl_wget "Mimikatz" "$GITRELEASE_MIMIKATZ" "/tmp/mimikatz_trunk.7z" 10 | $ZZ x "/tmp/mimikatz_trunk.7z" -o"$prefix/mimikatz" 11 | $RM "/tmp/mimikatz_trunk.7z" 12 | # CME 13 | #$PIP install --user pipenv 14 | f_dl_git "CrackMapExec" "$GIT_CME" "$prefix/CrackMapExec" "--recursive" 15 | if [ "$install" == "true" ]; then 16 | #f_install "pip" "crackmapexec" 17 | # Do we need bleeding-edge? Yes! 18 | f_install_pipenv "$prefix/CrackMapExec" "requirements.txt" "setup.py" 19 | #cd "$prefix/CrackMapExec" && pipenv install -e . 20 | #cd "$directory/windows" # Get back 21 | fi 22 | 23 | 24 | # Nishang 25 | f_dl_git "Nishang" "$GIT_NISHANG" "$prefix/Nishang" 26 | # PowerSploit 27 | f_dl_git "PowerSploit" "$GIT_POWERSPLOIT" "$prefix/PowerSploit" 28 | # Empire 29 | f_dl_git "Empire" "$GIT_EMPIRE" "$prefix/Empire" 30 | 31 | # BloodHound 32 | # BloodHound - neo4j 33 | $WGET --quiet -O - "https://debian.neo4j.org/neotechnology.gpg.key" | $SUDO $APTKEY add - 34 | $ECHO "deb https://debian.neo4j.org/repo stable/" | $SUDO $TEE "/etc/apt/sources.list.d/neo4j.list" 35 | $SUDO $APT -qq update 36 | f_install "apt" "neo4j" 37 | 38 | # BloodHound - release binaries 39 | f_dl_wget "BloodHound" "$GITRELEASE_BLOODHOUND" "/tmp/BloodHound.zip" 40 | f_quiet_unzip_and_remove "/tmp/BloodHound.zip" "$prefix/" 41 | 42 | # Sysinternals 43 | f_dl_wget "Sysinternals" "$URL_SYSINTERNALS" "/tmp/sysinternals.zip" 44 | f_quiet_unzip_and_remove "/tmp/sysinternals.zip" "$prefix/sysinternals" 45 | 46 | f_print "\n[*] Install Windows-related tools - done" "ok" 47 | } 48 | -------------------------------------------------------------------------------- /core/f_install_wordlist.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # WORDLIST 3 | ######################################## 4 | function f_install_tools_wordlists() { 5 | prefix="$directory/wordlists" 6 | f_print "\n[*] Install wordlists ($prefix)" 7 | 8 | # FuzzDB 9 | f_dl_git "FuzzDB" "$GIT_FUZZDB" "$prefix/FuzzDB" 10 | # wfuzz 11 | $LN -s "$directory/web/wfuzz/wordlists" "$prefix/wfuzz" 12 | # SecLists 13 | f_dl_git "SecLists" "$GIT_SECLIST" "$prefix/SecLists" 14 | # ProbableWordlists 15 | f_dl_git "ProbableWordlists" "$GIT_PROBABLEWORDLIST" "$prefix/ProbableWordlists" 16 | # NaugthyStrings 17 | f_dl_git "NaugthyStrings" "$GIT_NAUGHTYSTRINGS" "$prefix/NaugthyStrings" 18 | 19 | f_print "\n[*] Install wordlists - done" "ok" 20 | } 21 | -------------------------------------------------------------------------------- /core/f_wrapup.sh: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # WRAP-UP 3 | ######################################## 4 | 5 | BASHRC="/home/$username/.bashrc" 6 | 7 | function f_wrapup() { 8 | # Log 9 | f_script 10 | 11 | f_print "[*] Adding variables/functions to .bashrc ($BASHRC)" 12 | $ECHO "export PATH=\"/home/$username/bin\":$PATH" >> "$BASHRC" # Radare2 13 | $ECHO "alias tools=\"cd $directory\"" >> "$BASHRC" # Alias 14 | } 15 | 16 | 17 | 18 | function f_script() { 19 | f_print "[*] Adding function to log (through typecript)" 20 | $CAT << EOL >> $BASHRC 21 | function log_typescript() { 22 | if [ -z "$LOG_SCRIPT" ]; then 23 | # fetch date 24 | date_ymd=\$($DATE "+%Y-%m-%d") 25 | date_hm=\$($DATE "+%H:%M") 26 | log_dir_name="/home/$username/.logs/audit/\$date_ymd" 27 | log_dir_file="\$log_dir_name/\$date_hm.log" 28 | 29 | # Create dir 30 | $MKDIR -p "\$log_dir_name" 31 | export LOG_SCRIPT="\$log_dir_file" 32 | # script -a: append, 33 | $SCRIPT -q -a "\$log_dir_file" 34 | unset LOG_SCRIPT 35 | 36 | $ECHO "[!] Input/Output are logged at \$log_dir_file" 37 | fi 38 | 39 | if [ ! -z "\$LOG_SCRIPT" ]; then 40 | PS1="\e[0;31m[script: on]\e[m $PS1" 41 | $ECHO "[!] Input/Output are logged at \$LOG_SCRIPT" 42 | fi 43 | } 44 | 45 | #log_typescript 46 | EOL 47 | } 48 | -------------------------------------------------------------------------------- /core/functions.sh: -------------------------------------------------------------------------------- 1 | ################## 2 | ###### Variables 3 | ################## 4 | GREEN="\033[0;32m" 5 | RED="\033[0;31m" 6 | ORANGE="\033[0;33m" 7 | NOCOLOR="\033[0m" 8 | 9 | # Binaries 10 | APT="/usr/bin/apt" 11 | APTKEY="/usr/bin/apt-key" 12 | CAT="/bin/cat" 13 | CHMOD="/bin/chmod" 14 | CP="/bin/cp" 15 | CUT="/usr/bin/cut" 16 | CURL="/usr/bin/curl" 17 | DATE="/bin/date" 18 | DPKG="/usr/bin/dpkg" 19 | ECHO="/bin/echo" 20 | GIT="/usr/bin/git" 21 | GREP="/bin/grep" 22 | LN="/bin/ln" 23 | MAKE="/usr/bin/make" 24 | MKDIR="/bin/mkdir" 25 | PIP="pip" # as it might change during installation 26 | PYTHON="/usr/bin/python" 27 | PYTHON3="/usr/bin/python3" 28 | RM="/bin/rm" 29 | SCRIPT="/usr/bin/script" 30 | SED="/bin/sed" 31 | SUDO="/usr/bin/sudo" 32 | TAR="/bin/tar" 33 | TEE="/usr/bin/tee" 34 | UNZIP="/usr/bin/unzip" 35 | WGET="/usr/bin/wget" 36 | WHEREIS="/usr/bin/whereis" 37 | ZZ="/usr/bin/7z" 38 | 39 | ################## 40 | ###### Functions 41 | ################## 42 | 43 | # Helper function 44 | function f_help() { 45 | echo -e "\nUsage: $0 [-u username] [-d directory] [-i install] [-v verbose]" 46 | echo -e "\n\t -u: low-privs username (will be used to set functions/variables in .bashrc, define paths, etc.)" 47 | echo -e "\t -d: specify the location where all tools will be installed (default is: /home/\$user/Tools)" 48 | echo -e "\t -i: whether to install tools or just download them (will actually install all repo-related tools)" 49 | echo -e "\t -v: set verbosity on" 50 | echo -e "\n\t/!\ This script doesn't need (and not recommended) to be run as root (but you might be required to type in your password for privileged tasks - apt install, etc.)" 51 | exit 1 52 | } 53 | 54 | # Generic function to print stuff 55 | function f_print() { 56 | # Something to print? 57 | if [ $# != 0 ]; then 58 | if [ $# == 1 ]; then 59 | # Just print the message 60 | echo -e "${NOCOLOR}$1${NOCOLOR}" 61 | else 62 | if [ $2 == "error" ]; then 63 | echo -e "${RED}$1${NOCOLOR}" 64 | elif [ $2 == "ok" ]; then 65 | echo -e "${GREEN}$1${NOCOLOR}" 66 | elif [ $2 == "warning" ]; then 67 | echo -e "${ORANGE}$1${NOCOLOR}" 68 | fi 69 | fi 70 | fi 71 | } 72 | 73 | # Install through git 74 | function f_dl_git() { 75 | LABEL="$1" 76 | URL="$2" 77 | DEST="$3" 78 | OPTS="$4" 79 | 80 | f_print "\n\t[*] Installing $LABEL" 81 | cmd="$GIT clone $QUIET $OPTS $URL $DEST" 82 | f_print "\t[*] cmd: $cmd" 83 | $GIT clone $QUIET $OPTS "$URL" $DEST 84 | f_print "\t[*] Installed $LABEL - done" "ok" 85 | } 86 | 87 | # Install through wget 88 | function f_dl_wget() { 89 | LABEL="$1" 90 | URL="$2" 91 | DEST="$3" 92 | OPTS="$4" 93 | 94 | f_print "\n\t[*] Installing $LABEL" 95 | cmd="$WGET $QUIET $URL $OPTS -O $DEST" 96 | f_print "\t[*] cmd: $cmd" 97 | $WGET $QUIET "$URL" $OPTS -O $DEST 98 | f_print "\t[*] Installed $LABEL - done" "ok" 99 | } 100 | 101 | # Unzip (quietly) and remove zip file afterwards 102 | function f_quiet_unzip_and_remove() { 103 | FILE=$1 104 | DEST=$2 105 | 106 | $UNZIP -qq "$FILE" -d "$DEST" 107 | $RM "$FILE" 108 | } 109 | 110 | # Install tools 111 | function f_install() { 112 | METHOD="$1" 113 | ARGS="$2" 114 | 115 | if [ "$install" == "true" ]; then 116 | if [ "$METHOD" == "apt" ]; then 117 | $SUDO $APT -qq -y install "$ARGS" 118 | elif [ "$METHOD" == "dpkg" ]; then 119 | $SUDO $DPKG -i "$ARGS" 120 | fi 121 | fi 122 | } 123 | 124 | function f_install_pipenv() { 125 | CURRENT_DIRECTORY="$1" 126 | REQUIREMENTS="$2" 127 | SETUP="$3" 128 | 129 | if [ "$install" == "true" ]; then 130 | cd "$CURRENT_DIRECTORY" 131 | 132 | if [ "$REQUIREMENTS" == "requirements.txt" ]; then 133 | pipenv install -r "$CURRENT_DIRECTORY/requirements.txt" 134 | fi 135 | 136 | if [ "$SETUP" == "setup.py" ]; then 137 | pipenv install -e . 138 | fi 139 | # Get back 140 | cd "${CURRENT_DIRECTORY%/*}" 141 | fi 142 | } 143 | 144 | function f_update_upgrade() { 145 | if [ "$install" == "$true" ]; then 146 | $SUDO $APT -qq update 147 | $SUDO $APT -qq -y upgrade 148 | fi 149 | } 150 | 151 | function f_check_installed() { 152 | PROGS="$1" 153 | for p in $PROGS; do 154 | # CHECK=$($DPKG -l | grep -i "$p") 155 | CHECK=$($WHEREIS "$p" | $CUT -d ':' -f2) # works for python packages 156 | if [ -z "$CHECK" ]; then 157 | f_print "[!] \"$p\" is missing, please install it.\nExiting..." "error" 158 | exit 1 159 | fi 160 | done 161 | } 162 | 163 | ######################################## 164 | # Generic 165 | ######################################## 166 | function f_install_tools_XXX() { 167 | prefix="$directory/XXX" 168 | f_print "\n[*] Install XXX tools ($prefix)" 169 | 170 | # XXX 171 | 172 | f_print "\n[*] Install XXX tools - done" "ok" 173 | } 174 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # The sole purpose of this script is not to bother installing tools (manually) 3 | # each and every time... 4 | 5 | username="$USER" 6 | directory="/home/$username/Tools" 7 | verbose="false" # true: display some more info 8 | install="false" # false: download only, true: install dependencies + requirements + install 9 | 10 | source "./core/functions.sh" 11 | 12 | # Handle arguments 13 | while getopts ":u:d:ivh" opt; do 14 | case $opt in 15 | u) username="$OPTARG" ;; 16 | d) directory="$OPTARG" ;; 17 | i) install=true ;; 18 | v) verbose=true ;; 19 | h) f_help ;; 20 | \?) $ECHO -e "\n[!] Invalid option -$OPTARG" >&2; f_help ;; 21 | esac 22 | done 23 | 24 | # Options 25 | if [ "$verbose" == "false" ]; then 26 | QUIET="--quiet" 27 | else 28 | QUIET="" 29 | fi 30 | 31 | # Quick failsafe 32 | if [ -z "$username" ] || [ -z "$directory" ]; then 33 | f_help 34 | fi 35 | 36 | # Ask for user confirmation 37 | while true; do 38 | f_print "\n[-] Tools will be installed @:$directory, with \"$username\" privileges (verbosity: \"$verbose\", install: \"$install\")" "ok" 39 | read -p "Are you sure? (y/Y) " -n 1 -r REPLY 40 | if [[ $REPLY =~ ^[Yy]$ ]]; then 41 | break 42 | elif [[ $REPLY =~ ^[Nn]$ ]]; then 43 | f_print "Exiting..." "error" 44 | exit 1 45 | fi 46 | done 47 | 48 | # Source all files 49 | source "apps.conf" 50 | source "./core/f_dependencies.sh" 51 | source "./core/f_install_network.sh" 52 | source "./core/f_install_recon.sh" 53 | source "./core/f_install_web.sh" 54 | source "./core/f_install_windows.sh" 55 | source "./core/f_install_pwcracking.sh" 56 | source "./core/f_install_forensic.sh" 57 | source "./core/f_install_wordlist.sh" 58 | source "./core/f_install_database.sh" 59 | source "./core/f_install_exploits.sh" 60 | source "./core/f_install_reverse.sh" 61 | source "./core/f_install_mobile.sh" 62 | source "./core/f_install_RFID.sh" 63 | source "./core/f_wrapup.sh" 64 | 65 | ######################################## 66 | # Main function 67 | ######################################## 68 | 69 | # Required dependencies 70 | f_install_dependencies 71 | 72 | # Creating some folders 73 | f_print "\n[*] Creating some directories..." "ok" 74 | $MKDIR -p "$directory"/{network,recon,web,windows,pwcracking,forensic,wordlists,database,exploits,reverse,mobile,RFID} 75 | 76 | # Let's go 77 | f_install_tools_network 78 | f_install_tools_recon 79 | f_install_tools_web 80 | f_install_tools_windows 81 | f_install_tools_pwcracking 82 | f_install_tools_forensic 83 | f_install_tools_wordlists 84 | f_install_tools_database 85 | f_install_tools_exploits 86 | f_install_tools_reverse 87 | #f_install_tools_thickClients 88 | f_install_tools_mobile 89 | f_install_tools_RFID 90 | f_wrapup 91 | -------------------------------------------------------------------------------- /todo: -------------------------------------------------------------------------------- 1 | function temp() { 2 | mkdir ~/tools ~/captures ~/worlists 3 | cd ~/tools 4 | mkdir web network intern extern 5 | 6 | 7 | 8 | #Sysvolexplorer 9 | git clone https://github.com/ANSSI-FR/SysvolExplorer.git 10 | f_print "[*] Sysvolexplorer installed" "ok" 11 | 12 | #------------------------------------------------------------------------------- 13 | 14 | 15 | # Thick client 16 | 17 | git clone https://bitbucket.org/LaNMaSteR53/recon-ng.git 18 | f_print "[*] recon-ng installed" "ok" 19 | 20 | #Issue with permission on new repo file 21 | chmod 644 /etc/apt/sources.list.d/* 22 | 23 | } 24 | 25 | - Add HTTPScreenshot 26 | - pypycatz 27 | - mobile: frida, adb, apktool 28 | - gcc + cross compile (mingw) 29 | - ettercap/bettercap/bettercap-ng (evilSocket) 30 | - hex editor 31 | - z3 32 | - rsatools 33 | - EDB (gui gdb) 34 | - atom/sublimetext 35 | --------------------------------------------------------------------------------