Raspberry PI 2 - Kali Linux



This is my first Raspberry PI yes the Raspberry PI 2 , the pi has a lot of use cases and hobbies people work on but however for me it's more relevant to use it as a 'throw-away hackboxes' (a phrase I picked from Offensive Security) I do it for educational purposes.

Below I shall let you know what you need to do in an orderly fashion to setup kali in the new Raspberry pi and ssh through an OSX machine. Please note the credit goes to the original authors and their articles here, again my intention is to summarise all the various steps together at one place.

https://www.offensive-security.com/kali-linux/raspberry-pi-luks-disk-encryption/
here
http://www.thesecurityblogger.com/installing-and-troubleshooting-kali-linux-on-raspberry-pi/
here
http://docs.kali.org/kali-on-arm/install-kali-linux-arm-raspberry-pi
here
https://www.kali.org/news/kali-linux-metapackages/


1. download the latest Kali RPi image (1.1.xx), extract it, and dd it to the SD card (incase you don't know the device it's loaded to, do a diskutil list

2. Next you need to unmount your SD card by issuing diskutil unmountDisk /dev/disk1 assuming our microSD is on disk1 (make sure you have the right disk number from the previous step)

3. Format the SD card by using the command sudo newfs_msdos -F 16 / dev/disk1 command (again make sure you use the right disk number)

4.Use the command sudo dd if=~/Downloads/kali-1.xx.xx-rpi.img of=/dev/disk1 (take care of the disk number again)

Wait... 

5. Insert the MicroSD card into the PI, allow the system to boot

6. Use standard login and password for Kali, type startx command at the shell prompt to start up the XFCE desktop environment.

7. Update & Upgrade apt-get update & apt-get upgrade respectively

8. change your SSH host keys as soon as possible as all ARM images are pre-configured the same keys and also change your root password

root@kali:~ rm /etc/ssh/ssh_host_*
root@kali:~ dpkg-reconfigure openssh-serverroot@kali:~ service ssh restart

9. Setup tightvncserver

apt-get install tightvncserver

10. tightvncserver 

11. Paste the content. Change resolution if necessary.
#!/bin/sh
### BEGIN INIT INFO
# Provides: tightvncserver
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start vnc server
# Description:
### END INIT INFO

case "$1" in
start)
su root -c 'vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565:'
echo "VNC Started"
;;
stop)
pkill Xtightvnc
echo "VNC Terminated"
;;
*)
echo "Usage: /etc/init.d/tightvnc {start|stop}"
exit 1
;;
esac

12. Let the file to be executable

chmod 755 /etc/init.d/tightvnc

13.Refresh global service configuration

update-rc.d tightvnc defaults

14. Restart system
reboot

15. By default Kali version will not have the metapackages install them 

apt-get update && apt-cache search KALI-LINUX-TOP10 

I went for Kali linux top10 as I have a space restriction. 

Note: Gui doesn't start automatically but I SSH and then issue startx command to start the xfce desktop. I'm in OSX and currently using Chicken of the VNC, I need to move to native OSX.



Popular posts from this blog

The correct way to install Jython (for Burpsuite)

RFID cloning with Proxmark3 Easy

Extracting an IPA; App distributed through Testflight