microsoft / microsoft/WSL

Nmap in wsl2 kali-linux can't featch MAC address

Open
#11,441 3 comments 0 reactions 0 assignees View on GitHub
feature question
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

[WslLogs-2024-04-09_18-25-17.zip](https://github.com/microsoft/WSL/files/14917331/WslLogs-2024-04-09_18-25-17.zip)
### Windows Version

版本 10.0.22621 版本 22621

### WSL Version

2

### Are you using WSL 1 or WSL 2?

- [X] WSL 2
- [ ] WSL 1

### Kernel Version

5.15.146.1-microsoft-standard-WSL2

### Distro Version

kali-linux

### Other Software

_No response_

### Repro Steps

Scaning host in VMWare kali-linux's nmap
```

┌──(root㉿w1sh)-[/usr/bin]
└─# nmap -V
Nmap version 7.94SVN ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.4.6 openssl-3.1.4 libssh2-1.11.0 libz-1.2.13 libpcre2-10.42 libpcap-1.10.4 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

┌──(root㉿w1sh)-[/usr/bin]
└─# nmap -sn -PR 172.20.129.135
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-04-09 18:18 HKT
Nmap scan report for 172.20.129.135
Host is up (0.00028s latency).
MAC Address: B4:0E:DE:13:86:ED (Intel Corporate)
Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds
```
scaning host in wsl-kali linux's nmap
```
┌──(root㉿W1sh)-[~/nmap]
└─# ./nmap -V
Nmap version 7.94SVN ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.4.6 openssl-3.1.5 libssh2-1.11.0 libz-1.2.13 libpcre2-10.42 libpcap-1.10.4 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

┌──(root㉿W1sh)-[~/nmap]
└─# ./nmap -sn -PR 172.20.129.135
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-04-09 18:18 CST
Nmap scan report for W1sh (172.20.129.135)
Host is up (0.00025s latency).
Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
```

### Expected Behavior

```
MAC Address: B4:0E:DE:13:86:ED (Intel Corporate)
```

### Actual Behavior

Without line `Mac Address:.....`

### Diagnostic Logs

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the attached WslLogs-2024-04-09_18-25-17.zip and reproduce the nmap -sn -PR 172.20.129.135 command in WSL 2 Kali Linux, comparing it with the VMware result. Trace the WSL networking behavior involved in MAC-address reporting and verify that the expected MAC Address line appears without changing the VMware case.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.