seemoo-lab/owl

Can you please add Windows support?

rluvaton opened this issue · 13 comments

Can you please add Windows support?

What does it take for it to be Windows compatible?

Windows support would require implementations of both io.h and netutils.h (in daemon/). Since I do not have developer experience with Windows, I will not provide support. If somebody wants to develop a patch, I'm open to that.

@schmittner This isn't unsupported on WSL as well right? Just to be sure because I try to use opendrop with this and I got errors. The errors while trying to run owl:

11:42:04 ERROR: Failed to connect to generic netlink.
11:42:04 ERROR: could not initialize core

I‘m not an expert on WSL either but I think that this is not possible as Windows would need to mask all relevant Netlink messages (especially those for nl80211) which I think is unlikely to happen soon. In fact, quick googling revealed that the Linux subsystem driver only implements a very limited subset of Netlink message types and there is no mention of nl80211.

@schmittner Hey WSL2 is rolling out, I wonder does this makes owl on WSL possible? I'm not really sure how owl works, but since WSL 2 now it has full system call capability, is this the missing piece that it needed?

The big difference is, that WSL2 runs in a HyperV-VM. Thus, WSL2 has no access to the native WiFi card. Instead, Windows/Hyper-V provides a virtual eth0 card. Therefore, you still can't run owl on WSL2.
I even tried it using Docker on Windows with docker run --network host --privileged --interactive --tty ubuntu bash but I still can't access my WiFi card. I'm only seeing docker0, eth0, lo, and vethf2a4ca3.

@schmittner please correct me if I'm wrong. But, as far as I can tell, the biggest problems are the missing libpcap and libev. At least thats why CMake is failing on my machine.
Instead of using libpcap, one could use WinPcap which seems to be a Windows implementation of libpcap.
And for libev there is disenone/libev-win, which, at least for me, is building on my Win 10 machine.

Maybe someone is interested, to include those two replacements for windows.
I'm going to try but don't know if I'll find the time to do so.
Nevertheless, I really am interested in owl, and then OpenDrop on Windows.

@JohannLange I’m really interested in the outcome when you decided to try replacing those two libraries. owl+opendrop would be the last missing piece for Windows to become developing/go to machine for me as WSL2 is becoming more powerful, and windows is getting a lots of love lately (package manager etc)

@schmittner please correct me if I'm wrong. But, as far as I can tell, the biggest problems are the missing libpcap and libev. At least thats why CMake is failing on my machine.

The biggest problem will be getting a replacement for nl80211 as we use that to set the WiFi parameters (mainly, active monitor mode and the channel).

I see. I was blinded by the two checks for libpcap and libev in the CMakeLists.txt. But as it turns out, using either the Visual Studio Community C++ compiler or MinGW, there are a lot more missing headers. Especially, the mentioned nl80211 for which I cannot find an easy replacement for Windows.

JanBdf commented

@juhannc @schmittner I know it's been a long time but I still think this would be a great addition to the project. What parts exactly are missing and what has been tried to make it work ? I would be happy to try and implement them myself if that means getting airdrop functionality under windows.

@juhannc @schmittner I know it's been a long time but I still think this would be a great addition to the project. What parts exactly are missing and what has been tried to make it work ? I would be happy to try and implement them myself if that means getting airdrop functionality under windows.

I'm sorry but I never really put much effort into it. I'm not a Windows Dev and so my knowledge is very limited in that regard

JanBdf commented

No worries. You mentioned WinPcap though. Did you get cmake to find pcap.h by any chance? I'm still stuck trying to get the alternatives for the dependencies to work.

I really can't remember but I guess I wasn't able, sorry :/