Skip to content

Here you can see how I implemented a Raspberry Pi with Kali Linux using a Samsung tablet as monitor (Hacking without a "PC")

Notifications You must be signed in to change notification settings

mmaxirod8/Kali-Linux-on-Android-with-Raspberry-Pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 

Repository files navigation

Kali Linux on Android with Raspberry Pi Zero 2 W --> Hacking without a "PC"

πŸ“Œ Here you can see how I implemented a Raspberry Pi Zero 2 W with Kali Linux OS (for this board) using a Samsung tablet Tab S6 Lite 2022 Edition as terminal/monitor with VNC & Termux


πŸ›’ Things we need

First, we need the following components to carry out the project:

  • Raspberry Pi Zero 2W
  • Power cable for the Raspberry Pi
  • Raspberry Pi Imager software for PC
  • SD card (any size, 64GB recommended) for the Raspberry Pi
  • SD card holder (to load the Kali Linux OS from Raspberry Pi Imager using your PC)
  • Tablet or mobile (Android) device (in this case we used Samsung Tab S6 Lite 2022 version)
  • VNC app for our device (RVNC Viewer on the Play Store) in which we are going to see the GUI of our OS
  • Termux app for our device (to establish the SSH connection and commands, it's like our "PC terminal" but for Android)
  • Connection to the same Wi-Fi network (between the tablet and the Raspberry Pi) --> En este caso utilice la red de datos moviles de mi celular.

πŸ‘‰ Important: If using this mobile data connection, configure it and set it to the 2.4 GHz band, as the Raspberry Pi does not use 5 GHz.


πŸ”Ž Step by step

βš™οΈ 1. Operating System & SD Configuration

Once you have everything you need, proceed as follows:

  • Download Raspberry Pi Imager to your PC from: https://www.raspberrypi.com/software/. This software allows you to install any operating system on your board; in this case, Kali Linux for the Raspberry Pi Zero 2W.
  • Once the app is installed, connect your SD card to an SD card reader and then connect the reader to your computer.
  • Return to the Raspberry Pi software and go to the OS or "Operating Systems" menu. Select Other specific-purpose OS and find Kali Linux among the options. Then, search for Raspberry Pi Zero 2W (Kali Linux ARM image for the Raspberry Pi Zero 2W).
  • Next, we select where we want to install the OS, and click on the SD card holder.
  • We assign a hostname to our Raspberry Pi (this hostname is how it will be read when it appears on our cell phone's mobile data network).
  • Then we fill in the information about our location and language.
  • Following this, it will ask us to complete with the username for the Raspberry Pi (it is recommended to put kali) and its corresponding password (when we make the ssh connection the username will be placed in: ssh username@IP) (in addition, the password will serve to complete the ssh connection, asking for it twice for verification).
  • Complete the information for the network connection to be used on the Raspberry Pi (it will ask for the SSID and password of the wifi network to which we will connect) (in my case I used my cell phone's mobile data network).
  • Finally, we must select the option to activate Enable SSH along with the sub-option of Use password authentication, and click Next.
  • Click on Write and wait a few minutes. Once you've done this, your SD card will be configured.

πŸ“Ÿ 2. Raspberry Pi Zero 2 W initialization

Once our SD card is configured, we'll insert it into our Raspberry Pi board. Before connecting it to the power supply, we need to make sure we've correctly configured our Wi-Fi network, where our two devices will connect (verify that it's a 2.4 GHz band connection and that the network has the same SSID and password that we entered in the Raspberry Pi installer). With that confirmed, we turn on the Wi-Fi network, wait a few minutes, and then power on our Raspberry Pi board. After a few minutes, the board will appear connected to the network with the hostname we assigned in the installer.

πŸ‘‰ Important: In my case, since I used my mobile data hotspot as my Wi-Fi network, if you use this method, you must be careful when powering the Raspberry Pi and then connecting it to the Wi-Fi network. If you unplug it (remove the power) and plug it back in while the Wi-Fi network is active, Kali Linux generates random MAC addresses during startup, and your mobile data network won't recognize your Raspberry Pi board. Instead of the hostname you assigned during the installer, you'll see a different MAC address (and its IP address won't be displayed either). Therefore, to fix this, you must reinstall the OS with the same configuration on the SD card and then reinsert it into the development board.

πŸ—ƒοΈ 3. Android Apps Installation & Execution

To complete the connection between these two devices, we will need the following Android applications:

  • Download Termux, which serves as a command-line terminal to control the Raspberry Pi from our Android device (this app alone would be sufficient, if we have knowledge of Linux commands, to manage the Raspberry Pi). With this app, we will update the terminal on both devices and establish the SSH connection. The steps to follow once installed are:

    --> On the Android device, run the following commands:

    • pkg update && pkg upgrade (we update terminal)
    • pkg install openssh
    • ssh [email protected] (username = the one we assigned to the Raspberry Pi in the installer) @ (Raspberry Pi IP address that appears on the wifi network with X = complete with the digit that appears; if it is a mobile data wifi network, an IP address with the characteristic XX.XX.XXX.XX will appear instead of XXX.XXX.XX.XX)

    --> Once completed up to this point, we will connect to the Raspberry Pi and proceed to execute the following commands in its terminal:

    • sudo apt update (we update terminal)
    • sudo apt install tightvncserver (We downloaded the VNC service onto the board)
    • vncserver (We run the VNC service on the Raspberry Pi)
  • Next, we downloaded VNC, which allows us to use our Android device as a monitor for the Raspberry Pi.

    • To do this, we just need to enter the application on our device, register with an account, then tap on the + symbol, and enter any name and the IP address of our Raspberry Pi with a :1 at the end, that is, (in my case of wifi network) XX.XX.XXX.XX:1.
  • And that's it! βœ… Now we can see our Raspberry Pi with Kali Linux as a computer on our Android device.

I hope you found this helpful and enjoyable. This is for educational purposes. If you found it useful, please leave a star ⭐ Best wishes and much success!

About

Here you can see how I implemented a Raspberry Pi with Kali Linux using a Samsung tablet as monitor (Hacking without a "PC")

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published