Hardcode IP address into the boot sequence on the SD card (cmdline.txt)
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext4 rootwait ip=169.254.113.200
Try pinging the raspi
$ ping 169.254.113.200
SSH to it
$ ssh [email protected]
Update Software
$ apt-get update
#$ apt-get -y dist-upgrade (optional)
$ apt-get install -y build-essential
Install Tools
$ apt-get install -y vim screen tmux tshark tcpdump git stunnel
Fix Python and Pip
$ apt-get install -y python-dev
$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py
Confirm pip installed to /usr/local
$ which pip
/usr/local/bin/pip
Fix SSH Keys
$ apt-get install openssh-server
Change runlevel settings
# Kali 1.x
$ update-rc.d -f ssh remove
$ update-rc.d -f ssh defaults
# Kali 2.x
$ systemctl enable ssh.service
Replace default and insecure ssh keys
$ cd /etc/ssh
$ mkdir insecure_original_default_kali_keys
$ mv ssh_host_* insecure_original_default_kali_keys
Make new SSH keys for the pi
$ dpkg-reconfigure openssh-server
Add a Non-root User
$ adduser elijah -p deepsecret0
$ adduser elijah sudo
# Confirm setup correctly
$ id elijah
Don't allow root login and restrict logins to ipv4
$ nano /etc/ssh/sshd_config
[...]
AddressFamily inet
[...]
PermitRootLogin No
[...]
Disable ipv6
$ su
$ vim /etc/sysctl.conf
# Add these lines to the bottom:
[...]
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1