Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2. #Creato da Mito125
  3. version=1.1
  4.  
  5. aggiungi() {
  6. #Funzione aggiungi al menu
  7. # @1: nome
  8. # @2: commento
  9. # @3: command line
  10. # @4: terminale (true or false)
  11. # @5: Categoria
  12.     echo "
  13. [Desktop Entry]
  14. Type=Application
  15. Encoding=UTF-8
  16. Name=$1
  17. Comment=$2
  18. Icon=/usr/share/icons/pentest/$1.png
  19. Exec=$3
  20. Terminal=$4
  21. " > /tmp/$1.desktop
  22. xdg-desktop-menu install /tmp/Mito125.directory /tmp/$5.directory /tmp/$1.desktop --novendor
  23. xdg-desktop-menu forceupdate
  24. }
  25.  
  26. dlicona() {
  27. # @1: nome icona
  28. # @2: url
  29. # ATTENZIONE: il nome dell'icona deve essere lo stesso di quello del programma asociato
  30.     wget $2 -P /tmp
  31.     convert -size 48x48 /tmp/$(echo $2|awk -F/ '{print $NF}') -resize 48x48 -extent 48x48 +profile '*' /usr/share/icons/pentest/$1.png
  32.     rm /tmp/$(echo $2|awk -F/ '{print $NF}')
  33. }
  34.  
  35. crearedirectoryfile() {
  36. #Funzione aggiungi menu
  37. #@1: nome della directory
  38.   echo "[Desktop Entry]
  39. Name=$1
  40. Comment=$1 tools
  41. Icon=/usr/share/incons/pentest/$1.png
  42. Type=Directory
  43. Categories=$1
  44. " > /tmp/$1.directory
  45. }
  46.  
  47. installacrypto() {
  48.     #Installa xortools
  49.     cd /pentest/crypto/ && wget https://github.com/hellman/xortool/zipball/master -O xortool.zip && unzip xortool.zip && rm xortool.zip && cd ~
  50.     aggiungi 'xortool' 'Utility per analisi XOR' "sh -c 'cd /pentest/crypto/hellman-xortool-80cedef/ && ./xortool.py -h; bash'" 'True' Crypto
  51. }
  52.  
  53. installaexploit() {
  54.     #Installa exploitdb
  55.     rm -rf /pentest/exploit/exploitdb && mkdir -pv /pentest/exploit/exploitdb && cd /pentest/exploit/exploitdb && wget http://www.exploit-db.com/archive.tar.bz2 && tar -jxvf archive.tar.bz2 && rm archive.tar.bz2 && cd ~
  56.     aggiungi 'exploit-db' 'Vai alla directory del database' "sh -c 'cd /pentest/exploit/exploitdb; sudo -s'" 'True' Exploit
  57.     #Installa SET
  58.     cd /pentest/exploit/ && svn co http://svn.secmaniac.com/social_engineering_toolkit set/ && cd ~
  59.     aggiungi 'SET' 'Social Engineering Toolkit' "sudo sh -c 'cd /pentest/exploit/set && ./set; bash'" 'True' Exploit
  60. }
  61.  
  62. installapassword() {
  63.     #Installa crunch wordlist creator
  64.     cd /pentest/password && wget http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/crunch-3.2.tgz && tar -xzvf crunch-3.2.tgz && rm crunch-3.2.tgz && cd crunch3.2 && /usr/bin/gcc -Wall -lm -pthread -std=c99 -m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 crunch.c -o crunch -lm && cd ~
  65.     aggiungi 'crunch' 'Utility per generare wordlist' "sh -c 'cd /pentest/password/crunch3.2/ && ./crunch -h; bash'" 'True' Password
  66.     #Installa JTR
  67.     cd /pentest/password && wget http://www.openwall.com/john/g/john-1.7.9-jumbo-5.tar.gz && tar -xzvf john-1.7.9-jumbo-5.tar.gz && rm john-1.7.9-jumbo-5.tar.gz && cd john-1.7.9-jumbo-5 && cd src && make clean linux-x86-64 && cd /pentest/password && mkdir -pv john && cp -R /pentest/password/john-1.7.9-jumbo-5/run/* /pentest/password/john/ && rm -R /pentest/password/john-1.7.9-jumbo-5/ && cd ~
  68.     aggiungi 'john-the-ripper' 'Tool per crackare password' "sudo sh -c 'cd /pentest/password/john/ && ./john; bash'" 'True' Password
  69.     #Installa VNCpwdump
  70.     mkdir -pv /pentest/passwordvncpwdump && cd /pentest/passwordvncpwdump && wget http://www.cqure.net/tools/vncpwdump-win32-1_0_6.zip && unzip vncpwdump-win32-1_0_6.zip && rm vncpwdump-win32-1_0_6.zip
  71.     aggiungi 'VNCpwdump' 'Tool per crackare hash di winVNC' "sh -c 'wine /pentest/passwordvncpwdump/vncpwdump.exe &; bash'" 'True' Password
  72. }
  73.  
  74. installascanner() {
  75.     #Installa nmap
  76.     cd /pentest/scanner/ && wget http://nmap.org/dist/nmap-5.61TEST4.tar.bz2 && bzip2 -cd nmap-5.61TEST4.tar.bz2 | tar xvf - && rm nmap-5.61TEST4.tar.bz2 && cd nmap-5.61TEST4 && ./configure && make && make install && cd ~
  77.     aggiungi 'nmap' 'Network Mapper' "sudo sh -c 'nmap; bash'" 'True' Scanner
  78.     #Installa sqlmap
  79.     cd /pentest/scanner && svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap sqlmap && cd ~
  80.     aggiungi 'sqlmap' 'SQL Injection Exploiter' "sh -c 'cd /pentest/scanner/sqlmap/ && ./sqlmap.py; sudo -s'" 'True' Scanner
  81. }
  82.  
  83. installashell() {
  84.     #Installa Weevely
  85.     cd /pentest/shell/ && mkdir -pv weevely && cd weevely && wget http://weevely.googlecode.com/files/weevely-0.5.1.tar.gz && tar -xzvf weevely-0.5.1.tar.gz && rm weevely-0.5.1.tar.gz && cd ~
  86.     aggiungi 'weevely' 'Vai alla directory di Weevely' "sh -c 'cd /pentest/shell/weevely; sudo -s'" 'True' Shell
  87.     #Salva una reverse-shell in php
  88.     cd /pentest/shell/ && wget http://pentestmonkey.net/tools/php-reverse-shell/php-reverse-shell-1.0.tar.gz && tar -xzvf php-reverse-shell-1.0.tar.gz && rm php-reverse-shell-1.0.tar.gz && cd ~
  89.     aggiungi 'php-reverse-shell' 'PHP Reverse Shell' "sh -c 'cd /pentest/shell/php-reverse-shell-1.0/; sudo -s'" 'True' Shell
  90.     #Salva una reverse-shell in perl
  91.     cd /pentest/shell/ && wget http://pentestmonkey.net/tools/perl-reverse-shell/perl-reverse-shell-1.0.tar.gz && tar -xzvf perl-reverse-shell-1.0.tar.gz && rm perl-reverse-shell-1.0.tar.gz && cd ~
  92.     aggiungi 'perl-reverse-shell' 'Perl Reverse Shell' "sh -c 'cd /pentest/shell/perl-reverse-shell-1.0/; sudo -s'" 'True' Shell
  93. }
  94.  
  95. installaweb() {
  96.     #Installa ZAProxy
  97.     cd /pentest/web/ && wget http://zaproxy.googlecode.com/files/ZAP_1.3.4_Linux.tar.gz && tar -xzvf ZAP_1.3.4_Linux.tar.gz && rm ZAP_1.3.4_Linux.tar.gz && cd ~
  98.     aggiungi 'ZAproxy' 'Vai alla directory di ZAProxy' "sh -c 'cd /pentest/web/ZAP_1.3.4/; sudo -s'" 'True' Web
  99.     #Installa DirBuster
  100.     cd /pentest/web && wget http://sourceforge.net/projects/dirbuster/files/DirBuster%20%28jar%20%2B%20lists%29/1.0-RC1/DirBuster-1.0-RC1.tar.bz2 && tar -jxvf DirBuster-1.0-RC1.tar.bz2 && rm DirBuster-1.0-RC1.tar.bz2 && cd ~
  101.     aggiungi 'DirBuster' 'Tool OWASP' "sh -c 'cd /pentest/web/DirBuster-1.0-RC1 && java -jar DirBuster-1.0-RC1.jar'" 'False' Web
  102.     #Installa Nikto2
  103.     cd /pentest/web/ && wget https://cirt.net/nikto/nikto-2.1.4.tar.gz --no-check-certificate && tar -xzvf nikto-2.1.4.tar.gz && rm nikto-2.1.4.tar.gz && cd ~
  104.     aggiungi 'Nikto2' 'Web Server Scanner' "sh -c 'cd /pentest/web/nikto-2.1.4/; sudo -s'" 'True' Web
  105.     #Installa fimap
  106.     cd /pentest/web/ && wget http://fimap.googlecode.com/files/fimap_alpha_v09.tar.gz && tar -xzvf fimap_alpha_v09.tar.gz && rm fimap_alpha_v09.tar.gz && cd ~
  107.     aggiungi 'fimap' 'Utility per LFI/RFI bugs' "sh -c 'cd /pentest/web/fimap_alpha_v09/ && ./fimap.py -h; bash'" 'True' Web
  108.     #Installa w3af
  109.     cd /pentest/web && wget http://sourceforge.net/projects/w3af/files/w3af/w3af%201.0-stable/w3af-1.0-stable.tar.bz2 && tar -jxvf w3af-1.0-stable.tar.bz2 && rm w3af-1.0-stable.tar.bz2 && cd ~
  110.     aggiungi 'w3af' 'Web Application Attack and Audit Framework' "sh -c 'cd /pentest/web/w3af/; ./w3af_gui'" 'False' Web
  111.     #Installa metasploit
  112.     wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run && chmod +x metasploit-latest-linux-x64-installer.run && ./metasploit-latest-linux-x64-installer.run && rm metasploit-latest-linux-x64-installer.run
  113.     aggiungi 'msfconsole' 'Penetration Testing Software' "sudo sh -c 'msfconsole; bash'" 'True' Exploit
  114. }
  115.  
  116. installaforensics() {
  117.     #Installa volatility
  118.     cd /pentest/forensics && wget https://www.volatilesystems.com/volatility/2.0/volatility-2.0.tar.gz && tar -xzvf volatility-2.0.tar.gz && rm volatility-2.0.tar.gz
  119.     aggiungi 'volatility' 'Extract digital artifacts from volatile memory (RAM) samples' "sudo sh -c 'python /pentest/forensics/volatility-2.0/vol.py; bash'" 'True' Forensics
  120. }  
  121.  
  122. installareverse() {
  123.     mkdir -pv /pentest/reverse/ollydbg && cd /pentest/reverse/ollydbg && wget http://www.ollydbg.de/odbg201d.zip && unzip odbg201d.zip && rm odbg201d.zip
  124.     aggiungi 'Ollydbg' 'Ollydbg' "sh -c 'wine /pentest/reverse/ollydbg/ollydbg.exe &'" 'False' Reverse
  125. }
  126.  
  127. creastruttura() {
  128.     for i in exploit web crypto password scanner shell forensics reverse; do mkdir -pv /pentest/$i; done
  129.     for i in Exploit Web Crypto Password Scanner Shell Forensics Reverse Mito125; do crearedirectoryfile $i; done
  130.     mkdir -pv /usr/share/icons/pentest/
  131. }
  132.  
  133. update() {
  134.     apt-get --purge autoremove netcat-openbsd -y
  135.     echo "Aggiorno la distribuzione"
  136.     apt-get update 1>/dev/null && apt-get -y dist-upgrade 1>/dev/null
  137.     echo "Installo i pacchetti dai repository"
  138.     apt-get -y install imagemagick openjdk-7-jre whois curl vlc checkinstall apache2 libssl-dev geany hping3 gtk-recordmydesktop knockd macchanger netcat-traditional ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libreadline-ruby irb ri rubygems subversion ruby-dev libpcap-dev wireshark netdiscover python-crypto-doc python-nltk python-soappy python-lxml python-svn python-scapy graphviz python-gtksourceview2 libc6-dev-i386 p7zip wine
  139.     #Disabilita l'avvio automatico di apache2
  140.     update-rc.d -f apache2 disable
  141.     #Installa BeautifulSoup
  142.     wget http://www.crummy.com/software/BeautifulSoup/download/3.x/BeautifulSoup-3.2.0.tar.gz && tar -xzvf BeautifulSoup-3.2.0.tar.gz && rm BeautifulSoup-3.2.0.tar.gz && cd BeautifulSoup-3.2.0/ && python setup.py install && cd ~ && rm -r BeautifulSoup-3.2.0/
  143. }
  144.  
  145. creaalias() {
  146.     echo 'alias xortool="cd /pentest/crypto/hellman-xortool-80cedef/"' >> ~/.bashrc
  147.     echo 'alias socialengtool="cd /pentest/exploit/set"' >> ~/.bashrc
  148.     echo 'alias exploitdb="cd /pentest/exploit/exploitdb"' >> ~/.bashrc
  149.     echo 'alias crunch="/pentest/password/crunch3.2/crunch"' >> ~/.bashrc
  150.     echo 'alias john="/pentest/password/john/john"' >> ~/.bashrc
  151.     echo 'alias sqlmap="/pentest/scanner/sqlmap/sqlmap.py"' >> ~/.bashrc
  152.     echo 'alias weevely="cd /pentest/shell/weevely"' >> ~/.bashrc
  153.     echo 'alias zaproxy="cd /pentest/web/ZAP_1.3.4/"' >> ~/.bashrc
  154.     echo 'alias dirbuster="java -jar /pentest/web/DirBuster-1.0-RC1/DirBuster-1.0-RC1.jar &"' >> ~/.bashrc
  155.     echo 'alias nikto2="cd /pentest/web/nikto-2.1.4/"' >> ~/.bashrc
  156.     echo 'alias fimap="/pentest/web/fimap_alpha_v09/fimap.py"' >> ~/.bashrc
  157.     echo 'alias w3af="/pentest/web/w3af/w3af_gui &"' >> ~/.bashrc
  158.     echo 'alias aggiorna="apt-get update && apt-get dist-upgrade"' >> ~/.bashrc
  159.     echo 'alias volatility="python /pentest/forensics/volatility-2.0/vol.py"' >> ~/.bashrc
  160.     echo 'alias vncpwdump="wine /pentest/passwordvncpwdump/vncpwdump.exe &"' >> ~/.bashrc
  161.     echo 'alias ollydbg="wine /pentest/reverse/ollydbg/ollydbg.exe &"' >> ~/.bashrc
  162. }
  163. ##############################################################################################################
  164.  
  165. if [ "$(id -u)" != "0" ]; then
  166.    echo "Devi essere root per eseguire questo script."
  167.    exit 1
  168. fi
  169.  
  170. #Avvio automatico programmi
  171. mkdir -pv ~/.config/autostart/ && ln -s /usr/share/applications/xfce4-terminal.desktop ~/.config/autostart/
  172.  
  173. #update ed installazione pacchetti dai repository
  174. update
  175.  
  176. #Crea la struttura
  177. creastruttura
  178.  
  179. #Installazioni
  180. installacrypto
  181. installaexploit
  182. installapassword
  183. installascanner
  184. installashell
  185. installaweb
  186. installaforensics
  187. creaalias
  188.  
  189. #AVVISO
  190. echo "ADESSO RIAVVIA PER COMPLETARE CON SUCCESSO TUTTE LE OPERAZIONI"