Kali Linux 2018.2 On The ODROID-XU4

Note to our readers: This article setup is running With A Touchscreen And Alfa AWUS1900 WiFi Adapter Support

Kali Linux is one of the best systems for penetration testing. It is available for various ARM-based devices and for a short time the ODROID-XU4 was available on the official Kali website. Unfortunately, an image is no longer available. This article covers the following things:

  • How to install Kali Linux 2018.2 on ODROID-XU4
  • How to get touchscreen recognize multitouch gestures
  • How to make Alfa AWUS1900 work with ODROID-XU4

Disclaimers

  • You are taking full responsibility for your actions
  • This guide is easy to follow, nevertheless, don’t skip any sections that seem easy and read each on till the last one
  • Make sure to backup your data
  • Don’t worry about warning messages during the execution of the make command
  • Some faults might still remain, although currently none were detected. Make sure to post any problems to the forum thread at https://forum.odroid.com/viewtopic.php?f=96&t=31737
  • The author allows anyone to share the material given below, but you must include this article as the source

Figure 1 - Kali Linux 2018.2 on ODROID-XU4 with Alfa WiFi adapter connected

Installation Download the ‘Kali Linux Odroidxu3’ image from the official Kali Linux website: https://www.offensive-security.com/kali-linux-arm-images/ and flash it to a eMMC or microSD. Make sure your XU4 is connected to the Internet. Boot your XU4 and login using using a user of ‘root’ and password ‘toor’. Choose to use the default configuration for the Panel. If you are using a multitouch display, e.g. ODROID-VU5, you will notice, that graphics will appear glitchy and the touchscreen won’t react to touches. Though, USB 3.0 ports should work fine. We are going to compile and update the Linux kernel to v4.14, which will significantly improve the overall performance and fix known faults.

WARNING! If you are using a multitouch display, make sure your XU4 does not go to sleep during the kernel update, otherwise you may not be able to turn it on without rebooting. If your screen starts flickering, it means that the XU4 is about to sleep. You are recommended to temporary increase all three values in [Applications > Settings > Power Manager > Display] to their maximum value.

Launch the terminal and now we are ready to begin preparation. Do the basic process of a software update and then install some packages that are required for further steps:

$ apt update && apt dist-upgrade -y
$ apt install gcc g++ build-essential libssl-dev bc -y
After this is done, we shall start compiling and updating the kernel:
$ cd /usr/src
$ git clone --depth 1 https://github.com/hardkernel/linux -b odroidxu4-4.14.y kernel-4.14
$ cd kernel-4.14
$ make odroidxu4_defconfig
$ make -j8
Note: execution of the command mentioned above will take about 30 minutes.
$ make modules_install
$ mount -o rw /dev/mmcblk0p1 /boot
$ cp -f arch/arm/boot/zImage /boot
$ cp -f arch/arm/boot/dts/exynos5422-odroid*dtb /boot
$ sync
Now we need to choose proper drivers for the GPU. There is a mali-t62x-x11-driver package available via apt, but the XU4 will have some dependency faults with it. Therefore, we will install the driver from Hardkernel's Ubuntu repository and adapt it to work with Kali Linux:
$ wget -O mali http://deb.odroid.in/5422-s/pool/main/m/mali-x11/mali-x11_20180717-r17p0-a52903b-11_armhf.deb
$ dpkg -i mali && rm mali 
$ cd /usr/lib/arm-linux-gnueabihf
$ sos='libEGL_mesa.so.0.0.0 libEGL.so.1.1.0 libGLESv2.so.2.1.0'
$ for so in $sos; do rm -rf $so; ln -s mali-egl/libmali.so $so; done
Now the driver is ready. Remove unnecessary packages and reboot:
$ apt autoremove -y
$ reboot
After the XU4 rebooted, check that the kernel has been updated successfully:
$ uname -r
You should see 4.14.55+. Touchscreen and other modules should be working now. Enjoy your updated Kali Linux on XU4.

Multitouch gesture recognition

Although the touchscreen is now working, it's only capable of handling single touches. Let's teach it to recognize multitouch gestures. There is a tool called ‘touchegg’, that handles multitouch activities, but it has bugs, when it comes to a single touch mode. Therefore, we will install another tool called ‘tatchi’, that will allow us to switch between single (default) and multi (touchegg) -touch modes with just one click. Installing touchegg is a bit tricky, due to its dependencies. So let's get them:

$ apt install netselect-apt libqt4-dev libxtst-dev libxv-dev multiarch-support -y
$mirror="$(echo $(netselect-apt jessie -a armhf -o /dev/null) | awk '{print $1;}')pool/main/g/geis/libgeis"
$ debs='1 -dev'
$ for deb in $debs; do temp=$(mktemp); wget -O $temp $mirror$deb'_2.2.16-1+b1_armhf.deb'; dpkg -i $temp; apt install -f -y; rm $temp; done
Now we are ready to install touchegg:
$ git clone https://github.com/JoseExposito/touchegg
$ cd touchegg
$ qmake
$ make
$ make install
Now we need to install tatchi:
$ git clone https://github.com/mopo3ob/tatchi
$ cd tatchi
$ make install add
$ cd ../..  && rm -r touchegg
A hand icon should appear in the top-right corner, of the panel. Tap it once to switch to multitouch mode. The icon will now change from one pointing finger to two fingers. This means, that touchegg is ready for recognizing multitouch gestures. Try to scroll the terminal with two fingers. Tap the hand button once again, to switch back to single touch mode. It’s as simple as that.

You will probably want to customize the configuration for multitouch gestures. You can do so by editing ~/.config/touchegg/touchegg.conf. Explore touchegg's wiki for more information: https://github.com/JoseExposito/touchegg/wiki.

Configuring the Alfa AWUS1900 WiFi adapter

Now that we have a fully operational XU4 running the latest release of Kali Linux, it’s time to get our hands on the Alfa AWUS1900, which is considered to be the best WiFi adapter available for penetration testing. The AWUS1900 allows router connection speeds of up to 1900 Mbps, which requires an USB 3.0 port. The ODROID-XU4 is one of the few microcomputers that can use such a powerful quad antenna. To get it working we only need to install the driver for the Realtek RTL8814U chipset, which is the chipset AWUS1900 adapter uses.

$ git clone https://github.com/aircrack-ng/rtl8812au -b v5.2.20
$ cd rtl*
$ make ARCH=arm
$ make install
$ cd ..  && rm -r rtl8812au
Driver installation is completed. Plug in your AWUS1900 and a blue led indicator will turn on.

Figure 2 - Blue led indicator on Alfa AWUS1900 WiFi adapter

Now let’s uses ifconfig with our AWUS1900:

$ apt install net-tools
$ ifconfig
You are now able to see wlan0, provided that you are using an Ethernet cable for the Internet. To put AWUS1900 in monitor mode manually, execute following commands:
$ airmon-ng check kill
$ ip link set wlan0 down
$ iw dev wlan0 set type monitor
$ ip link set wlan0 up
$ service NetworkManager restart
Give it a test by scanning for hotspots:
airodump-ng wlan0
It shall be able to detect nearby hotspots. Send ^C (Control+C) to stop scanning.

We now have one of the most powerful microcomputers running Kali Linux 2018.2 and working with an ODROID touchscreen and Alfa AWUS1900. Thanks to @odroid, @robroy and @mad_ady for helping me to find solutions to the questions covered in this article.

For comments, questions, and suggestions, please visit the ODROID Forum thread at https://forum.odroid.com/viewtopic.php?f=96&t=31737.

Be the first to comment

Leave a Reply