Has anyone had success using nmap within msfconsole to target a specific host on a VM virtual network?
For example, the following command works from a Terminal prompt:
nmap -sT -A 172.16.187.128
However, the same command run from msfconsole results in
dnet: Failed to open device vmnet
msf > nmap -sT -A 172.16.187.128
[*] exec: nmap -sT -A 172.16.187.128
Starting Nmap 6.25 ( http://nmap.orgz) at 2013-06-04 00:23 MDT
dnet: Failed to open device vmnet2
QUITTING!
I've seen some answers on the Internet suggesting the problem is the virtual network, but since the same nmap command works from Terminal I have doubts about the answers I've seen.
Thanks!
Best Answer
For what its worth I've seen the same issue with Fusion 6 and nmap. I also saw tcpdump fail as well:
After upgrading libpcap to 1.40 and this still not resolving the problem, I found the following outdated post: https://communities.vmware.com/message/693833#693833
Specifically this quote is where the issue lies:
"No guarantees, but we can try to take a look at implementing BPF on Fusion's network interfaces in a future release."
This seems to point to the issue being a vmware problem, so I tried VirtualBox 4.3.0 and when using NAT at least, the issues do not occur (nmap also worked for me):