Advertisement
opexxx

INSTALL_raspberry_pwn.sh

May 2nd, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.81 KB | None | 0 0
  1. #!/bin/bash
  2. # Raspberry Pwn 0.1 : A Raspberry Pi Pentesting suite by Pwnie Express
  3. # pwnieexpress.com
  4. # Installer Revision 6.12.2012
  5.  
  6. echo ""
  7.  
  8. # Verify we are root
  9. if [[ $EUID -ne 0 ]]; then
  10.    echo "This script must be run as root" 1>&2
  11.    exit 1
  12. fi
  13.  
  14. # Verify Raspberry Pwn 0.1 is not already installed
  15. if [ "`grep -o 0.1 /etc/motd.tail`" == "0.1" ] ; then
  16.         echo "[-] Raspberry Pwn 0.1 already installed. Aborting..."
  17.         exit 1
  18. fi
  19.  
  20.  
  21. echo "  _____      ___  _ ___ ___   _____  _____ ___ ___ ___ ___      "
  22. echo " | _ \ \    / / \| |_ _| __| | __\ \/ / _ \ _ \ __/ __/ __|     "
  23. echo " |  _/\ \/\/ /| .\` || || _|  | _| >  <|  _/   / _|\__ \__ \    "
  24. echo " |_|   \_/\_/ |_|\_|___|___| |___/_/\_\_| |_|_\___|___/___/     "
  25. echo ""
  26. echo "              === Raspberry Pwn Release 0.1 ===                 "
  27. echo "     A Raspberry Pi Pentesting suite by PwnieExpress.com        "
  28. echo ""
  29. echo "----------------------------------------------------------------"
  30. echo " This installer will load a comprehensive security pentesting   "
  31. echo " software suite onto your Raspberry Pi. Note that the Debian    "
  32. echo " Raspberry Pi distribution must be installed onto the SD card   "
  33. echo " before proceeding. See README.txt for more information.       "
  34. echo ""
  35. echo "Press ENTER to continue, CTRL+C to abort."
  36. read INPUT
  37. echo ""
  38.  
  39. # Make sure all installer files are owned by root
  40. chown -R root:root .
  41.  
  42. # Update base debian packages
  43. echo "[+] Updating base system Debian packages..."
  44. echo "deb http://ftp.debian.org/debian/ squeeze main contrib non-free" > /etc/apt/sources.list
  45. aptitude -y update
  46. aptitude -y upgrade
  47. echo "[+] Base system Debian packages updated."
  48.  
  49. # Install baseline pentesting tools via aptitude
  50. echo "[+] Installing baseline pentesting tools/dependencies..."
  51. aptitude -y install telnet btscanner libnet-dns-perl hostapd nmap dsniff netcat nikto xprobe python-scapy wireshark tcpdump ettercap hping3 medusa macchanger nbtscan john ptunnel p0f ngrep tcpflow openvpn iodine httptunnel cryptcat sipsak yersinia smbclient sslsniff tcptraceroute pbnj netdiscover netmask udptunnel dnstracer sslscan medusa ipcalc dnswalk socat onesixtyone tinyproxy dmitry fcrackzip ssldump fping ike-scan gpsd darkstat swaks arping tcpreplay sipcrack proxychains proxytunnel siege sqlmap wapiti skipfish w3af libssl-dev libpcap-dev libpcre3 libpcre3-dev libnl-dev libncurses-dev subversion python-twisted-web python-pymssql
  52. echo "[+] Baseline pentesting tools installed."
  53.  
  54. # Remove unneeded statup items
  55. echo "[+] Remove unneeded startup items..."
  56. update-rc.d -f gpsd remove
  57. update-rc.d -f tinyproxy remove
  58. update-rc.d -f ntp remove
  59. apt-get -y purge portmap
  60. apt-get -y autoremove gdm
  61. apt-get -y autoremove
  62. echo "[+] Unneeded startup items removed."
  63.  
  64. # Install wireless pentesting tools
  65. echo "[+] Installing wireless pentesting tools..."
  66. aptitude -y install kismet
  67. cd src/aircrack-ng-1.1
  68. chmod +x evalrev
  69. make install
  70. cd ../..
  71. echo "[+] Wireless pentesting tools installed."
  72.  
  73. # Install Metasploit -- Note this will require changing the default RAM allocation
  74. echo "[+] Installing latest Metasploit Framework..."
  75. aptitude -y install ruby irb ri rubygems libruby ruby-dev libpcap-dev
  76. mkdir /opt/metasploit
  77. cd /opt/metasploit
  78. wget http://downloads.metasploit.com/data/releases/framework-latest.tar.bz2
  79. tar jxvf framework-latest.tar.bz2
  80. ln -sf /opt/metasploit/msf3/msf* /usr/local/bin/
  81. echo "[+] Latest Metasploit Framework installed."
  82.  
  83. # Install Perl/Python tools to /pentest
  84. echo "[+] Installing Perl/Python tools to /pentest..."
  85. cp -a src/pentest/ /
  86. chown -R root:root /pentest/
  87. chmod +x /pentest/cisco-auditing-tool/CAT
  88. chmod +x /pentest/easy-creds/easy-creds.sh
  89. chmod +x /pentest/goohost/goohost.sh
  90. chmod +x /pentest/lbd/lbd.sh
  91. chmod +x /pentest/sslstrip/sslstrip.py
  92. echo "[+] Perl/Python tools installed in /pentest."
  93.  
  94. # Install SET
  95. echo "[+] Installing latest SET framework to /pentest..."
  96. svn co http://svn.secmaniac.com/social_engineering_toolkit /pentest/set/
  97. cd src/pexpect-2.3/
  98. python setup.py install
  99. cd ../..
  100. echo "[+] SET framework installed in /pentest."
  101.  
  102. # Update motd to show Raspberry Pwn release
  103. cp src/motd.tail.raspberrypwn /etc/motd.tail
  104.  
  105. # Install Exploit-DB
  106. echo "[+] Installing Exploit-DB to /pentest..."
  107. svn co svn://www.exploit-db.com/exploitdb /pentest/exploitdb/
  108. echo "[+] Exploit-DB installed in /pentest."
  109.  
  110. echo "[+] Setting default RAM allocation"
  111. cp /boot/arm224_start.elf /boot/start.elf
  112.  
  113. echo ""
  114. echo "---------------------------------------------------------------"
  115. echo "Raspberry Pwn Release 0.1 installed successfully!"
  116. echo "---------------------------------------------------------------"
  117. echo ""
  118.  
  119.  
  120. echo "[+] In order for the new RAM allocation to take effect, we must"
  121. echo "[+] now reboot the pi. Press [Ctrl-C] to exit without rebooting."
  122. echo ""
  123. read
  124. reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement