Advertisement
opexxx

INSTALL_raspberry_pwn.sh

Jul 8th, 2014
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.29 KB | None | 0 0
  1. #!/bin/bash
  2. # Raspberry Pwn 0.2 : A Raspberry Pi Pentesting suite by Pwnie Express
  3. # pwnieexpress.com
  4. # Installer Revision 6.12.2012
  5. # * Updated to supprot wheezy -- commented out sources.list change, added package
  6. # * wi to dependencies, modify metasploit install process to not change directory
  7. # * commented out mem check and just added a note to change it using raspi-config
  8.  
  9. echo ""
  10.  
  11. # Verify we are root
  12. if [[ $EUID -ne 0 ]]; then
  13.    echo "This script must be run as root" 1>&2
  14.    exit 1
  15. fi
  16.  
  17. # Verify Raspberry Pwn 0.2 is not already installed
  18. if [ "`grep -o 0.2 /etc/motd.tail`" == "0.2" ] ; then
  19.         echo "[-] Raspberry Pwn 0.2 already installed. Aborting..."
  20.         exit 1
  21. fi
  22.  
  23.  
  24. echo " _____ ___ _ ___ ___ _____ _____ ___ ___ ___ ___ "
  25. echo " | _ \ \ / / \| |_ _| __| | __\ \/ / _ \ _ \ __/ __/ __| "
  26. echo " | _/\ \/\/ /| .\` || || _| | _| > <| _/ / _|\__ \__ \ "
  27. echo " |_| \_/\_/ |_|\_|___|___| |___/_/\_\_| |_|_\___|___/___/ "
  28. echo ""
  29. echo " === Raspberry Pwn Release 0.2 === "
  30. echo " A Raspberry Pi Pentesting suite by PwnieExpress.com "
  31. echo ""
  32. echo "----------------------------------------------------------------"
  33. echo " This installer will load a comprehensive security pentesting "
  34. echo " software suite onto your Raspberry Pi. Note that the Debian "
  35. echo " Raspberry Pi distribution must be installed onto the SD card "
  36. echo " before proceeding. See README.txt for more information. "
  37. echo ""
  38. echo "Press ENTER to continue, CTRL+C to abort."
  39. read INPUT
  40. echo ""
  41.  
  42. # Make sure all installer files are owned by root
  43. chown -R root:root .
  44.  
  45. # Update base debian packages
  46. echo "[+] Updating base system Debian packages..."
  47. #commenting this out... don't need it!
  48. #echo "deb http://ftp.debian.org/debian/ squeeze main contrib non-free" > /etc/apt/sources.list
  49. aptitude -y update
  50. aptitude -y upgrade
  51. echo "[+] Base system Debian packages updated."
  52.  
  53. # Install baseline pentesting tools via aptitude
  54. echo "[+] Installing baseline pentesting tools/dependencies..."
  55. aptitude -y install telnet btscanner libnet-dns-perl hostapd nmap dsniff netcat nikto xprobe python-scapy wireshark tcpdump ettercap-graphical 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 wi
  56. echo "[+] Baseline pentesting tools installed."
  57.  
  58. # Remove unneeded statup items
  59. echo "[+] Remove unneeded startup items..."
  60. update-rc.d -f gpsd remove
  61. update-rc.d -f tinyproxy remove
  62. update-rc.d -f ntp remove
  63. apt-get -y purge portmap
  64. apt-get -y autoremove gdm
  65. apt-get -y autoremove
  66. echo "[+] Unneeded startup items removed."
  67.  
  68. # Install wireless pentesting tools
  69. echo "[+] Installing wireless pentesting tools..."
  70. aptitude -y install kismet
  71. cd src/aircrack-ng-1.1
  72. chmod +x evalrev
  73. make install
  74. cd ../..
  75. echo "[+] Wireless pentesting tools installed."
  76.  
  77. # Install Metasploit -- Note this will require changing the default RAM allocation
  78. echo "[+] Installing latest Metasploit Framework..."
  79. aptitude -y install ruby irb ri rubygems libruby ruby-dev libpcap-dev
  80. mkdir /opt/metasploit
  81. wget http://downloads.metasploit.com/data/releases/framework-latest.tar.bz2
  82. tar jxvf framework-latest.tar.bz2 -C /opt/metasploit
  83. ln -sf /opt/metasploit/msf3/msf* /usr/local/bin/
  84. echo "[+] Latest Metasploit Framework installed."
  85.  
  86. # Install Perl/Python tools to /pentest
  87. echo "[+] Installing Perl/Python tools to /pentest..."
  88. cp -a src/pentest/ /
  89. chown -R root:root /pentest/
  90. chmod +x /pentest/cisco-auditing-tool/CAT
  91. chmod +x /pentest/easy-creds/easy-creds.sh
  92. chmod +x /pentest/goohost/goohost.sh
  93. chmod +x /pentest/lbd/lbd.sh
  94. chmod +x /pentest/sslstrip/sslstrip.py
  95. echo "[+] Perl/Python tools installed in /pentest."
  96.  
  97. # Install SET
  98. echo "[+] Installing latest SET framework to /pentest..."
  99. svn co http://svn.secmaniac.com/social_engineering_toolkit /pentest/set/
  100. cd src/pexpect-2.3/
  101. python setup.py install
  102. cd ../..
  103. echo "[+] SET framework installed in /pentest."
  104.  
  105. # Update motd to show Raspberry Pwn release
  106. cp src/motd.tail.raspberrypwn /etc/motd.tail
  107. # Update motd for pi user to show Raspberry Pwn release
  108. cp src/motd.tail.raspberrypwn /etc/motd
  109.  
  110. # Install Exploit-DB
  111. echo "[+] Installing Exploit-DB to /pentest..."
  112. mkdir -p /pentest/exploitdb
  113. cd /pentest/exploitdb/
  114. wget http://www.exploit-db.com/archive.tar.bz2
  115. tar -xjvf archive.tar.bz2
  116. echo "[+] Exploit-DB installed in /pentest."
  117.  
  118. echo "[+] Setting default RAM allocation (disabled!)"
  119. echo "[!] If your RPi board only has 256MB ram please set split to"
  120. echo " 224/32 using raspi-config."
  121. #cp /boot/arm224_start.elf /boot/start.elf
  122.  
  123. echo ""
  124. echo "---------------------------------------------------------------"
  125. echo "Raspberry Pwn Release 0.2 installed successfully!"
  126. echo "---------------------------------------------------------------"
  127. echo ""
  128.  
  129.  
  130. echo "[+] In order for the new RAM allocation to take effect, we must"
  131. echo "[+] now reboot the pi. Press [Ctrl-C] to exit without rebooting."
  132. echo ""
  133. read
  134. reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement