masscan icon indicating copy to clipboard operation
masscan copied to clipboard

masscan on non default gw adapter

Open yomon598 opened this issue 11 years ago • 0 comments

Hello! I'm testing masscan from within a virtual lab environment in VirtualBox (Kali Linux Guest in Windows 7 host).It works, but with lower performance, via the NAT adapter which is the default gw adapter. When scanning an internal virtual network or a host-only network through one of the two additional adapters, I get problems. I have to add that anything else network related that I tested works properly on all the adapters ( scanned this very subnet via nmap without issues). Here is a copy of the revelant details:

root@win8:~# masscan -v -e eth2 -p80,5985 10.10.11.1 initializing adapter eth2: type=0x 1 pcap: libpcap version 1.6.2 pcap:'eth2': successfully opened rawsock: looking for default gateway FAIL: failed to detect router for interface: "eth2"

[hint] try something like "--router-mac 66-55-44-33-22-11"

root@win8:~# ifconfig eth2 eth2 Link encap:Ethernet HWaddr 08:00:27:cb:84:4f
inet addr:10.10.11.10 Bcast:10.10.11.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fecb:844f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:25255 errors:0 dropped:0 overruns:0 frame:0 TX packets:36747191 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000

RX bytes:5528962 (5.2 MiB) TX bytes:2206584241 (2.0 GiB)

root@win8:~# ip route default via 10.0.2.2 dev eth0 proto static metric 1024 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 10.10.11.0/24 dev eth2 proto kernel scope link src 10.10.11.10

192.168.72.0/24 dev eth1 proto kernel scope link src 192.168.72.10

One more thing: if I do add the destination IP's MAC address as the "router mac, it works.

yomon598 avatar Nov 05 '15 12:11 yomon598