Skip to content

gymzombie/PentestPi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PentestPi

Setup a RaspberryPi as a dropbox for Pentesting

This was a small project by our little team to stand up a dropbox for pentesting. Something that we could drop in an environment, would listen on responder, collect any creds, and send outbound to our listener on the Internet. Because these are real creds, we needed them to be securely transmitted. We also need it to dial out and create a reverse SSH tunnel so that we can login from the Internet and get into the target environment.

(Obligitory Legal) Please, for the love of pete, don't use this if you aren't authorized by the head of your target organization. It's not worth going to jail to prove you're a L33t h@x0r. Don't try this at home.

Originally, these scripts were built for Ubuntu 14, but that distro required a lot of manual tweaks for each new Pi, and this update is design to limit those manual tweaks. The Kali2 pi image was used this go-around.

Initial configuration:

Install Kali ARM image for Pi2/3 onto a MicroSD card. (See http://docs.kali.org/kali-on-arm/install-kali-linux-arm-raspberry-pi and https://www.offensive-security.com/kali-linux-arm-images/.) Armhf architecture works with Pi 2 and above.

I recommend https://etcher.io for burning your image to disk.

** Currently modifying so that you can setup over the network. Don't use this until finished testing **

curl https://raw.githubusercontent.com/gymzombie/PentestPi/master/setup.sh | bash

After running the setup successfully, you should:

  • edit pentest-config.sh to update HOME_SERVER address
  • Upload your authorized keys to your C&C server with "scp id_rsa.pub raspi@:.ssh/authorized_keys"
  • Change your root password
  • Edit your monitrc (Instructions Below)

Setting up monit to watch services. This will run watchdog scripts for dialing home, uploading files, running responder, etc.

  • Config is in /etc/monit/monitrc
  • as root, you could run cat /home/raspi/PentestPi/monitrc >> /etc/monit/monitrc to append

Notes for admin:

  • sudo monit -t : Reviews config to make sure syntax is OK
  • sudo monit reload : reloads config
  • sudo monit status : Shows status of processes
  • sudo monit restart all : Restarts all services that monit controls
  • Details are in /var/log/monit.log

About

Setup a RaspberryPi as a responder-in-a-box dropbox for Pentesting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages