How to Enable WiFi in VirtualBox Kali Linux: A Step-by-Step Guide

Setting up a wireless interface in a virtual environment is often a challenge for novice information security professionals. When you install Kali Linux By default, the guest operating system doesn't see your host's physical WiFi adapter when connecting to a virtual machine. This is due to the virtualization architecture, where resources are allocated software-based and direct access to the hardware is limited.

However, for wireless network audits and penetration testing, access to the WiFi card is critical. The standard network interface provided by VirtualBox operates in NAT or bridged mode, allowing internet access but preventing packet interception or changing the card's operating mode. Monitor ModeThis functionality is necessary for using tools such as Aircrack-ng, Wireshark or Kismet.

In this article, we'll cover not only basic network access setup but also complex USB device forwarding scenarios for pentesting. You'll need to install guest OS additions, configure USB filters, and possibly purchase compatible hardware. Proper configuration VirtualBox Extension Pack will become the foundation for your laboratory work.

Understanding Network Architecture in VirtualBox

Before tweaking the settings, it's important to understand the difference between an emulated network card and a forwarded USB device. By default, a virtual machine creates a virtual network adapter that forwards traffic through the host. To Kali Linux, this appears as a regular wired or wireless interface. eth0 or wlan0, but physically it is not a WiFi card.

The main problem is that the standard VirtualBox drivers don't support low-level operations like packet injection. The virtual adapter's protocols are limited to data transfer and can't scan the air for hidden networks or deauthenticate clients. Fully functioning in monitor mode requires direct control of the adapter chip.

There are two main ways to solve this problem: using the built-in capabilities of a Bridged Adapter for regular internet access or forwarding a USB device for specialized tasks. The choice depends on your goals. If you simply need to update repositories or download dictionaries, standard NAT will do. But if you plan to conduct a real security audit, USB filtering is essential.

  • 📡 NAT — allows the guest OS to access the Internet via the host's IP address, hiding the virtual machine behind a firewall.
  • 🌉 Bridged Adapter — makes the virtual machine visible on the local network as a separate device with its own MAC address.
  • 🔌 USB Passthrough — transfers control of the physical WiFi adapter directly to Kali Linux, disabling it in the main system.

It's important to note that using USB passthrough makes the device inaccessible to the host operating system (Windows or macOS). This means that while Kali Linux is running and has seized the adapter, you won't be able to connect to the host's WiFi through the same card. Therefore, for permanent use, a second, inexpensive USB adapter is often purchased specifically for testing.

⚠️ Attention: Some modern USB 3.0 WiFi adapters may not work correctly in VirtualBox passthrough mode due to controller limitations. For maximum compatibility with pentesting tools, we recommend using cards based on the Atheros AR9271 or Ralink RT3070 chipset.

📊 Which connection method do you plan to use?
NAT only for updates
Bridged for scanning
USB Passthrough for injections
I don't know, I need to figure it out.

Basic network adapter setup via NAT

First, make sure your virtual machine has access to the global network. This is necessary for installing updates and additional packages. By default, VirtualBox uses NAT mode, which should be enabled immediately after installing Kali. Check your network settings by selecting your virtual machine in the list and going to Settings → Network.

In the window that opens, make sure the "Enable network adapter" checkbox is checked. The "Connection type" field should be set to Network Address Translation (NAT)In this mode, VirtualBox acts as a router, distributing IP addresses to the guest system from the internal 10.0.2.0/24 network. This is the safest option for the initial configuration.

If the internet doesn't automatically reappear, try restarting the network interface in Kali Linux. Open a terminal and run the command to restart the network management service. This often resolves DHCP issues if an address wasn't obtained during system startup.

sudo systemctl restart NetworkManager

After restarting the service, check for the IP address using the command ip aIf the address is assigned (usually starting with 10.0.2.x), try pinging an external resource, such as Google's servers. A successful response confirms that basic connectivity is established, and you can move on to more complex settings.

Installing Guest Additions and Drivers

For stable network operation and USB device forwarding, it is extremely important to install Guest OS Additions. Guest Additions Provide optimized video drivers, time synchronization, and improved peripheral support. Without them, the system may run slowly, and some VirtualBox features will be unavailable.

The installation process in Kali Linux differs slightly from other distributions due to its security policy and the lack of proprietary repositories by default. First, you need to update package lists and install kernel headers, which are required for compiling modules. This is a critical step often skipped by beginners.

sudo apt update

sudo apt install -y linux-headers-$(uname -r) build-essential dkms

After installing the dependencies, mount the disk image with the add-ons via the VirtualBox menu: Devices → Mount Guest Additions Disk ImageA new drive will appear in the Kali file manager. Run the installation script from there or mount it manually and run VBoxLinuxAdditions.runOnce the process is complete, be sure to reboot the virtual machine.

Component Purpose Status in Kali
linux-headers Kernel header files for compilation Requires installation
dkms Dynamic kernel module support Requires installation
virtualbox-guest-utils Basic guest OS utilities Often installed
virtualbox-guest-dkms Kernel modules for VirtualBox Requires installation

☑️ Check before installing add-ons

Completed: 0 / 4

Setting up USB WiFi adapter forwarding

