How to Create a Portable Hacker Station With Raspberry Pi and Kali Linux

Hacking Wi-Fi passwords , spoofing accounts, and testing networks for exploits are all fun enough, but if you want to take the show on the road, you’ll need an easily portable setup. Log into Kali Linux and Raspberry Pi .

This post is part of our Evil Week series on Lifehacker where we take a look at the dark side of goal achievement. Sometimes evil is justified, and sometimes knowing evil means knowing how to defeat it. I want more? Visit our wicked week tags page .

Kali Linux is an operating system built for network penetration testing . You can run it on your laptop to crack nearby Wi-Fi passwords, spoof networks, check for Bluetooth vulnerabilities, and more. Remember, using this knowledge to hack into secure networks is likely to result in arrest and a felony charge – possibly a federal charge of violating the Computer Security Act. You should use this knowledge only for the good, for your own training and play only with those networks that you control. We’ve talked in some detail about using Kali Linux before , so we won’t go into details, but check out our guide for an overview of everything you can do with it . All of this applies to the version of the Raspberry Pi that we will create here.

The Raspberry Pi is a small credit card sized computer that doesn’t require a lot of power to use. When you pair the Raspberry Pi and Kali Linux together, you have a super portable network testing machine that you can take with you wherever you go. In this tutorial, we’ll show you how to run Kali on a Raspberry Pi with a touchscreen. This way, you never have to install Kali Linux on your main computer.

What do you need

Step one: install Kali on your Raspberry Pi

Before we do anything, you need to download and install the Kali Linux Touch Screen Image Build for the Raspberry Pi. It’s like installing any other Raspberry Pi operating system we’ve covered in detail here , but here’s a short version:

How to install Kali to SD card on Windows

  1. Download the Kali Linux Raspberry Pi image for your hardware (B / B + users should get the TFT version, Raspberry Pi 2 the Pi 2 version) and unzip the .img file inside. Note. If you are not using a touchscreen display, download the regular Kali Linux version for Raspberry Pi .
  2. Download Win32DiskImager and unzip the application (.exe file) inside.
  3. Insert the SD card into your Windows computer using a card reader.
  4. Open Win32DiskImager.exe, the application you just downloaded, by double clicking on it. If you are using Windows 7 or 8, right-click it and select “Run as administrator”.
  5. If your SD card is not automatically detected by the application, click the drop-down menu in the upper right corner (labeled “Device”) and select it from the list.
  6. In the application section with image files, click on the small folder icon and select the Raspbian .img file you just downloaded.
  7. Click the Write button and wait for Win32DiskImager to do its job. When it’s over, you can safely remove the SD card and insert it into your Raspberry Pi.

How to install Kali to SD card on OS X

  1. Download the Kali Linux Raspberry Pi image for your hardware (B / B + users should get the TFT version, Raspberry Pi 2 the Pi 2 version) and unzip the .img file inside. Note. If you are not using a touchscreen display, download the regular Kali Linux version for Raspberry Pi .
  2. Download the RPi-sd map builder (be sure to select the correct version for the OS X version you have installed) and unzip the application.
  3. Insert your SD card into Mac using a card reader.
  4. Open the RPi-sd Map Designer. You will be immediately prompted to select a Raspbian image. Select the .img file you downloaded earlier.
  5. You will be asked if your SD card is connected. Since we inserted it earlier, it is, so click “Continue”. You will be presented with SD card options. If you only have one inserted, you will not see anything else in the list and it will be checked. If not, just check only the card you want to use and click OK.
  6. Enter the administrator password and click OK.
  7. You will be asked if the SD card has been removed. This must happen because the application must unmount it in order for it to perform a direct copy. Check again that your SD card is no longer available in Finder. DO NOT remove it from the USB port. If you are sure, click “Continue”.
  8. The RPi-sd card maker finishes preparing your SD card, safely ejecting it, and inserting it into your Raspberry Pi device.

Step two: connect the display

The Raspberry Pi has a GPIO (Universal I / O) that the touchscreen fits into. On a Raspberry Pi, it’s a set of pins in the corner – it should be pretty obvious how they fit together. Go ahead and insert your display into the Raspberry Pi.

Step three: plug everything in and turn on the power

After connecting the display, it’s time to connect everything else. Connect the Wi-Fi adapter and keyboard to the USB ports. Then connect the Pi to a battery pack.

