Carrying a machine everywhere, which is capable of doing ethical hacking without getting noticed, is important in some hacking related tasks for which you may not like to carry a big laptop. For this we need a smart device to test the exploitation and network penetration and injection of malware and viruses. Ethical hacking requires small-size machine that is as capable as a full-specs laptop but small enough to be hidden and carried anywhere. So, here is how you can make the world’s smallest hacking device that has a full touch keyboard.
To begin with, we have to decide some exciting specs for the laptop, so that we can select the hardware parts and operating system (OS) for the hacking machine accordingly. The following are some features we want in our laptop for hacking:
Linux is considered to be the best operating system (OS) for ethical hacking and Kali is one of the best Linux flavoured OS because it comes with pre setup of various exploitation tools for penetration hacking and testing, such as Metasploit, Aircrack-ng, and Wireshark.
Designing the laptop
After collecting the components listed in the Bill of Materials, we need to design the case or body of the laptop that is to hold the hardware inside it safely. We may design the laptop body in three parts. First, the base part where we keep the main hardware, viz, Raspberry Pi, battery, and charging system. In the base we make two cuts: one in front for the Ethernet and USB and the other for power and charging of the battery.
Next, we design the top cover of the base to hold a touch e-paper based keyboard. We make a cut in the top cover to fix the touch panel keyboard inside it, as shown in Fig. 7.
Next, we design the LCD panel’s support for the laptop. For that we make the enclosure in the same size as the display and keep the thickness same as well.
After designing the laptop body, we can 3D print its parts.
Before proceeding further, we need to prepare the Raspberry Pi board with Kali Linux. For that, go to Kali Linux official website and download its latest version for an ARM based device like Raspberry Pi. Next, download the Raspberry Pi disk imager and install it. Insert the SD card in USB drive and prepare it with Kali Linux OS using Raspberry Pi disk imager by choosing Kali Linux OS image file in Raspberry Pi disk imager.
Preparing OS for SPI display
For our laptop we can choose any display for Raspberry Pi that is up to 8.9cm (3.5-inch) in size. An HDMI based touch display is recommended as we are using a touch e-ink display for the keyboard panel, which is an SPI, and two SPI displays can cause conflict in communication. However, the SPI touch e-ink display used for keyboard uses only its touch function that is I2C based, so the SPI of other displays does not cause that much of a problem.
An SPI based display was used in the prototype because it had already been bought, but use of 8.9cm HDMI touch display is recommended instead. By using the HDMI display, you can skip the following steps (required for SPI display) and go straight to the keyboard preparation section.
To use the SPI display, we need to install the drivers and setup the SPI touch display. So, open the terminal and run the following command in Linux terminal to install the driver and setup the display for Raspberry Pi:
git clone https://github.com/goodtft/
chmod -R 755 LCD-show
After installing the driver, connect the SPI display, as shown in Fig. 11, and solder the pins to Raspberry Pi as per Table 2.
Preparing the touch keyboard
We need to prepare the keypad system for the laptop for giving input to the laptop. As we wish to make a full touch keyboard panel, we are using the touch e-ink display as the touch based keypad, but we need software to use it as keyboard.
For making the touch keyboard, we need to display the keys on the e-ink display. So, download a vector image having the keys on the keyboard. Resize the image to the size of e-ink display, then download the library for touch e-ink display. Here we are using the waveshare touch e-ink display, so open Linux and run the following command to get the library and driver for the e-ink display:
sudo pip3 install gpiozero
tar zxvf bcm2835-1.68.tar.gz
sudo ./configure && sudo make && sudo make
check && sudo make install
sudo apt-get install wiringpi
sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo pip3 install RPi.GPIO
sudo pip3 install spidev
git clone https://github.com/waveshare/
Go to Example and run the code to show the image on e-ink display. In that code change ‘pic’ to keyboard layout vector image and run the code (Note: Attach the e-ink touch display with Raspberry on its GPIO pins before running the code) and then turn off the Raspberry. The display will remain with the same image even after power is disconnected, until you refresh the display. E-ink display uses a special technology where the ink molecules that are activated electrically remain on the display, like the printed ink on paper.
Next, create the code that will identify the touch points on the touch e-ink display that we touch and convert those keyboard signals to inputs for Kali Linux in Raspberry Pi. To input signals of mouse and keyboard virtually, without actually connecting any mouse or keyboard, we have many Python libraries. In prototype we used pynput Python library module to give a virtual keyboard input to Raspberry Pi. So, open the Linux terminal and run the following command to install pynput:
sudo pip3 install pynput
Next, prepare the code that will check the touch points and convert them into key input for each key that we touch on the keyboard.
Import the library and pynput modules for virtual input to Raspberry Pi, as shown in Fig. 13, and check the touch points on display where we will be touching the e-ink display that is being used as a keyboard. Next, create a while loop and define the function to use pynput for the keyboard inputs to Raspberry Pi, as shown in Fig. 14.
Now we need to change the SPI(0,0 ) of the Raspberry Pi SPI port to a second SPI. Open the lib folder and make a change in the code file of e-ink touch display by changing to SPI(1,0) in every file where SPI(0,0) is written and save that. Next, enable the second SPI port of Raspberry Pi by adding the line marked by arrow in Fig. 15 in config.txt file of Raspberry Pi in boot folder in root of Raspberry Pi.
Connect the e-ink display to Raspberry Pi pins as shown in Table 2. As we are using only touch part, and touch controller is I2C based, we are connecting the pins of touch controller of e-ink display only to Raspberry Pi.
Preparing the laptop
After setting up everything in the library and modules, and connecting the components and soldering, fix all the hardware in the 3D-printed laptop case that we made earlier. Fix the components as shown in Fig. 17 through Fig. 20. Fit the battery and charging system inside the case, leaving Raspberry Pi 5V pin and GND pin outside.
Congratulations! The world’s smallest hacking laptop is ready to show its magic. Power the laptop and run the keyboard code. You are now ready to use it as a hacking machine that is as powerful as a commercially available hacking laptop, in spite of its tiny size.
You can carry the laptop anywhere for penetration testing, securing network, and then testing the network security. You can also use it, of course, like any other laptop for normal working, playing games, watching videos, or browsing the internet. Whatever you do on your regular laptop, this smallest laptop is capable of doing the same.
Ashwini Kumar Sinha is a technology enthusiast
Please note this article is transferred from Electronics For You April 2022 Issue. This article was first published online.