masscan icon indicating copy to clipboard operation
masscan copied to clipboard

Pfring ZC Not Working

Open stanley111111 opened this issue 3 years ago • 7 comments

https://github.com/ntop/PF_RING/issues/818

Any ideas? why masscan doesn't seem to work with PFRING ZC? Anyone had any luck with the 10gbe driver? :)

stanley111111 avatar Jun 27 '22 11:06 stanley111111

masscan 127.0.0.0/24 -p 443 -vv --pfring

pcap: found library: libpcap.so
pcap: pcap_dev_name: failed
pcap: pcap_dev_description: failed
pcap: pcap_dev_next: failed
pcap: pcap_sendqueue_alloc: failed
pcap: pcap_sendqueue_transmit: failed
pcap: pcap_sendqueue_destroy: failed
pcap: pcap_sendqueue_queue: failed
pfring: found 'libpfring.so'!
pfring: successfully loaded PF_RING API
pfring: found 'pf_ring' driver
pfring: found 'ixgbe' driver
pfring: found 'pf_ring' driver module
initializing adapter
auto-detected: interface=enp6s0f0
auto-detected: adapter-ip=x.x.x.x.x
enp6s0f0: type=0x   1
auto-detected: adapter-mac=00-1b-21-bc-76-96
No pfring adapter available. Please install pfring or run masscan without the --pfring option.
adapter[enp6s0f0].init: failed

stanley111111 avatar Jul 02 '22 08:07 stanley111111

masscan 127.0.0.0/24 -p 443 -vv --wait 0 --retries 2 --rate 1000000 --pfring -e zc:enp6s0f0 --adapter-ip x.x.x.x.x --adapter-mac xx:xxx:xxx:xxx

pcap: pcap_dev_name: failed
pcap: pcap_dev_description: failed
pcap: pcap_dev_next: failed
pcap: pcap_sendqueue_alloc: failed
pcap: pcap_sendqueue_transmit: failed
pcap: pcap_sendqueue_destroy: failed
pcap: pcap_sendqueue_queue: failed
pfring: found 'libpfring.so'!
pfring: successfully loaded PF_RING API
pfring: found 'pf_ring' driver
pfring: found 'ixgbe' driver
pfring: found 'pf_ring' driver module
initializing adapter
pfring:'zc:enp6s0f0': opening...
pfring:'zc:enp6s0f0': OPEN ERROR: Operation not permitted
adapter[zc:enp6s0f0].init: failed

stanley111111 avatar Jul 02 '22 08:07 stanley111111

What does pf_ringcfg --list-interfaces say?

mzpqnxow avatar Jul 02 '22 11:07 mzpqnxow

Also, try removing the --pfring from your invocation. It's not needed, the "zc" in the interface name implies PF_RING will be used

mzpqnxow avatar Jul 02 '22 11:07 mzpqnxow

What does pf_ringcfg --list-interfaces say?

Just noticed the issue you linked, disregard this question

mzpqnxow avatar Jul 02 '22 11:07 mzpqnxow

Anyone had any luck with the 10gbe driver? :)

FWIW, I was using it as of 3-4 months ago on ixgbe

mzpqnxow avatar Jul 02 '22 11:07 mzpqnxow

Just noticed you're getting EPERM.. are you running as root, or have the necessary caps set on the executable (CAP_NET_RAW and/or CAP_SYS_ADMIN depending on PF ring version)

A regular user can't do low-level networking operations like this

mzpqnxow avatar Dec 09 '23 16:12 mzpqnxow