The startup process can be a little slow and clunky here, so don’t worry if it takes a little time. You will first see a white screen for a while before the download process starts. Finally, you are greeted by a login screen.

If you are using a Raspberry Pi 2, you will need to do some tweaks here for the screen to work. If you are using B +, go to the next step.

The Raspberry Pi 2 currently requires additional steps to get the screen working. On initial boot, you are greeted with a sad white screen. Fortunately, getting the screen to work isn’t that hard. Unfortunately, you’ll either need an HDMI monitor to connect the Pi, or you’ll need to login via SSH to get through this part . Plug in any of them and boot the Pi now.

  1. You will see a prompt for username and password from the command line on the Raspberry Pi. Enter the username root and password toor .
  2. Start by mounting your boot partition. Type mount /dev/mmcblk0p1 /boot and press Enter.
  3. Then you will download and install the Adafruit installer. Type wget http://adafruit-download.s3.amazonaws.com/adafruit_pitft_kernel_1.20150420-1.tar.gz and press Enter.
  4. Type tar xf adafruit_pitft_kernel_1.20150420-1.tar.gz and press Enter to extract this file.
  5. Type cd adafruit_pitft_kernel_1.20150420-1 and press Enter.
  6. Type ./install.sh and press Enter. It will take some time. When it finishes, it will ask you to reboot. Say yes and wait for the reboot.
  7. Enter git clone https://github.com/adafruit/Adafruit-PiTFT-Helper.git and press Enter to load the Adafruit screen software.
  8. Ok, now you need to mount your boot disk again. Type mount /dev/mmcblk0p1 /boot and press Enter.
  9. Type cd Adafruit-PiTFT-Helper and press Enter.
  10. Type ./adafruit-pitft-helper -u /root/ -t 28r and press Enter. This sets up your display.
  11. Now you need to fix some issues where the loading screen only shows a blinking cursor. Type sudo apt-get install xserver-xorg-video-fbdev and press Enter.
  12. After that type cd /usr/share/X11/xorg.conf.d/ and press Enter.
  13. Finally, type nano 99-fbdev.conf and press Enter. This will open a text file. You will need to copy the following piece of code into the file:
 Section "Device" Identifier "myfb" Driver "fbdev" Parameter "fbdev" "/ dev / fb1" End of section

When you’re done press Ctrl + X to save and exit.

This should do the trick. Go ahead and type reboot and press Enter to restart the Pi with a working screen.

Step four: login and turn on your wifi card

Now it’s time to log in and turn on the wifi card so you can actually use the tools inside Kali Linux. The Raspberry Pi will automatically recognize your Wi-Fi card, but you still need to log into your network. First thing we need to do is launch the Kali Linux GUI and make sure everything works:

  1. You will see a prompt for username and password from the command line on the Raspberry Pi. Enter the username root and password toor (we will change this later).
  2. Type startx and press Enter to load the Kali GUI. It may take a while for the Pi to boot.
  3. You can now navigate your Pi using the touchscreen and keyboard. Tap the small terminal icon on the dock at the bottom to open a command prompt.
  4. To configure the Wi-Fi card, enter nano /etc/network/interfaces at the command prompt and press Enter to load the configuration file for the Wi-Fi settings.
  5. Add the following lines to the text file you just opened, substituting your network information:
 auto wlan0iface wlan0 inet dhcpwpa-ssid "your network name" wpa-psk "network password"

When you’re done press Ctrl + X to save and exit. Your Wi-Fi card should now be working (although you may have to reboot first).

Step five: change your password

Before doing anything else, you should really change your device’s root password (so someone with similar hacking skills doesn’t gain control of it). Fortunately, it’s simple.

  1. While you are still at the command prompt (if not, just click the terminal icon in Kali to open it again), type passwd and press Enter.
  2. Enter your new password twice.
  3. It is also good to reconfigure your OpenSSH server now so that it is not used by default. Type dpkg-reconfigure openssh-server and press Enter.

Your little portable system is now set up and secure.

What can you do with this device

It is now up to you to decide what you will do with your little portable hacking station. You can use the Pi’s touchscreen for basic navigation and run any program in Kali Linux you want. If you’re unsure of where to start, here are some ideas:

The world is your oyster. Hack responsibly, everyone.

More…

Leave a Reply