robertdavidgraham / masscan

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
GNU Affero General Public License v3.0
23.28k stars 3.05k forks source link

Doesn't work via PPPoE connection #167

Open vellen opened 9 years ago

vellen commented 9 years ago

Hello! My WAN connection type is PPPoE (with username, service name and password). When i try to but the cable directly into my PC (no router, NATs, etc...) and run the following into Kali Linux terminal: 1) masscan 0.0.0.0 -p 1-65535 --exclude 255.255.255.255 Result: "FAIL: failed to detect MAC address of interface: "ppp0" "[hint] try something like "--adapter-mac 00-11-22-33-44-55" 2) masscan 0.0.0.0 -p 1-65535 --exclude 255.255.255.255 --adapter-mac DC-CB-A8-88-17-14 Result: unknown data link type: 113(LINUX_SLL)

I also tried to run a Virtual box with Kali Linux on Kali Linux main OS, to be under NAT, but have no success at all.

ghost commented 9 years ago

Same problem, thats wired because i remmember i do it some time ago with the same PPPoE connection

Synergyst commented 6 years ago

I'm not sure if this is just isolated to PPPoE..

I'm using IP over Infiniband with this output:

# bin/masscan 10.1.1.0/24 -p1-65535 --banners --rate 1000
unknown data link type: 113(LINUX_SLL)
ghost commented 6 years ago

You probably wouldn't believe me, but I was actually ABLE to run masscan while having a ppp connection!

sudo docker run -it ilyaglow/masscan -p80 0.0.0.0/4 --rate 1000000 --output-filename te --output-format list
ghost commented 6 years ago

@robertdavidgraham so if it works with docker, can we run it WITHOUT docker? Because it means there's a possibility to run it (and yes, it works and scans hosts)

ghost commented 6 years ago

@robertdavidgraham Hello! Can this issue be resolved by implementing cooked sockets like in ZMap?: https://github.com/zmap/zmap/pull/504

1-1-2 commented 1 year ago

Compile the latest masscan, I manage to run masscan in openwrt on my router.

# masscan --version

Masscan version 1.3.2 ( https://github.com/robertdavidgraham/masscan )
Compiled on: Sep  1 2023 21:45:47
Compiler: gcc 12.3.0
OS: Linux
CPU: unknown (32 bits)
GIT version: unknown

Meet the same problem on PPPoE connection.

# masscan -vvv 157.148.69.74 -p443
[+] pcap: found library: libpcap.so
pfring: error: dlopen('libpfring.so'): No such file or directory
if: route: '   pppoe-wan' dst=0.0.0.0 src=0.0.0.0 gw=172.22.0.1 priority=0
if: route: '   pppoe-wan' dst=172.22.0.1 src=172.19.8.79 gw=0.0.0.0 priority=0
if: route: '         wan' dst=192.168.0.0 src=192.168.0.2 gw=0.0.0.0 priority=0
if: route: '      br-lan' dst=192.168.1.0 src=192.168.1.1 gw=0.0.0.0 priority=0
[+] interface = pppoe-wan
[+] if(pppoe-wan): pcap: libpcap version 1.10.4 (with TPACKET_V3)
[+] if(pppoe-wan): opening...
[+] if(pppoe-wan): successfully opened
[-] if(pppoe-wan): unknown data link type: 113(LINUX_SLL)
[+] interface-type = 113
if:pppoe-wan: not receiving transmits
if:pppoe-wan: type=0x0200
[-] FAIL: failed to detect MAC address of interface: "pppoe-wan"
 [hint] try something like "--source-mac 00-11-22-33-44-55"

I've already try those command below with no better result

masscan -vvv 157.148.69.74 -p443 --interface wan
masscan -vvv 157.148.69.74 -p443 --interface br-lan --router-ip 192.168.1.1 --router-mac <eth_mac_here>

@robertdavidgraham May I ask if there's any method to walk around this? Does this means an unsupported feature in masscan.