The most important step for a pentester is setting up USB device forwarding. This method allows Kali Linux to gain full control over the WiFi card. First, make sure that the host (your computer) has Oracle VM VirtualBox Extension PackIts version must match the version of VirtualBox itself.

Download the appropriate extension package from the official website and install it through the menu File → Virtual Media Manager or simply by running the file. After installation, restart VirtualBox. Now you need to configure your account's access to USB devices. In the virtual machine settings, go to USB and enable USB 2.0 or 3.0 controller.

Next, you need to add a filter for your WiFi adapter. Click the add filter icon (the green plus sign on the right) and select your device from the list. If the adapter is connected, it will be displayed by its manufacturer name, for example, Realtek or RalinkAfter adding the filter and launching Kali Linux, the device will disappear from the Windows network connections list and appear in the virtual machine.

⚠️ Attention: VirtualBox interfaces may change in new software versions. If you don't see the "Extension Pack" option or USB settings, check the latest documentation on the developer's website, as the menu location may have changed.

Check the result inside Kali Linux with the command lsusbYou should see your device in the list. Also in the command output iwconfig or ip link a new wireless interface should appear, different from the standard one eth0Now you can control the map directly.

What to do if the device is not captured?

If the filter has been added but the device remains in Windows, try disabling automatic USB connection in Windows settings or temporarily disabling the device driver in the host's Device Manager before starting the virtual machine.

Activating the monitor and injection mode

Once you have access to the adapter, you need to put it into monitor mode. This state allows the card to listen to all traffic, not just packets addressed to it. In Kali Linux, this utility is used for this. airmon-ng, included in the package Aircrack-ng.

Before starting the monitoring mode, it is extremely important to stop processes that may be using the WiFi adapter and causing conflicts. System services such as NetworkManager or wpa_supplicant will try to automatically connect to known networks, which will interrupt your work. Use the command airmon-ng check kill to forcibly stop such processes.

sudo airmon-ng check kill

sudo airmon-ng start wlan0

Instead of wlan0 Substitute the name of your interface. After executing the command, a new interface is created, usually called wlan0monThis is what you need to specify in network scanners. Check the status with the command iwconfig — the mode line must indicate Mode:Monitor.

  • 📶 Scan - scanning the surrounding space to find access points.
  • 🔓 Inject — the ability to send arbitrary packets (deauthentication, handshakes).
  • 📡 Channel - the ability to fix a channel or switch between them.

Some cheap adapters may only support monitoring mode but not injection. You can check injection support by running aireplay-ng --test wlan0monIf the test is successful, you'll see a message indicating that the injections are working. Otherwise, you'll need to look for a more suitable driver or hardware.

Diagnosis and solution of typical problems

Even if you follow all the instructions, problems may arise. Users often encounter a situation where the adapter is detected by the system but does not enter monitoring mode. This may be due to a blocking issue. rfkillCheck the status of the locks with the command rfkill listIf WiFi is blocked by software or hardware, unblock it with the command rfkill unblock wifi.

Another common issue is USB devices "dropping" during operation. This is often caused by USB power-saving settings in the motherboard BIOS or the host operating system itself. Disable this feature. USB Selective Suspend in Windows power settings to prevent the adapter from turning off.

If Kali Linux doesn't detect the adapter at all, even though it's listed in the USB filter, try changing the emulated controller type in the virtual machine settings. Switching between USB 1.1 (OHCI), 2.0 (EHCI), and 3.0 (xHCI) may resolve the compatibility issue. It's also worth checking whether the card is being used by another process on the host.

⚠️ Attention: Conducting penetration tests on other people's wireless networks without the owner's written permission is illegal. Use the acquired knowledge only for auditing your own networks or as part of legitimate competitions (CTF).

Frequently Asked Questions (FAQ)

Can I use my laptop's built-in WiFi for Kali Linux in VirtualBox?

Technically, this is possible if your card supports monitor mode and the drivers allow USB passthrough (this is rare for internal cards), or if you configure complex PCIe passthrough. However, in 95% of cases, internal laptop cards are not visible to VirtualBox as USB devices. It's simpler and more reliable to buy an external USB WiFi adapter with monitoring support.

Why is the internet speed in Kali Linux through NAT so slow?

Low speed may be caused by CPU overload when forwarding packets, especially if heavy scanning processes are running. Try switching to "Bridged Adapter" mode in VirtualBox settings so the virtual machine communicates directly with your router, bypassing the host's NAT.

Which WiFi adapter is best for VirtualBox and Kali Linux?

Adapters based on Atheros AR9271 chips (e.g., TP-Link TL-WN722N v1) and Ralink RT3070 are considered the gold standard. They have excellent support in the Linux kernel, operate reliably in injection mode, and can be easily forwarded via USB to virtual machines. Avoid v2 and higher versions of popular models, as they often feature incompatible Realtek chipsets.

Do I need to reconfigure the network every time after a reboot?

Basic network settings are preserved. However, if you use USB forwarding, the device filter will remain in the VirtualBox settings. You only need to ensure the adapter is connected and captured each time you start the virtual machine. Commands for switching to monitor mode can be conveniently written into an autostart script or executed using an alias command.