I want to be able to use ettercap on my wlan0 to sniff for packets in my wsl2.This was the tutorial I used to install my WSL.

Don't get me wrong, I can use internet on kali through eth0 but if I scan eth0 the only host is me.

If I run ifconfig I get

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::215:5dff:fe4d:9d82  prefixlen 64  scopeid 0x20<link>
        ether 00:15:5d:4d:9d:82  txqueuelen 1000  (Ethernet)
        RX packets 437343  bytes 309863593 (295.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 276812  bytes 535593285 (510.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 20  bytes 3101 (3.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 20  bytes 3101 (3.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

If I run iwconfig I get

dummy0    no wireless extensions.
bond0     no wireless extensions.
sit0      no wireless extensions.
lo        no wireless extensions.
eth0      no wireless extensions.

If I run iw dev I get

nl80211 not found.

WSL 2 is essentially a virtual machine. Typically the network interfaces in virtual machines are, well, virtual, and the packets sent over them are bridged to a physical interface in the real machine.

Host systems do this because (a) it's more performant, (b) it's simpler, and (c) it allows multiple virtual machines to be used at once. It is theoretically possible to pass through physical hardware to a virtual machine, but it's generally considered risky, even with an IOMMU.

As a result, according to WSL 2, you don't have a wireless card, you have a standard boring Ethernet device, which is, in all likelihood, on its own subnet. This is one of those things that you probably just can't do on WSL, including things like kernel development. WSL 2 is designed to let people run and develop Linux applications on Windows, not let people access hardware. So if you want to use Ettercap, you'll need to either use a Windows version of install a real Linux distro on real hardware.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.