2

I am running Kali Linux on my computer (Windows 10). I have both Wi-Fi and Ethernet connections available. After running netsh interface show interface in Windows CMD, it prints this:

Admin State    State          Type             Interface Name
-------------------------------------------------------------------------
Enabled        Connected      Dedicated        Ethernet
Enabled        Connected      Dedicated        Wi-Fi
Enabled        Connected      Dedicated        vEthernet (WSL)

That means, I have both Wi-Fi and Ethernet connections available. To run some programs like wifite in Kali Linux, I have to be connected via Wireless interface. So my question is, how do I change WSL type of connection from Ethernet to Wi-Fi?

1
  • I am not sure about WSL. If Kali (or other VM) is in a Virtualizing app, you would have to enable USB pass through and install a USB wireless card that would do as you wish.
    – anon
    Commented Dec 22, 2020 at 13:28

1 Answer 1

5

I don't believe you can do this. If you're using WSL 1, you're basically using an emulated Linux environment running on the Windows kernel, and it's possible, but unlikely, that you can control the existing network interface using the standard Linux cfg80211 interfaces. That would require that Windows implement that functionality and let you do so, which seems unlikely. Not all wireless cards implement the monitor mode features required to run Wi-Fi attack tools, and Windows may not want you to change the mode from Linux since it prevents the card from working normally in Windows. You can try it and see, but I wouldn't be surprised if it didn't work.

If you're using WSL 2, then you're essentially using a VM, and in that case, it won't be possible. Most built-in Wi-Fi cards are PCI-E, and the only safe way to expose a PCI-E device to a VM is with an IOMMU, which your machine may or may not have. In any event, Windows does not allow you to pass through hardware network devices to WSL 2 instances.

In general, if you want to use tools that manipulate the hardware of the system (including putting the Wi-Fi card into monitor mode), then you need to use a real Linux distro running on bare metal. WSL is very featureful, but it's not designed to let you control hardware in that way.

1
  • I concur with bk2204. I ran some quick tests on WSL1 and WSL2 (Ubuntu in both cases). As we know, WSL2 doesn't expose the wireless interface at all, since it only uses the VM virtual interface in NAT mode. In WSL1, at least you can see the state of the wifi interface (e.g. ip link show wifi0 will show different results when you connect or disconnect wifi in WIndows), but neither iwlist nor iwconfig report any data from wifi0, even when it is up (enabled in Windows). iwconfig returns "no wireless extensions" on wifi0. Commented Dec 23, 2020 at 5:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .