Skip to content
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 #2039

Closed
nlogozzo opened this issue May 1, 2017 · 101 comments
Closed

nmap not working #2039

nlogozzo opened this issue May 1, 2017 · 101 comments

Comments

@nlogozzo
Copy link

nlogozzo commented May 1, 2017

  • Windows Version Number: 10.0.15063
  • Bash Version: Ubuntu 16.04

-After installing nmap, when I try running sudo nmap -v -sn 192.168.0.0/16 to scan my network for devices I get the error:
Couldn't open a raw socket. Error: Permission Denied (13)

-When running nmap -v -sn 192.168.0.0/16 without using sudo I get the error:
Problem binding to interface , errno: 92
socket_bindtodevice : protocol not available

  • The output I should be receiving is (example):
    Initiating Ping Scan at 20:14
    Scanning 4096 hosts [2 ports/host]
    Completed Ping Scan at 20:14, 33.00s elapsed (4096 total hosts)
    Initiating Parallel DNS resolution of 4096 hosts. at 20:14
    Completed Parallel DNS resolution of 4096 hosts. at 20:14, 0.01s elapsed
    Nmap scan report for amazon-3c5740640.home (192.168.1.13)
    Host is up (0.095s latency).
@nlogozzo nlogozzo changed the title nmap error nmap not working May 1, 2017
@stehufntdev
Copy link
Collaborator

Thanks for reporting the issue. WSL currently has limited support for raw sockets. Please give us feedback on UserVoice so we can prioritize the work - https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo

@therealkenc
Copy link
Collaborator

#1349. User Voice is here.

@tjwebb
Copy link

tjwebb commented Jun 29, 2017

+1

@bmelnik
Copy link

bmelnik commented Jul 11, 2017

+1 same behavior

@banaabraham
Copy link

+1

4 similar comments
@cptBuggy
Copy link

+1

@Sndav
Copy link

Sndav commented Jul 17, 2017

+1

@ghost
Copy link

ghost commented Jul 18, 2017

+1

@evertondornelas
Copy link

+1

@sunilmut
Copy link
Member

Marking this duplicate of #1349

@sunilmut sunilmut marked this as a duplicate of #1349 Jul 25, 2017
@chtapodi
Copy link

+1

9 similar comments
@raiyuza
Copy link

raiyuza commented Aug 20, 2017

+1

@mrcha0s
Copy link

mrcha0s commented Aug 22, 2017

+1

@sstodd7532
Copy link

+1

@WizardRyan
Copy link

+1

@Oxicode
Copy link

Oxicode commented Aug 28, 2017

+1

@ghost
Copy link

ghost commented Aug 30, 2017

+1

@mathisloge
Copy link

+1

@danhanley
Copy link

+1

@pitmacaloway
Copy link

+1

@microsoft microsoft deleted a comment Sep 6, 2017
@maddie-j
Copy link

maddie-j commented Sep 7, 2017

+100

@lacraig2
Copy link

lacraig2 commented Sep 8, 2017

+1

@sunilmut
Copy link
Member

sunilmut commented Sep 8, 2017

For everyone upvoting here, thanks, we understand that this is an important ask. I would also recommend heading down to the user voice and upvoting there as well. We use that to prioritize.

@dezza
Copy link

dezza commented Sep 9, 2017

+1

@chriswood
Copy link

This would be great.

@artisticcheese
Copy link

artisticcheese commented Aug 15, 2018

I think even better way to use nmap on windows is to just launch docker container with nmap. You don't even need to switch to linux containers if you use windows ones.

Advantages:

  1. No need to install and maintain nmap installation and all dependencies
  2. Fully reproducible scenario regardless of where you run it
  3. Always latest and up to date version of nmap
  4. Faster execution time then on WSL

Command is docker run --rm --platform=linux instrumentisto/nmap -p 3389 --script ssl-enum-ciphers 10.40.129.61

