-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nmap not working #1349
Comments
When opening issues please fill out the provided template. Which windows build are you running? |
nmap fails to open socket.
cannot bind AF_NETLINK socket when running nmap
Microsoft Windows [Version 10.0.14393]
apt-get install nmap
root@DESKTOP-5UFF8C5:~# nmap -sn 192.168.0.* Starting Nmap 6.40 ( http://nmap.org ) at 2016-11-19 10:42 DST
Should perform scan of local network.
https://gist.github.com/rtfmoz/bb41c6e0148d223a3e3bc310217e05ba |
@JasonLinMS as FYI |
I have just installed the latest preview build of Windows 10.0.14971 which has Ubuntu 16.04 Xenial. It appears nmap on this is version 7.01 and suffers similar issues.
nmap fails to open socket.
AF_NETLINK operation not supported: route_dst_netlink
Microsoft Windows [Version 10.0.14971]
apt-get install nmap
root@DESKTOP-5UFF8C5:~# nmap -sn 192.168.0.* Starting Nmap 7.01 ( https://nmap.org ) at 2016-11-22 20:57 DST
Should perform scan of local network.
https://gist.github.com/anonymous/9445b29cfce828a2eed7df96f2d970fb |
For tcpdump/wireshark/some nmap functions, upvote |
i just installed creators update and did a clean install to WSL and nmap is still not working
|
@lab1005 That's partially because AF_PACKET family is not supported yet. You may upvote this to speed up the process... Edited: official Uservoice issue |
Any news about the nmap feature ? |
There are no interesting updates at this moment. As mentioned previously, this requires support for |
@gpotter2 The 'this' link just goes to a |
One would think that Wireshark, Tshark and Nmap could be considered default requirements in an enterprise environment? |
nmap, wireshark and many other tools that use AF_PACKET are very used. The lack of this feature is really blocking. |
An acceptable workaround is just to put the Windows version of nmap in your path somewhere. |
This is already what I do for nmap, but many other tools and business or personal developments are not available in Windows version. The lack of this feature is really blocking. |
What is your development use case and we can try to help you with a work-around while you wait for If you explain a novel scenario that may (no guarantees) help MSFT to prioritise when they review their backlog. The User Voice has six pages of pointless +1s (why folks do that on a page with a vote button I will never understand) but is absent a single: "In my development workflow I do <insert your scenario>, but I am unable to to <thing> because there is no |
Well I can answer that one easily, I use tcpdump, tshark nmap in my day to day tasks. Having this on one machine instead of having a separate machine will save me a ton of time as well as having to lug more than one machine around. I will try what was stated above to install windows binaries and stick it in the path. Not sure if it will work or not. |
You can try the Windows binaries; I have had a fairly good experience with tshark on Windows. But worst case here don't go lugging around another physical machine unless you have unrelated reasons to do so. Wireshark in VirtualBox (which supports bridged promiscuous mode) works surprisingly well. For the time being, WSL's focus is on development related scenarios, not enterprise scenarios (for some definition of either category). A VM might be a better fit for you for now, and there's nothing wrong with that. Bonne chance. |
I have come to realise this. But in the bigger picture of things it's just simpler to wipe my windows and install Kali with windows running as a vm. Just thought it would have made life simpler with default OS and bash implemented. Oh well, Cest la vie. |
@therealkenc ty for the interesting remark: "WSL's focus is on development related scenarios, not enterprise scenarios (for some definition of either category)." Detailed comments, questions; Perhaps this is really a marketing / product placement question that apparently many of us share. If so , maybe you all can clarify and show us the win(s). The idea of WSL focusing on dev not enterprise scenarios confuses me.
Your complaint is well taken that Uservoice is lacking and ' absent a single: "In my development workflow I do , but I am unable to to because there is no AF_PACKET support in WSL". In this context is a development goal you are trying to achieve, not "run native Linux wireshark" (which is a means not a goal). ' I checked and found the most substantial comments were:
Some thoughts as an observer about the use case are above, but also once there are daemons [2], how about this scenario;
Since the FAQ seems to say I should never do this, I want the FAQ to specify more of the advantages of MS's proposed division of labor. thank you for the project! I am definitely speaking as an amateur / explorer here so all/any resources appreciated. Notes [2] Server work likely wouldn't make sense before getting background processes going, https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13653522-consider-enabling-cron-jobs-daemons-and-backgroun //edit; add TLDR , reorg |
To second what @AnneTheAgile said, most developers are developing for the purposes of an enterprise solution or at least something that can be easily made to suit an enterprise environment as a company gets larger. There are some 'enterprise' specific scenarios that don't involve development but all development scenarios revolve around enterprise solutions and services (for those who have an enterprise environment of course). A proper project creating or modifying something involves not just the planning and development but also the testing of the feature just as MS is doing with the Insider Preview builds. There is no difference between what MS does and what other companies do (that follow industry standards/best practices anyways). Part of testing is obviously security testing and that means needing to check networking components of a software that utilizes network connections and/or possibly makes a change to the OS. Use of NMAP, Wireshark, etc. would then be required for use and is often needed by Linux developers/testers. The whole purpose of WSL is to bring Linux and Windows developers together to harness the technologies and abilities of both to work smarter not harder. Therefore the support of AF_Packet is absolutely essential if MS wants to attract more Linux developers/testers over to Windows. |
I'm going to quote @sunilmut for his comment in another thread (#69 (comment))
We may also have a look at #69 (comment)
To me, the situation has slightly evolved since #1349 (comment). It seems that that kind of new feature is "on its way"
Microsoft teams are not communicating a lot about this though, even if it seems to be slowly going forward :/ @sunilmut Any pseudo-official news you could give us ? Is this still "not planned" ?
Even though https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/17817685-support-af-packet-address-family-tcpdump-wireshar is full of useless comments, the interest of people in this is definatly shown by the number of upvotes, or by comments as great and developed as the above one on this thread. The uservoice page is also one of the most rated one on the uservoice. If you're still not convinced, have a look at #2039
Developing any linux machine network-based software require at some point a native AF_PACKET integration, and wireshark/tcpdump might be used a lot when coding or in unit tests. If you're trying to develop a software based on AF_PACKET made for linux, you definatly need AF_PACKET to be supported. Because developing softwares is the main goal of WSL, that feature is intended to be supported. For instance, we’re not looking for a way to make our software work on windows (scapy), because it already does using the winpcap alternatives, but for a way to test it under its Linux form within WSL, which requires AF_PACKET. |
What is the roadmap for this issue? |
This issue still not resolved? But already closed? |
@nikko : in wsl 2.0 (currently on the insider fast ring afaik), I believe the issue is no longer relevant as the way wsl is running the nix kernel fully virtualized within the Windows kernel. |
https://wpdev.uservoice.com/forums/266908-command-prompt-console-windows-subsystem-for-l/suggestions/17817685-support-af-packet-address-family-tcpdump-wireshar is not a valid link anymore. Any alternatives?
May I ask if above workaround would help me use wireshark in WSL? Thanks! |
This is fixed in WSL 2.0 |
WSL2 is not a viable option for many as it doesn't get along with VMware
workstation.
|
Vmware is finally working on that; the Windows hypervisor was introduced in Windows Server 2003 R2, on 6 December 2005: https://blogs.vmware.com/workstation/2019/08/workstation-hyper-v-harmony.html Btw, the Hyper-V hypervisor is also used in:
|
You will note the year 2020 for proper release of the integration. :) I note and appreciate the nudge. Unfortunately many of us have to run vmware workstation right now and are heavily dependent on it. Deploying wsl2 is a breaking change. |
Yeah for as long this isn't fixed in WSL1 this ticket ought to remain open, since it is not fixed. And WSL2 is not in even in any 'gold master' or what you want to call a release of Windows. |
it is unrealistic to expect this issue to be fixed in WSL1 when microsoft is clearly going the WSL2 way. unsubscribing from this spam. |
出现了这个问题: |
where is nmap |
Microsoft please support AF_PACKET for WSL that would be amazing! |
I'd be really really helpful if you guys had nmap in linux and could use raw sockets. I for one consider using another platform just for Nmap. |
@InigoMontoyaMorgan Have you tried WSL2 which runs distros atop a genuine Linux kernel in a VM and, thus, is not affected by Windows' networking stack? |
No. I'm totally new at penetration testing and security and am still
learning.to be honest I've never even heard of WSL or bistro lol. If you
could guide me in the right direction though that would be greatly
appreciated.
|
@InigoMontoyaMorgan You may want to start with the WSL2 comparison docs, and the other [WSL docs pages](https://docs.microsoft.com/en-us/windows/wsl/. I'd strongly encourage you to make sure you're running at least Windows 10 2009 (build 19041), and then convert existing WSL distros to WSL2, and update your WSL to set the default WSL version to WSL2 (so that future WSL distros are created as WSL2). Read this page for more details. |
libpcap when? |
"sudo apt install net-tools" This command will help you to resolve your above error very well! |
yashar@DESKTOP-MHBRT96:~$ sudo nmap -sP 192.168.1.0/24 Starting Nmap 6.40 ( http://nmap.org ) at 2016-11-11 23:37 STD route_dst_netlink: cannot bind AF_NETLINK socket: Invalid argument
The text was updated successfully, but these errors were encountered: