Re4son-Kernel

Re4son-Kernel for Raspberry Pi 1/2/3/Zero/Zero W

Adds the following features to the Raspberry Pi:
Sticky Finger's Kali-Pi

  • Over 40% better CPU performance
  • Support for built-in wifi and Bluetooth
  • Support for all common TFT screens
  • Ethernet gadget support
  • Wifi injection patch & Nexmon drivers

Re4son “current stable” kernel highlights:

  • Supports armel (Pi 1, Zero, Zero W) and armhf (Pi 2, 3)
  • Linux kernel 4.9
  • Twice the CPU performance on RPi 3 over stock kernel
  • Over 40% CPU performance increase over stock kernel on Pi2/0/0W (thx to TechMonster)
  • Natively compiled for perfect out of tree module compilations in kali linux
  • Ethernet gadget support to ssh into raspberry pi via USB connection
  • Installs firmware and tweaks to support the onboard bluetooth and wifi chips
  • Includes wifi injection patch
  • “re4son-pi-tft-setup” tool to set up all common touch screens, enable auto-logon, etc.
  • Just run “re4son-pi-tft-setup” tool for your particular screen and you are up and running.
  • Includes nexmon drivers in “nexmon” directory
  • Includes xinput-calibrator in “tools” directory
  • Experimental driver for TL-WN722N v2 with monitor mode
  • Wifi injection support for Alfa AWUS051NH v2
  • Bluetooth package upgraded to Bluez 5.39 makes it faster and more stable
  • NOTE: Before setting up Adafruit screens, please run “./re4son-pi-tft-setup -u” first
  • NOTE: no support for TFT displays from 4D-Systems
  • Any questions or poblems? Post in the forums
    Download the “current stable” Re4son Kernel here
    (sha256sum: de9114f2cad75daf8aa11ce8cc673e9cb73b32ef9745c63eb4374f06864ee43f)

Re4son “old stable” kernel highlights:

  • Previous stable kernel, based on Linux kernel 4.4
  • Support for TFT displays from 4D-Systems
  • Saver alternative if the “current stable” doesn’t support your hardware
    Download the “old stable” Re4son Kernel here
    (sha256sum: ef972856eaac24d2caa1a2b933889455704d942c0ab8e59e135a1d7521d903f2)

Installation

sudo bash
mount /dev/mmcblk0p1 /boot
cd /usr/local/src
## For current stable
wget  -O re4son-kernel_current.tar.xz https://whitedome.com.au/re4son/downloads/11299/
tar -xJf re4son-kernel_current.tar.xz
cd re4son-kernel_4*
./install.sh

## For old stable
wget -O re4son-kernel_old.tar.xz https://whitedome.com.au/re4son/downloads/12009/
tar -xJf re4son-kernel_old.tar.xz
cd re4son-kernel_4*
./install.sh

For Raspberry Pi 3 and Pi Zero W:
– Press “Y” when prompted to install bluetooth and wifi drivers (not required on Raspbian)
– Say “Y” when prompted to enable bluetooth services (you can still disable it later)
– reboot

Bluetooth issues

There aren’t any issues with Bluetooth. but “apt upgrade” sometimes complains about dependency problems if it cannot upgrade bluez. In this case, remove bluetooth, upgrade the system and re-install the re4son bluetooth packages:

## Remove Bluetooth:
cd /usr/local/src/re4son-kernel_4*
./install.sh -r
## Upgrade system
## Re-install Bluetooth:
./install.sh -b

Kernel Headers

The kernel headers are included but not installed by default.
To install them, run the installer again like this:

cd /usr/local/src/re4son-kernel_4*
./install.sh -e

Nexmon Drivers

The nexmon drivers enable monitor mode and frame injection for the build in wifi chips of the Pi3 and Pi0W.
The re4son kernel includes the compiled nexmon drivers and firmware.
To install, reboot after installing a new kernel and run:

cd /usr/local/src/re4son-kernel_4*
./install.sh -x

If you have any problems with the drivers and wish to rollback to to original ones, just run:

cd /usr/local/src/re4son-kernel_4*
./install.sh -o

Head over to the nexmon project for details:
https://github.com/seemoo-lab/nexmon

 

For updates

Images with Re4son Kernel (Best to use Chrome to download)

Bluetooth

You are now ready to pair your devices, just like this:

bluetoothctl

[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[bluetooth]# pair 00:1F:xx:xx:xx:xx
Attempting to pair with 00:1F:xx:xx:xx:xx
…snip…
Pairing successful
[bluetooth]# trust 00:1F:xx:xx:xx:xx
[CHG] Device 00:1F:xx:xx:xx:xx Trusted: yes
[bluetooth]# connect 00:1F:xx:xx:xx:xx
Attempting to connect to 00:1F:xx:xx:xx:xx
Connection successful

Voila – there it is, Bluetooth device connected.

Ethernet Gadget

The Re4son-Kernel supports ethernet gadget mode and both Pi zero armel images on this page have the usb0 interface enabled out of the box to allow the initial setup without any additional hardware except a micro usb cable.
Below the steps to get it working:

  1. Image a micro SD card
  2. Leave the card in your computer and edit the following two files in the /boot partition:
    – cmdline.txt: Add “modules-load=dwc2,g_ether” after “rootwait
    – config.txt: Add “dtoverlay=dwc2
  3.  Insert the card into your Raspberry Pi zero
  4. Insert the micro USB cable into the usb port of the Pi (not the power port) and your computer
  5. Wait for the Pi to boot up and enable ICS for the newly created adapter on your PC or MAC (Don’t have VM’s running at this point)
  6. Wait a minute and ssh into “kali.mshome.net” from you PC (not sure about Mac).
    – If the name resolution doesn’t work, find the IP address of your Pi via:

    # In Windows:
    @echo off & cls & (FOR /L %i IN (1,1,254) DO ping -n 1 -w 10 192.168.137.%i | FINDSTR "bytes=") & echo on
    
    # In *NIX:
    fping -a -g 192.168.137.0/24

    Sticky Fingers Kali-Pi images come with a nifty bonjour treat that allows you to connect to kali-pi.local – More about this in the forum

Voila – there it is, ssh connection via usb cable.

Setting up wifi via the command line 

To configure a wifi network, disable network-manager, configure /etc/wpa_supplicant.conf and /etc/network/interfaces:

systemctl stop network-manager && systemctl disable network-manager
/sbin/ip link set up wlan0
/sbin/iw wlan0 scan|grep SSID ## Pick your SSID
wpa_passphrase <Your SSID> >> /etc/wpa_supplicant/wpa_supplicant.conf
<... Enter passphrase and press enter ...>
nano /etc/wpa_supplicant/wpa_supplicant.conf # delete the clear text passphrase

Edit “/etc/network/interfaces” and add the following stanza:

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

That’s all, happy hacking

Source 

The Re4son-Kernel has been built using the Re4son-Kernel-Builder using the Re4son-Raspberrypi-Linux source repo.

More details can be found here:
https://whitedome.com.au/kali-pi

For questions or comments please join the discussion in our forum:
https://whitedome.com.au/forums