projectdiscovery / naabu

A fast port scanner written in go with a focus on reliability and simplicity. Designed to be used in combination with other tools for attack surface discovery in bug bounties and pentests
https://projectdiscovery.io
MIT License
4.69k stars 547 forks source link

[FTL] Could not create runner: listen ip4:tcp : socket: operation not permitted #707

Closed Captain-v-hook closed 9 months ago

Captain-v-hook commented 1 year ago

I'm using naabu 2.1.6 in my pipelines with following script: naabu -top-ports=1000 -c 50 -list domains.txt -scan-all-ips -stats -rate 1000 -o port_scan.txt But I faced with

                  __
  ___  ___  ___ _/ /  __ __
 / _ \/ _ \/ _ \/ _ \/ // /
/_//_/\_,_/\_,_/_.__/\_,_/
        projectdiscovery.io
[FTL] Could not create runner: listen ip4:tcp : socket: operation not permitted
Cleaning up project directory and file based variables

I did Health Check on naabu and the result was:

Version: 2.1.6
Operative System: linux
Architecture: amd64
Go Version: go1.20.3
Compiler: gc
Privileged/NET_RAW: Ok
Config file "/root/.config/naabu/config.yaml" Read => Ok
Config file "/root/.config/naabu/config.yaml" Write => Ok
TCP IPv4 connectivity to scanme.sh:80 => Ko (dial tcp4 128.199.158.128:80: connect: connection timed out)
TCP IPv6 connectivity to scanme.sh:80 => Ko (dial tcp6 [2400:6180:0:d0::91:1001]:80: connect: network is unreachable)
UDP IPv4 connectivity to scanme.sh:80 => Ok
UDP IPv6 connectivity to scanme.sh:80 => Ko (dial udp6 [2400:6180:0:d0::91:1001]:80: connect: network is unreachable))

Runner executor: Kubernetes

Any help would be appreciated

MetzinAround commented 1 year ago

It would appear the permission issue means you need to make sure naabu is run with root privilege.

https://github.com/projectdiscovery/naabu/issues/296

Mzack9999 commented 9 months ago

it seems like the process detects the possession of NET_CAP_RAW capability, but somehow it's unable to perform outgoing ipv4 connections, as visible in the healthcheck output. Are you able for example to perform curl scanme.sh?