UTM – Install Kali Linux ARM on Apple Silicon Native QEMU

Author:
Introduction
  • This comprehensive guide provides step-by-step instructions on how to install the latest version of Kali Linux ARM on an Apple ARM computer using native QEMU. It’s important to note that there are additional steps required when trying to install Kali Linux on UTM using native QEMU compared to Apple Virtualization. However, using native QEMU provides Networking Advanced Options, which are essential for setting up labs or conducting penetration testing. These advanced options give the user greater control over the network configuration, allowing for more specific and fine-tuned settings to be implemented. This increased level of control makes it easier to create a network environment that is tailored to the specific needs of your lab or testing setup. While installing Kali Linux using native QEMU may require some additional effort, the benefits, in terms of the greater level of control over network configuration, make it well worth it.
  • Check out my YouTube channel if you prefer video content over written posts. Here’s the link to the video:
What is working?
  • Networking
  • Clipboard Sharing
  • Shared Directory
What is broken?
  • Please let me know if you found any.
Step 1: Download Kali Linux for ARM® aarch64 systems
Step 2: Create a New Virtual Machine
  • Launch UTM. Select the + icon to add a new VM.
  • Select Virtualize.
  • Select Linux.
  • Select Browse and select the Kali Linux ARM64 ISO image.
  • Select Continue.
  • Choose Memory Size and CPU Cores (I recommended the default settings).
  • Select Continue.
  • Choose Storage Size.
  • Select Continue.
  • Select Browse and choose the directory you want to share with the VM (This is optional and can be added later on).
  • Select Continue.
  • Change the Name or leave it as the default name.
  • Select Open VM Settings (Additional Settings are required for Native QEMU).
  • Select Save.
  • Select New Serial under Devices. (This step resolves the black screen issue that may occur during Kali Linux installation media boot-up).
  • Select Save to save the settings.
Step 3: Install Kali Linux ARM on the newly created Virtual Machine
  • Select any of the below icons to start the VM.
  • Select either Virtual Display.
  • Use the UP or DOWN key to select Graphical Install.
  • Press Enter when done.
  • Disregard the black screen and continue setup with Terminal 1.
  • Select your Language and press Enter to continue.
  • Select your Country, territory or area and press Enter to continue.
  • Select Keymap to use and press Enter to continue.
  • Enter a Hostname or
  • Press Enter to keep the default hostname.
  • Enter a domain name or
  • Press Tab and then Enter to leave it blank.
  • Enter the Full name for the new user.
  • Press Tab and then Enter to continue.
  • Enter a username for your account or
  • Press Tab and then Enter to continue with the system-generated user name.
  • Enter a password for the new user.
  • Press Tab and then Enter to continue.
  • Re-enter password to verify.
  • Press Tab and then Enter to continue.
  • Select your time zone or
  • Press Enter to continue with the default option (you can change it later under Settings).
  • Select your Partitioning method or
  • Press Enter to continue with the default (Guided – use entire disk).
  • Press Enter to continue (we only have 1 virtual disk unless you create more than 1).
  • Choose your Partitioning scheme or
  • Press Enter to continue (default option)
  • Press Enter to continue.
  • Press Tab and then Enter to continue.
  • Use the UP or DOWN key to navigate.
  • Use the SPACE key to select.
  • Press Tab and then Enter to continue (I preferred Kali’s default desktop environment, but the choice is yours).
  • Power down the VM after installation is complete.
  • Go to the Post Installation Step.
Post Installation
  • Share Directory: you select a shared directory or an additional one from here.
  • Select CD/DVD and Clear the ISO.
  • Select the Settings (number 3).
  • Select Serial.
  • Select Remove.
  • Select Save to save the settings.
  • Follow the next step to Enable Clipboard sharing and Shared Directory.
Enable Clipboard Sharing
  • SPICE agent is required for clipboard sharing (both QEMU and Apple backend) as well as dynamic display resolution in QEMU backend.
  • Install SPICE agent using the below command:
sudo apt update
sudo apt install spice-vdagent
  • Reboot for SPICE agent to take effect.
Shared Directory

Caution: Deleting a file in a shared directory folder will permanently delete the file. It will not go to the Trash folder.

  • To access the shared directory, you can run the below command to mount to the shared path.
sudo mount -t 9p -o trans=virtio share [mount point] -oversion=9p2000.L
  • Replace [mount point] with your directory (ex. home/sysadmin102/Shared).
  • In the above example, I created a Shared folder and mounted the Sharepoint to that folder.
  • The shared directory will unmount upon reboot.
  • If you want to mount the shared directory permanently, follow the next step.
  • You may notice that accessing the mount point fails with “access denied” unless you’re the root user. This is because by default the directory inherits the UID/GID from macOS/iOS which has a different numbering scheme. You can fix the error with the following command:
sudo chown -R $USER [mount point]
  • If you already mounted the shared point in the previous step, make sure to unmount it before continuing:
sudo umount share /home/sysadmin102/Shared
  • You can also modify /etc/fstab to automatically mount the share on startup:
sudo nano /etc/fstab
  • Add the following text to the end of fstab:
share	[mount point]	9p	trans=virtio,version=9p2000.L,rw,_netdev,nofail	0	0
  • Replace [mount point] with your directory (ex. home/sysadmin102/Shared).
  • Press Control + X when finished.
  • Press Enter to save.
  • Restart for changes to take effect.
Ways to support my channel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translate »