Closed c4nc closed 4 weeks ago
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
WSL logs WslLogs-2024-10-21_12-07-32.zip
Windows Version
Microsoft Windows [Version 10.0.26100.2033]
WSL Version
2.3.24.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1
Distro Version
Kali Linux Release: 2024.3
Other Software
Repro Steps
I'm facing a weird behavior while scanning for open ports on both local network or remote hosts. Test have been made with both Nmap and Masscan (latest versions)
TCP connect scan correctly works showing the open ports while Syn Scan(s) doesn't give consistent results. Debugging the issue looks like that the WSL distro doesn't receive (randomly) the reply (syn-ack) packets.
Step to reproduce the behavior:
Install Kali linux wsl from Microsoft store
Install nmap / masscan
Configure WSL in mirrored mode (as follow)
For debug > disabled Hyper-v Firewall
On the (kali) linux wsl2 vm:
Update the system
Install required software
Run the scan
sudo nmap -v -Pn -n -v -dd -p443 -e eth4 --packet-trace 192.168.1.1
or
sudo masscan -v -p443 192.168.1.1
Expected Behavior
Nmap or masscan consistently showing port 443 (in this test) open (syn-ack packet received)
TCPDUMP
Actual Behavior
Trying to scan the target multiple times the result is inconsistent/random, most of the times (~8/10) syn-ack packet aren't received inside the linux vm. Only in rare cases the syn-ack packet reach the vm and so port are listed as "open" instead of filtered.
SYN Stealth Scan (Syn packet scan)
TCPDUMP
TCP Connect Scan
Diagnostic Logs