PS C:\Users\admin> docker run --rm --platform=linux instrumentisto/nmap -p 3389 --script ssl-enum-ciphers 10.40.129.61
Starting Nmap 7.70 ( https://nmap.org ) at 2018-08-15 10:49 UTC
Nmap scan report for 10.40.129.61
Host is up (0.051s latency).

PORT     STATE SERVICE
3389/tcp open  ms-wbt-server
| ssl-enum-ciphers:
|   TLSv1.0:
|     ciphers:
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (secp256r1) - A
|       TLS_DHE_RSA_WITH_AES_256_CBC_SHA (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_128_CBC_SHA (dh 1024) - A
|       TLS_RSA_WITH_AES_256_CBC_SHA (rsa 2048) - A
|       TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) - A
|       TLS_RSA_WITH_RC4_128_SHA (rsa 2048) - C
|       TLS_RSA_WITH_RC4_128_MD5 (rsa 2048) - C
|     compressors:
|       NULL
|     cipher preference: server
|     warnings:
|       Broken cipher RC4 is deprecated by RFC 7465
|       Ciphersuite uses MD5 for message integrity
|       Key exchange (dh 1024) of lower strength than certificate key
|       Weak certificate signature: SHA1
|   TLSv1.1:
|     ciphers:
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (secp256r1) - A
|       TLS_DHE_RSA_WITH_AES_256_CBC_SHA (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_128_CBC_SHA (dh 1024) - A
|       TLS_RSA_WITH_AES_256_CBC_SHA (rsa 2048) - A
|       TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) - A
|       TLS_RSA_WITH_RC4_128_SHA (rsa 2048) - C
|       TLS_RSA_WITH_RC4_128_MD5 (rsa 2048) - C
|     compressors:
|       NULL
|     cipher preference: server
|     warnings:
|       Broken cipher RC4 is deprecated by RFC 7465
|       Ciphersuite uses MD5 for message integrity
|       Key exchange (dh 1024) of lower strength than certificate key

@Ironsecurity
Copy link

Why not just download the nmap binary installer to windows, install it and run it in either Powershell or command prompt? Works fine... It's obvious that Kali and other WSL apps will not work using nmap. Hoping for next updates will fix this issue.

@danhanley
Copy link

danhanley commented Aug 22, 2018 via email

@entr0pia
Copy link

entr0pia commented Oct 1, 2018

+86

@sgf
Copy link

sgf commented Oct 7, 2018

Why ppl like Linux because Linux has fewer restrictions, people can do more what they want to do.
Please don't bring the limit from windows to the WSL.if only can do the windows can do,why we should be use WSL?

Soo,when could be the problem soloved?

https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/17817685-support-af-packet-address-family-tcpdump-wireshar

that has 1426 votes now ?
how many votes need ?

@mailinglists35
Copy link

that has 1426 votes now ?
how many votes need ?

You don't understand. Our votes do not really count. The uservoice website is just a simulation so you think your opinion matters, but in fact it doesn't.

They blatantly use the name Linux but in fact they don't really want a full blown Linux distro, and instead they just needed a dev environment beucause they realized linux has everything and setting up a dev env on powershell is a painful experience.

@mitokomon
Copy link

more than one year passed without solution :/

@sptramer
Copy link

This super sucks. WSL has a large number of socket issues.

@findli
Copy link

findli commented Jan 24, 2019

+1

2 similar comments
@8270647
Copy link

8270647 commented Feb 1, 2019

+1

@matthewlewis91
Copy link

+1

@abersheeran
Copy link

So the problem hasn't been solved yet?

@ThomasSquall
Copy link

2 Years and still nothing

@symant233
Copy link

Waiting for the solution...

@EbrahimMajdey
Copy link

+1

1 similar comment
@adotka
Copy link

adotka commented Mar 5, 2019

+1

@mailinglists35
Copy link

@Moderators, please lock the comments. it's annoying to receive notifications with "+1", when everyone could instead subscribe.

@x41x41x90
Copy link

:-/ +1

@dinhluong
Copy link

Still waiting ...

@alexverboon
Copy link

just tried on the latest windows 10 insider fast ring and wsl 2 and this now seems to work.

@BlackRider97
Copy link

+1

1 similar comment
@dreamtale90
Copy link

+1

@IandI187
Copy link

IandI187 commented Jul 13, 2019

Still no fix? Any other ways around the problem?

@nlogozzo
Copy link
Author

nlogozzo commented Jul 13, 2019 via email

@rafaelgdp
Copy link

rafaelgdp commented Jul 29, 2019

Just came here to say that I'm suffering with this issue right now while troubleshooting my currently limited internet connection.

@jmvalente
Copy link

jmvalente commented Aug 1, 2019

I'm also experiencing it. Happens even if using the workaround provided by @kartio

What does seem to work is modifying the alias slightly to alias nmap='"cmd.exe /R /mnt/c/Program Files (x86)/Nmap/nmap.exe"'

edit: For whatever reason this stopped working the morning after I posted this, but alias nmap='powershell.exe -Command nmap.exe' does work.

You may need to specify the full path of nmap.exe if running which nmap.exe doesn't indicate that the executable is in your path.

@Wayc0des-Land
Copy link

+1

1 similar comment
@Hebertl
Copy link

Hebertl commented Oct 31, 2019

+1

@microsoft microsoft locked as spam and limited conversation to collaborators Oct 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests