Installing Kali Linux on a Raspberry Pi

If you haven’t used, Kali Linux is an excellent tool for penetration testing. It’s widely used by Information Security experts and can help determine vulnerabilities in your environment. You do need to know how to use all the tools that come pre-installed in order for you to test the environment, but I will definitely post about some of these at another time. Today, I am just looking at installing Kali Linux Distro on a Raspberry Pi.
I know what some of you are thinking, why would you install this on a Raspberry Pi, why not install it on a desktop or laptop? I’m glad you asked. Having Kali Linux on a Raspberry Pi can make it ultra portable, a very lightweight operating system, a great tool in the bag of tricks, and very interchangeable. Having the Raspberry Pi is so convenient, you can take it to any location and plug in and start using. Because Kali Linux distro is smaller and doesn’t include all the bells and whistles that normal operating systems use, it runs incredibly well on a Raspberry Pi, and it’s very widely supported. It is also nice to have as an extra tool in the bag when testing environments. finally its interchangeable, as in you can switch the Micro SD card with some other install of Linux or a different OS (Raspbian or Ubuntu or even IoT Windows).
Before we begin, I want to recommend that you do not do this on a work network, as most organizations that have any type of information security network, will automatically become suspicious of you downloading Kali Linux. Remember, technically, this operating system is used for hacking, finding vulnerabilities, and exploiting weaknesses in an organizational environment. You will want to do this at home or in a allowed classroom setting (in other words: get permission if you are not sure). Disclaimer: I am not responsible for what anyone does with the information I am providing, nor do I take responsibility if your organization takes action upon you for using, installing, executing on your work, home or any other environment. Please use responsibly.
First, you want to start out you want to download the .img file from the kali linux arm image from https://www.offensive-security.com/kali-linux-arm-images/

Depending on what version of raspberry pi you have, will dictate which Kali Linux distro to install. It will start out downloading .torrent file. This will take moments to download. While that is going I would recommend downloading bittorrent or some other torrent downloader to get the image file.
Once the download is finished it will still not be an image (.img) file just yet. It will be a .xyz file. You will want to download 7-zip (https://www.7-zip.org/) to convert the .xyz file to a .img file.

Once you convert this file, then you are ready to install on the Micro SD card. Make sure you have belenaEtcher (https://www.balena.io/etcher/) on your PC and plug in your Micro SD card. Verify that the correct image is selected and that the correct disk is selected.

Then select Flash! It will immediately start reimaging the Micro SD card with Kali Linux. Once this is completed, you will remove the Micro SD card and plug it into your Raspberry Pi. You should see the following screen:

If you don’t see that, you may need to restart from the beginning, and re-try to install on the SD card.
Once inside Kali Linux it will look like this:

I hope you enjoy learning about Kali Linux as I have. It really can be a great tool for any Information Security Engineer looking to find vulnerabilities and learn about Digital Forensics.
Fixing Kali Linux Raspberry Pi clock issue:
Install ntpdate:
sudo apt-get install ntpdate
know your local ntp server:
ntpdate 0.north-america.pool.ntp.org
create a folder in root and call it scripts
type: cd scripts
type: nano start.sh
add the following command:
sudo ntpdate 0.north-america.pool.ntp.org
ctrl c to exit, select y for yes, and press enter to keep name as is.
type: cd ~
cd /etc/
nano crontab
on the last line type:
@reboot /root/scripts/start.sh
(Whatever you do DON’T add a script for trying to automate apt-get updates/upgrades/autoremove. It will cause issues in Raspberry pi and will prevent you from logging in remotely or through ssh. If you try this you will have to log in manually and remove the script for this… you have been warned.)
ctrl c to exit, select y for yes, and press enter to keep name as is.
verify that it works by reboot now command.
Display Settings and Ethernet port issue:
When I installed on Raspberry Pi 4 I noticed there was an issue with my network Ethernet cable connection. It was receiving IPv6 but not IPv4. I checked the Ethernet Network and it showed device not managed. I ran the following:
sudo nano /etc/NetworkManager/NetworkManager.conf
and changed the False to true as shown below:

Note: Usually, you will want to run sudo service network-manager restart and reboot the Raspberry Pi but since we are configuring the display, we will wait until the end.
Lastly, to fix the screen, I had to go into the following:
sudo nano /boot/config.txt
Then removed the # from in front of the
disable_overscan=1;
While I did all that I ran:
sudo apt-get update
and
sudo apt-get upgrade
Waiting for updates… Taking sooo long on slow network…

Finally rebooting with:
sudo service network-manager restart
reboot
Testing now and, The screen and the Ethernet Port is working properly.
-Dave (Cyber-Dad)