Jump to content

How to setup Kali Linux Raspberry Pi 0w

So I will be showing you guys how to fully set up Kali Linux on a Raspberry Pi 0 w, it is quite simple but I haven’t found a tutorial that shows how to do error free.

 

Requirements:

  • Raspberry Pi 0 w (Duh).
  • a SD card minimum 8gb (Class 10 cards are HIGHLY RECOMMENDED!!!).
  • A micro usb cable (Power only, data transfer wires are not needed but can also be used).
  • A sd card reader for your computer.
  • A computer to ssh into the Pi.
  • Your own router (Public internet connections that require a login like ‘Xfinitywifi’ or a hotels free public WiFi would probably not work).
  • A Computer that could access Wireless Internet.

 

Things that need to be downloaded before starting:

 

  • balenaEtcher (Used to burn the copy of Kali onto your self card).
  • A img of Kali Linux (Raspberry Pi Foundation > Kali Linux RPi0w Nexmon. Make sure to download this if you’re on a raspberry pi 0 w).
  • Notepad++ (Not sure is sublime would work, I couldn’t find anyway to format it for Unix but I could be oblivious and just not looking hard enough).
  • PuTTY (Any SSH client would work fine but for the sake of the tutorial I will use PuTTY).
  • Bonjour (This will help us ssh into the device, not sure if we need it if it’s over wireless but I’d get it anyways).

 

Step by step:

 

1. Makes sure you have downloaded and installed everything that I had listed above.

 

2. Plug in your SD card adapter or put your SD card into your computers built in reader.

 

***If the SD card has been used before I’d highly recommend to go to dskmgmt and delete all extra partitions and reformat the drive to ensure it’s completely empty so you won’t be running into any issues later on.

 

3. Open Etcher and click select image and locate your Kali Linux RPi0w Nexmon image.

 

4. Then click select drive and go ahead and select your SD card as the drive and then click flash. (Can take from 2 to 10 minutes. Time may vary).

 

 

***Make sure after it’s done that you give it time to verify all the files, there are times were files can be corrupted while flashing!

AC7811F2-A5B9-4E7C-9E46-48D9946E6B54.png

***After it’s done flashing and verifying, you might get a prompt saying that your sad card might be broken or corrupt and that you need to format it to view it, please select cancel.

 

5. Open file explorer, (notice how there are 2 extra drives instead of 1. You’re able to only view 1 without formatting which is the one that we need) Open your boot drive and create a text file called wpa_supplicant.conf (The extension for the text file CANNOT be .txt and MUST be .conf)

6.Open the newly created wpa_supplicant.conf in notepad++ and paste the following in

AF0D06B5-FB5B-4BC0-B386-64788D953843.png

Spoiler

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
	ssid="YourWiFiconnectionName"
	psk=“YouWiFiPassword”
	key_mgmt=WPA-PSK
}

***Do not make the mistake that I have done and keep WPA-PSK and do not put WPA2-PSK or anything else, keep it the way it is. Even if your security type is WPA2-PSK/Personal

 

7. Now we are going to enable ssh by default by creating a new text file and naming it ssh, NOW THIS IS IMPORTANT PLEASE DO NOT HAVE ANY EXTENSION ON THIS, NO .TXT OR ANYTHING JUST LEAVE THE EXTENSION BLANK!

8. Now your SD card is ready to be ejected and put in your RPi0w, after the SD card is in, plug the RPi0w into a power source and give it 90 seconds to fully boot up.

 

9. Now if you could connect your RPi0w to your monitor great! username: root password: toor . After putting in the credentials, type and run this command hostname -I and copy the host name to get your device ready for ssh (it is not needed to ssh your device if you have a monitor but I’d you'd like to keep following) 

9 (2). If you do not have a monitor :( we will have to go an extra step. You could find your RPi0w hostname by going to your routers admin settings (If you don’t know how to do that go here) and look at the devices that are connected and look for a device by the name of “Kali” and copy it’s IP (Mine looks like this 192.1.1.11, this will be different than mine) and this will be used as the hostname

 

9 (3). If you don’t have a monitor or a router with the admin page accessible to you, you could download this and scan your local network.

 

10. Go to PuTTY and enter your hostname under hostname and make sure ssh is elected at port 22 and then click connect 

 

11. The username is root and the password is toor 

Congratulations, you have successfully Sshed into your raspberry pi 0 w but we are not quite done yet :/ 

 

12. Try to run apt-get update in the command line, if this gives you any errors like “failed to fetch archives” don’t worry, first run another command which is ‘ping google.com’ (without quotes) and if you get a response, great! If not then you need to go back and follow the steps again.

 

12 (2). (This step is intended for people with the error, if you do not have the error proceed to step 13) To fix the “failed to fetch archive” error you will need to run this command (without quotes again) ‘

wget -q -O - https://archive.kali.org/archive-key.asc  | apt-key add’ And wait for it to be completely done downloading and all.

***If you do not need GUI and just need Kali for the commandline, great! You’re now done and may proceed to whatever project you were trying to do in the first place, if not, keeping following the steps below.

13. Run this command (once again without quotes) ‘apt-get install xfce4’ it will give you a prompt and just simply press Y

 

14. After this is done, restart your Pi 

OPTIONAL: If your desktop is laggy run the following command ‘apt-get install slim’ (without quotes) and a blue screen will appear and just select slim. This will optimize your GUI and making it even lighter for the Pi, so it could process and handle it much better. First boot will be slow but after that it will boot much much faster.

 

Congratulations, you have fully completed this tutorial, if I have missed anything important PLEASE let me know, and if I said anything incorrect also let me know. If you’re having issues, let me know down below and I will get back to you and try to help you through the issue that you are facing.

 

EDIT: I was trying to install firefox-es which kept crashing while launching it, so a good lightweight browser would be midori and to install that is pretty simple just run the following command on the terminal 'sudo apt install midori'

EDIT: Screens running on GPIO pins WILL NOT WORK ON KALI LINUX, the drivers only support Ubuntu Mate and Raspbian. Just a heads up.

Link to comment
Share on other sites

Link to post
Share on other sites

This is literally dummy resistant. You’d have to be really stupid if you can’t follow these steps. Good job on the tutorial!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×