How To Install Kali Linux On The RasPad - R2
How To Install Kali Linux On The RasPad - R2
How To Install Kali Linux On The RasPad - R2
by Jason Andreas
Last Updated 8/2/18
Preface: This guide is a combination of many webpages that I found while scouring the
internet. I will make every attempt to give credit to the original authors if/when possible. My
apologies in advance if I miss giving credit to anyone where it is due!
Also, I consider this guide a starting point. I would love for this to grow into a collaboration
effort with many of you participating in making this guide better. You all have unique
insights, and the more minds that work together can only make the RasPad better!
A Windows PC.
A micro SD card at least 16GB in size. I used a SanDisk Ultra 64GB XC1 micro SD card. I
highly recommend using a high speed card. The type of SD card you use can make a BIG
difference in performance.
The SD Memory Card Formatter for Windows.
https://www.sdcard.org/downloads/formatter_4/eula_windows/index.html
A micro SD to USB adapter or micro SD to SD adapter (if your PC had an SD card reader).
7-zip for Windows (on your Windows PC)
https://www.7-zip.org/
Kali Linux for the Raspberry PI 3B and 3B+ (Called Kali Linux Sticky Fingers)
https://docs.google.com/uc?id=1QxYRXwP7NV9JHfWh_owFJlhvhofToV6U&export=dow
nload#StickyFingers-Kali-Pi-armhf-180617.img.xz
Etcher (on your Windows PC).
https://etcher.io/
GParted (we will install this your RasPad).
A USB Keyboard and mouse (until we get Bluetooth operational).
Step 1. Format your microSD card. Even if this is a new microSD card, I still recommend
formatting it using the SD Memory Card Formatter for Windows. This tools not only
formats the card, it does so in a way that the Kali Linux install can read/access.
Step 2. Download the Kali Linux Sticky Fingers install. A direct link to the download can be
found here:
https://docs.google.com/uc?id=1QxYRXwP7NV9JHfWh_owFJlhvhofToV6U&export=downlo
ad#StickyFingers-Kali-Pi-armhf-180617.img.xz
Click Download Anyway. I know that seems scary, but this is a legit file! It will then
download the file StickyFingers-Kali-Pi-armhf-180617.img.xz to your PC.
Step 3. Assuming you have already installed 7-zip on your PC, extract the Kali Linux .img file
by right clicking on the StickyFingers-Kali-Pi-armhf-180617.img.xz file and going to 7-zip,
Extract Files. This will create a folder a folder named StickyFingers-Kali-Pi-armhf-
180617.img and contain a file named StickyFingers-Kali-Pi-armhf-180617.img inside of that
folder.
Step 4. Open Etcher, Click Select Image, and choose the StickyFingers-Kali-Pi-armhf-
180617.img file.
Click Select Drive and Choose the drive letter of your MicroSD card.
BE CAREFUL TO SELECT THE CORRECT DRIVE! Click Continue
Click Flash! It might take as long as 20 minutes to complete this process. Once it is done,
you will have a bootable Kali Linux MicroSD card.
It will give a Flash Complete message once it it done.
Step 5. Install the Micro SD card into your RasPad. Plug the Touch Screen USB cable into a
USB port. Plug in a USB Keyboard and Mouse, then power on the RasPad.
It will boot up Kali Linux and prompt for a username and password
User is: root
Password: toor (We will change this later on)
At first login it will bring you up to a screen that says “Welcome to the first start of the
Panel”. Choose “Use default config”
Step 6. – Verifying network access. If you have an Ethernet cable, plug it in now. Otherwise to
connect to Wifi, click the little network icon in the upper right hand side of the screen (next to
the clock). Select the network, type in your Wifi password, and click connect.
Now that we are connected, we need to verify that we have and IP. To do that open a terminal
by clicking the terminal icon down at the bottom of the screen.
Keep the terminal window open. It will be used in the next step.
Step 7. Resizing the Root partition (/sdb2) on the microSD card.
However before proceeding any further in Kali linux, we will need to increase the partition
size of the /root partition.
The Kali image is based off of an 8GB SD. This is totally inadequate (thus the need for at
least a 16GB SD). If you skip this step and do not increase your partition, you are
guaranteed to run out of space and corrupt your copy of Kali!
To increase the /root partition, we must install a program called GParted Partition Manager.
To install Gparted, open a terminal by clicking the terminal icon down at the bottom of the
screen.
Next, right click on the ext4 partition (called mmcbkl0p2 on my RasPad) and left click
Resize/Move
Ds dfs df
s dfds
It will ask if you are sure you want to do this. Click Apply.
Once it is completed, it will give a Completed Operations message. Click Close. Then exit out
of Gparted.
Step 8 (optional) – Installing VNC on your RasPad
This step is not necessary if you don’t want to remotely control the RasPad from another
device. I will do it so that I can show you how it is installed, and be able to take some higher
quality screen shots going forward.
Rather than reinvent the wheel, I refer you this website. Follow the instructions step-by-step
and it will enable VNC.
https://dephace.com/install-vnc-viewer-on-raspberry-pi-with-kali-linux/
I know this is a LOT of stuff to type in the terminal window. Just take is slowly and double
check what you type to ensure that it is correct. It will be WELL worth it when you are able to
VNC into the Raspad!
Also make sure you restart your RasPad after completing these steps. Then try to VNC into the
RasPad. It should work now!
Step 9. Disable Screen Lock
One of the annoying things that I noticed, was that when the screen saver enabled, I would lose
access to VNC, and have to type in a password on the device. Since there is no onscreen
keyboard, this is really annoying. So we will turn it off!
To do this, go to Setting, and Power Manager.
The first thing we want to turn off is having the Raspad hibernate. This can be done by going
the Display tab and sliding the “Switch off after” to Never.
Then go the Security tab, and setting “Automatically lock the session:” to Never.
Make sure your keyboard is powered on, Press Fn and C. That will put your keyboard in pairing
mode. On your RasPad, click Search to Search for Bluetooth Devices
Select the Bluetooth 3.0 Keyboard and Click Setup. It will open a pairing wizard.
Pair Device is selected by default. Click Next
It will then say “Pairing in progress”. Type in the code that was displayed on the screen on the
wireless keyboard and press Enter
At this point it will say Connect to: Select Human Interface Device Service (HID) and Click Next.
It will then say Device added and connected successfully. Click Close.
Note – Sometimes when you reboot, it will not automatically reconnect to the keyboard. If it
does this, put your keyboard in pairing mode (Fn + C), then click on the Bluetooth icon in the
upper right hand of the screen. Go down to Recent Connections, and Human Interface Device
Service. It should then reconnect and the keyboard should work.
Step 11 – Changing the root password
We really need to change the root password to something else.
To do this, open a terminal window and type:
passwd root
It will ask you to type in a new password, and then to confirm it.
The root password is changed.
The way kali works by default, it prompts for an ID and password when it boots up. This can
really be annoying on a touch based device like the RasPad. So let’s turn it off.
The information below is based upon this website:
https://whitedome.com.au/re4son/topic/enable-auto-login/
You will see a screen like this. Press Y and the Raspad will reboot. (Note It took about 2 minutes to
reboot).
Once the RasPad boots back up, it will go directly to the desktop without asking for you to log
in.
Click on the Fonts tab, and change the DPI. I found around 145-150 was a good size to be
touch screen friendly.
Now we should make the “Start Menu” a little bit bigger for ease of use. Click Applications,
Setting, and Panel.
I have found that we only need to make the menu just slightly bigger to be touch friendly.
In the Display Tab, underneath Measurements, change the Row Size to 35 and click close. I
found that any larger than that, then it begins to run into the applications menu and I was
accidentally opening programs.
Now before opening Synaptic, we need to import some GPG keys. We will be adding some
additional sources to Synaptic, and this step is essential to make this work.
So from the terminal window type these 3 commands:
wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key
apt-key add raspberrypi.gpg.key
wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -
Once Synaptic is installed (and the GPG keys are added), you can open Synaptic under
Applications, System, Synaptic Package Manager
Now we want to add some additional sources. To do this click Settings, Repositories
Once the Repositories windows opens. Maximize the Repositories window to see it better.
Then click New, and type in the following (be mindful of spaces).
URI:
http://archive.raspberrypi.org/debian
Distribution:
stretch
Section(s):
ui main
http://mirrordirector.raspbian.org/raspbian
Distribution:
stretch
Section(s):
Now that we have Synaptic installed, we can simply search for each of them and install them
one at a time. Since this is a bit repetitious, I will only show you how to install the first one on
the list (Blue J).
So in Synaptic, click on the Search button and type in BlueJ, and click search.
Once it finds the program, right click on it, and left click Mark for Installation.
Sometimes it brings up a message to Mark additional required changes, click Mark
It will ask you if you want to apply the following changes. Click Apply.
That pretty much it. Just repeat the same process for any other software you want to install.
Step 16 – Prerequisites before installing Sunfounder’s Dragit software
I’m finding that it is quite a challenge to get the Dragit software working. The further I dig, the
more I seem to need.
To start with, we will need the Raspi-Config software. This allows us to change a number of
settings like enabling SSH access, to setting the time. In this case, we need to enable I2C.
So Open the Terminal window and type in the following:
apt-get install raspi-config
raspi-config
It will bring up the Raspberry Pi Software Configuration Tool. Keep in mind that I have a Raspberry PI
3B+. These menus may look differently on the 3B.
For Raspberry Pi 3B users, you may want to refer to this Sunfounder link:
https://www.sunfounder.com/learn/appendix-1-i2c-configuration-sensor-kit-v2-0-for-b.html
Would you like the ARM I2C interface to be enabled? Select Yes.
./build
gpio readall
All of this work has been building to this point. Now we can begin to actually do something with this
RasPad. So next we are going to install Sunfounder’s new programming language Dragit.
To get Dragit installed, open a Terminal window and type in the following:
wget https://s3.amazonaws.com/sunfounder/Raspberry/dragit_installer.py
It will then download the software to your RasPad. Once it is done downloading type the following:
python dragit_installer.py
It will bring an installer. Dragit is already selected by default. Just press Tab and the cursor
will go down to OK. Then press Enter.
It will then install the Dragit software.
At this point you need to reboot your Raspad for the changes to take effect.
Once your Raspad is rebooted, you should be able to open the Firefox browser and type:
localhost:8000 and Dragit will load.
Note - As of this writing, I was not able to get dragit to load. I am working with Sunfounder
to find a fix.
-All went perfectly until step 10 Bluetooth. Typed in the apt-get install blueman when prompted and got lots of
fetch errors. At the end of these it suggested running apt-get update. I did this and that ran OK. Then retried the
blueman install and it worked. Continuing now with rest of the install.
-I probably should add and apt-get update prior to having you run the commands. That kind of runs a refresh with
the servers and checks to see if there are any updates to any of the installed apps.
-I actually rebuilt my RadPad from scratch (no pun intended) for this R2 revision to make sure I didn't miss anything.
I had not installed Scratch yet, so I just now went to Synaptic and searched for Scratch. It was way down on the list,
but I was able to select and install Scratch and Scratch 2.
-Linux is case sensitive. Also keep that in mind when typing in commands in the terminal window.
-These are the 3 commands you need to type in to add the additional sources. I recommend setting up VNC and
connecting to your RasPad via VNC. Then you can simply copy and paste those commands directly into the terminal
window.
wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key
apt-key add raspberrypi.gpg.key
wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -
-You will get errors and some software will not show up in synaptic if you don't import those gpg keys and then add
the repositories. Linux is unforgiving. An extra space or a Capital letter and it won't work correctly