Skip to content

Naabu Executor

Category: Discovery and Reconnaissance Script: naabu.py Integration: CLI Faraday Plugin: NaabuPlugin Website: projectdiscovery/naabu

Description

Runs a Naabu port scan against one or more hosts and imports the open ports into Faraday as hosts and services.

Prerequisites

  • naabu installed and available in the agent's PATH (checked with naabu -version)
  • Network access from the agent to the targets, and authorization to scan them
  • Root privileges if you want Naabu to use SYN scans (otherwise it falls back to CONNECT scans)

Configuration

Environment Variables (Setup)

This executor does not require setup environment variables.

Execution Arguments

Parameter Type Mandatory Description
NAABU_HOST string No* Host to scan: an IP, hostname or CIDR (e.g., 10.0.0.0/24)
NAABU_HOST_LIST list No* Several hosts to scan (e.g., ["10.0.0.1", "example.com"]). Takes precedence over NAABU_HOST.
NAABU_PORTS string No Ports to scan (e.g., 22,80,443,8000-8100). Cannot be combined with NAABU_TOP_PORTS.
NAABU_TOP_PORTS string No Scan the most common ports: 100, 1000 or full. Cannot be combined with NAABU_PORTS.
NAABU_RATE integer No Packets per second to send
NAABU_THREADS integer No Number of concurrent workers

* You must set NAABU_HOST or NAABU_HOST_LIST.

YAML Configuration Example

executors:
  naabu:
    repo_executor: naabu.py
    max_size: 65536
    varenvs: {}
    params:
      NAABU_HOST:
        mandatory: false
        type: string
        base: string
      NAABU_HOST_LIST:
        mandatory: false
        type: list
        base: list
      NAABU_PORTS:
        mandatory: false
        type: string
        base: string
      NAABU_TOP_PORTS:
        mandatory: false
        type: string
        base: string
      NAABU_RATE:
        mandatory: false
        type: integer
        base: integer
      NAABU_THREADS:
        mandatory: false
        type: integer
        base: integer

How It Works

  1. Validates the arguments: a host is required, NAABU_TOP_PORTS must be 100, 1000 or full, and only one of NAABU_PORTS and NAABU_TOP_PORTS may be set
  2. Runs naabu -json -silent against NAABU_HOST, or against a temporary file built from NAABU_HOST_LIST
  3. Parses the JSON output with NaabuPlugin and sends the hosts and open ports to Faraday

Notes

  • When neither NAABU_PORTS nor NAABU_TOP_PORTS is set, Naabu scans its default port list.
  • The run fails if Naabu does not produce an output file.
  • Supports the shared agent parameters (AGENT_CONFIG_* tags and severity filters).