- Introduction
- Base Images
- Virtualization
- USB
- Kali On ARM
- Acer Tegra Chromebook 13"
- ASUS Chromebook Flip
- BeagleBone Black
- Cubieboard 2
- Cubietruck
- CuBox
- CuBox-i4Pro
- EfikaMX
- Galaxy Note 10.1
- Gem PDA
- HP Chromebook
- MiniX
- NanoPi2
- ODROID U2
- ODROID-C1
- ODROID-XU3
- Raspberry Pi
- Raspberry Pi - Disk Encryption
- Raspberry Pi 2
- RIoTboard
- Samsung ChromeBook
- Samsung Chromebook 2
- SS808/MK808
- Trimslice
- USB Armory
- Utilite Pro
- Containers
- WSL
- Cloud
- Kali NetHunter Documentation
- NetHunter KeX Manager
- Building a New Device File
- Building NetHunter
- Installing NetHunter from Windows
- Installing NetHunter On the Gemini PDA
- Modifying the Kernel
- NetHunter Application - Csploit
- NetHunter Application - DriveDriod
- NetHunter Application - Keyboard
- NetHunter Application - Router Keygen
- NetHunter Application - Shodan
- NetHunter Application - Terminal
- NetHunter Application Update
- NetHunter BadUSB Attack
- NetHunter Chroot Manager
- NetHunter Components
- NetHunter Custom Commands
- NetHunter DuckHunter Attacks
- NetHunter Exploit Database SearchSploit
- NetHunter HID Keyboard Attacks
- NetHunter Home Screen
- NetHunter Kali Services
- NetHunter MAC Changer
- NetHunter Man In The Middle Framework
- NetHunter MANA Evil Access Point
- NetHunter Metasploit Payload Generator
- NetHunter Nmap Scan
- NetHunter VNC Manager
- Porting NetHunter to New Devices
- Testing Checklist
- Wireless Cards and NetHunter
- Kali Linux on Android
- The Android Hacking Landscape
- General Use
- Tools
- Troubleshooting
- Kali Development
- Public Packaging
- Building Custom Kali ISOs
- Generate an Updated Kali ISO
- Live Build a Custom Kali ISO
- ARM Cross-Compilation
- Custom Beaglebone Black Image
- Custom Chromebook Image
- Custom CuBox Image
- Custom EfikaMX Image
- Custom MK/SS808 Image
- Custom ODROID X2 U2 Image
- Custom Raspberry Pi Image
- Preparing a Kali Linux ARM chroot
- Rebuilding a Source Package
- Recompiling the Kali Linux Kernel
- Community
- Policy
Custom EfikaMX Image
The following document describes our own method of creating a custom Kali Linux EfikaMX ARM image and is targeted at developers. If you would like to install a pre-made Kali image, check out our Install Kali on an EfikaMX article.
01. Create a Kali rootfs
Build a Kali rootfs as described in our Kali documentation, using an armhf architecture. By the end of this process, you should have a populated rootfs directory in ~/arm-stuff/rootfs/kali-armhf.
02. Create the Image File
Next, we create the physical image file, which will hold our EfikaMX rootfs and boot images.
apt install -y kpartx xz-utils sharutils
cd ~
mkdir -p arm-stuff
cd arm-stuff/
mkdir -p images
cd images
dd if=/dev/zero of=kali-custom-efikamx.img bs=1MB count=7000
03. Partition and Mount the Image File
parted kali-custom-efikamx.img --script -- mklabel msdos
parted kali-custom-efikamx.img --script -- mkpart primary ext2 4096s 266239s
parted kali-custom-efikamx.img --script -- mkpart primary ext4 266240s 100%
loopdevice=$( losetup -f --show kali-custom-efikamx.img )
device=$( kpartx -va $loopdevice| sed -E 's/.*(loop[0-9])p.*/\1/g' | head -1 )
device="/dev/mapper/${device}"
bootp=${device}p1
rootp=${device}p2
mkfs.ext2 $bootp
mkfs.ext4 $rootp
mkdir -p boot
mkdir -p root
mount $bootp boot
mount $rootp root
04. Copy and Modify the Kali rootfs
rsync -HPavz /root/arm-stuff/rootfs/kali-armhf/ root
echo nameserver 8.8.8.8 > root/etc/resolv.conf
sed 's/0-1/0//g' root/etc/init.d/udev
05. Compile the EfikaMX Kernel and Modules
If you’re not using ARM hardware as the development environment, you will need to set up an ARM cross-compilation environment to build an ARM kernel and modules. Once that’s done, proceed with the following instructions.
cd ~/arm-stuff
mkdir -p kernel
cd kernel
git clone --depth 1 https://github.com/genesi/linux-legacy.git
cd linux-legacy
export ARCH=arm
export CROSS_COMPILE=~/arm-stuff/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-
make efikamx_defconfig
# configure your kernel !
make menuconfig
make -j$(cat /proc/cpuinfo|grep processor|wc -l)
make modules_install INSTALL_MOD_PATH=~/arm-stuff/images/root
make uImage
cp arch/arm/boot/uImage ~/arm-stuff/images/boot
cat << EOF > ~/arm-stuff/images/boot/boot.script
setenv ramdisk uInitrd;
setenv kernel uImage;
setenv bootargs console=tty1 root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw quiet;
${loadcmd} ${ramdiskaddr} ${ramdisk};
if imi ${ramdiskaddr}; then; else
setenv bootargs ${bootargs} noinitrd;
setenv ramdiskaddr "";
fi;
${loadcmd} ${kerneladdr} ${kernel}
if imi ${kerneladdr}; then
bootm ${kerneladdr} ${ramdiskaddr}
fi;
EOF
mkimage -A arm -T script -C none -n "Boot.scr for EfikaMX" -d ~/arm-stuff/images/boot/boot.script ~/arm-stuff/images/boot/boot.scr
umount $bootp
umount $rootp
kpartx -dv $loopdevice
losetup -d $loopdevice
Use the dd utility to image this file to your SD card. In our example, we assume the storage device is located at /dev/sdb. Change this as needed.
dd if=kali-custom-efikamx.img of=/dev/sdb bs=1M
Once the dd operation is complete, unmount and eject the SD card and boot your EfikaMX into Kali Linux