{"id":13471504,"url":"https://github.com/projectdiscovery/naabu","last_synced_at":"2025-05-14T08:02:03.500Z","repository":{"id":37044858,"uuid":"235320869","full_name":"projectdiscovery/naabu","owner":"projectdiscovery","description":"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","archived":false,"fork":false,"pushed_at":"2025-05-05T16:35:28.000Z","size":2776,"stargazers_count":5143,"open_issues_count":13,"forks_count":591,"subscribers_count":70,"default_branch":"dev","last_synced_at":"2025-05-07T07:02:32.475Z","etag":null,"topics":["cdn-exclusion","hacktoberfest","nmap","port-enumeration","portscanner","scan-ports"],"latest_commit_sha":null,"homepage":"https://projectdiscovery.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectdiscovery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-21T10:56:32.000Z","updated_at":"2025-05-07T01:19:23.000Z","dependencies_parsed_at":"2023-09-27T20:29:48.616Z","dependency_job_id":"60e65766-8792-4d10-afed-d7718b4f4f47","html_url":"https://github.com/projectdiscovery/naabu","commit_stats":{"total_commits":1090,"total_committers":51,"mean_commits":"21.372549019607842","dds":"0.47706422018348627","last_synced_commit":"23893097ceea30125ecbcb1f068de0e4314340f3"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fnaabu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fnaabu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fnaabu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fnaabu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectdiscovery","download_url":"https://codeload.github.com/projectdiscovery/naabu/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101579,"owners_count":22014904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdn-exclusion","hacktoberfest","nmap","port-enumeration","portscanner","scan-ports"],"created_at":"2024-07-31T16:00:45.947Z","updated_at":"2025-05-14T08:02:03.445Z","avatar_url":"https://github.com/projectdiscovery.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"static/naabu-logo.png\" alt=\"naabu\" width=\"200px\"\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-_red.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/projectdiscovery/naabu/issues\"\u003e\u003cimg src=\"https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://goreportcard.com/badge/github.com/projectdiscovery/naabu\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/projectdiscovery/naabu\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/projectdiscovery/naabu/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/projectdiscovery/naabu\"\u003e\u003c/a\u003e\n\u003ca href=\"https://twitter.com/pdiscoveryio\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/pdiscoveryio.svg?logo=twitter\"\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/projectdiscovery\"\u003e\u003cimg src=\"https://img.shields.io/discord/695645237418131507.svg?logo=discord\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#installation-instructions\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#running-naabu\"\u003eRunning naabu\u003c/a\u003e •\n  \u003ca href=\"#configuration-file\"\u003eConfig\u003c/a\u003e •\n  \u003ca href=\"#nmap-integration\"\u003eNMAP integration\u003c/a\u003e •\n  \u003ca href=\"#cdn-waf-exclusion\"\u003eCDN/WAF Exclusion\u003c/a\u003e •\n  \u003ca href=\"https://discord.gg/projectdiscovery\"\u003eDiscord\u003c/a\u003e\n\u003c/p\u003e\n\nNaabu is a port scanning tool written in Go that allows you to enumerate valid ports for hosts in a fast and reliable manner. It is a really simple tool that does fast SYN/CONNECT/UDP scans on the host/list of hosts and lists\nall ports that return a reply.\n\n# Features\n\n\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/8293321/180417395-25b1b990-c032-4b5c-9b66-03b58db0789a.png\" alt=\"naabu\" width=\"700px\"\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n - Fast And Simple **SYN/CONNECT/UDP** probe based scanning\n - Optimized for ease of use and **lightweight** on resources\n - **DNS** Port scan\n - **Automatic IP Deduplication** for DNS port scan\n - **IPv4/IPv6** Port scan (**experimental**)\n - **Passive** Port enumeration using Shodan [Internetdb](https://internetdb.shodan.io)\n - **Host Discovery** scan (**experimental**)\n - **NMAP** integration for service discovery\n - Multiple input support - **STDIN/HOST/IP/CIDR/ASN**\n - Multiple output format support - **JSON/TXT/STDOUT**\n\n# Usage\n\n```sh\nnaabu -h\n```\n\nThis will display help for the tool. Here are all the switches it supports.\n\n```yaml\nUsage:\n  naabu [flags]\n\nFlags:\nINPUT:\n   -host string[]              hosts to scan ports for (comma-separated)\n   -list, -l string            list of hosts to scan ports (file)\n   -exclude-hosts, -eh string  hosts to exclude from the scan (comma-separated)\n   -exclude-file, -ef string   list of hosts to exclude from scan (file)\n\nPORT:\n   -port, -p string            ports to scan (80,443, 100-200)\n   -top-ports, -tp string      top ports to scan (default 100) [full,100,1000]\n   -exclude-ports, -ep string  ports to exclude from scan (comma-separated)\n   -ports-file, -pf string     list of ports to scan (file)\n   -port-threshold, -pts int   port threshold to skip port scan for the host\n   -exclude-cdn, -ec           skip full port scans for CDN/WAF (only scan for port 80,443)\n   -display-cdn, -cdn          display cdn in use\n\nRATE-LIMIT:\n   -c int     general internal worker threads (default 25)\n   -rate int  packets to send per second (default 1000)\n\nUPDATE:\n   -up, -update                 update naabu to latest version\n   -duc, -disable-update-check  disable automatic naabu update check\n\nOUTPUT:\n   -o, -output string  file to write output to (optional)\n   -j, -json           write output in JSON lines format\n   -csv                write output in csv format\n\nCONFIGURATION:\n   -config string                   path to the naabu configuration file (default $HOME/.config/naabu/config.yaml)\n   -scan-all-ips, -sa               scan all the IP's associated with DNS record\n   -ip-version, -iv string[]        ip version to scan of hostname (4,6) - (default 4) (default [\"4\"])\n   -scan-type, -s string            type of port scan (SYN/CONNECT) (default \"c\")\n   -source-ip string                source ip and port (x.x.x.x:yyy - might not work on OSX) \n   -interface-list, -il             list available interfaces and public ip\n   -interface, -i string            network Interface to use for port scan\n   -nmap                            invoke nmap scan on targets (nmap must be installed) - Deprecated\n   -nmap-cli string                 nmap command to run on found results (example: -nmap-cli 'nmap -sV')\n   -r string                        list of custom resolver dns resolution (comma separated or from file)\n   -proxy string                    socks5 proxy (ip[:port] / fqdn[:port]\n   -proxy-auth string               socks5 proxy authentication (username:password)\n   -resume                          resume scan using resume.cfg\n   -stream                          stream mode (disables resume, nmap, verify, retries, shuffling, etc)\n   -passive                         display passive open ports using shodan internetdb api\n   -irt, -input-read-timeout value  timeout on input read (default 3m0s)\n   -no-stdin                        Disable Stdin processing\n\nHOST-DISCOVERY:\n   -sn, -host-discovery           Perform Only Host Discovery\n   -Pn, -skip-host-discovery      Skip Host discovery (Deprecated: use -wn/-with-host-discovery instead)\n   -wn, -with-host-discovery      Enable Host discovery\n   -ps, -probe-tcp-syn string[]   TCP SYN Ping (host discovery needs to be enabled)\n   -pa, -probe-tcp-ack string[]   TCP ACK Ping (host discovery needs to be enabled)\n   -pe, -probe-icmp-echo          ICMP echo request Ping (host discovery needs to be enabled)\n   -pp, -probe-icmp-timestamp     ICMP timestamp request Ping (host discovery needs to be enabled)\n   -pm, -probe-icmp-address-mask  ICMP address mask request Ping (host discovery needs to be enabled)\n   -arp, -arp-ping                ARP ping (host discovery needs to be enabled)\n   -nd, -nd-ping                  IPv6 Neighbor Discovery (host discovery needs to be enabled)\n   -rev-ptr                       Reverse PTR lookup for input ips\n\nOPTIMIZATION:\n   -retries int       number of retries for the port scan (default 3)\n   -timeout int       millisecond to wait before timing out (default 1000)\n   -warm-up-time int  time in seconds between scan phases (default 2)\n   -ping              ping probes for verification of host\n   -verify            validate the ports again with TCP verification\n\nDEBUG:\n   -health-check, -hc        run diagnostic check up\n   -debug                    display debugging information\n   -verbose, -v              display verbose output\n   -no-color, -nc            disable colors in CLI output\n   -silent                   display only results in output\n   -version                  display version of naabu\n   -stats                    display stats of the running scan (deprecated)\n   -si, -stats-interval int  number of seconds to wait between showing a statistics update (deprecated) (default 5)\n   -mp, -metrics-port int    port to expose naabu metrics on (default 63636)\n\nCLOUD:\n   -auth                           configure projectdiscovery cloud (pdcp) api key (default true)\n   -ac, -auth-config string        configure projectdiscovery cloud (pdcp) api key credential file\n   -pd, -dashboard                 upload / view output in projectdiscovery cloud (pdcp) UI dashboard\n   -tid, -team-id string           upload asset results to given team id (optional)\n   -aid, -asset-id string          upload new assets to existing asset id (optional)\n   -aname, -asset-name string      assets group name to set (optional)\n   -pdu, -dashboard-upload string  upload naabu output file (jsonl) in projectdiscovery cloud (pdcp) UI dashboard\n```\n\n# Installation Instructions\n\nDownload the ready to run [binary](https://github.com/projectdiscovery/naabu/releases/) / [docker](https://hub.docker.com/r/projectdiscovery/naabu) or install with GO\n\n## Prerequisite\n\n\u003e **Note**: before installing naabu, make sure to install `libpcap` library for packet capturing.\n\nTo install libcap on **Linux**: `sudo apt install -y libpcap-dev`, on **Mac**: `brew install libpcap`\n\n\n## Installing Naabu\n\n```sh\ngo install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest\n```\n\n# Running Naabu\n\nTo run the tool on a target, just use the following command.\n```sh\nnaabu -host hackerone.com\n```\n\nThis will run the tool against hackerone.com. There are a number of configuration options that you can pass along with this command. The verbose switch `-v` can be used to display verbose information.\n\n```console\nnaabu -host hackerone.com\n\n                  __\n  ___  ___  ___ _/ /  __ __\n / _ \\/ _ \\/ _ \\/ _ \\/ // /\n/_//_/\\_,_/\\_,_/_.__/\\_,_/ v2.0.3\n\n    projectdiscovery.io\n\n[WRN] Use with caution. You are responsible for your actions\n[WRN] Developers assume no liability and are not responsible for any misuse or damage.\n[INF] Running SYN scan with root privileges\n[INF] Found 4 ports on host hackerone.com (104.16.100.52)\n\nhackerone.com:80\nhackerone.com:443\nhackerone.com:8443\nhackerone.com:8080\n```\n\nThe ports to scan for on the host can be specified via `-p` parameter (udp ports must be expressed as `u:port`). It takes nmap format ports and runs enumeration on them.\n\n```sh\nnaabu -p 80,443,21-23,u:53 -host hackerone.com\n```\n\nBy default, the Naabu checks for nmap's `Top 100` ports. It supports the following in-built port lists -\n\n| Flag              | Description                          |\n|-------------------|--------------------------------------|\n| `-top-ports 100`  | Scan for nmap top **100** port       |\n| `-top-ports 1000` | Scan for nmap top **1000** port      |\n| `-p - `           | Scan for full ports from **1-65535** |\n\nYou can also specify specific ports which you would like to exclude from the scan.\n\n```sh\nnaabu -p - -exclude-ports 80,443\n```\n\nTo run the naabu on a list of hosts, `-list` option can be used.\n\n```sh\nnaabu -list hosts.txt\n```\nTo run the naabu on a ASN, AS input can be used. It takes the IP address available for given ASN and runs the enumeration on them.\n\n```console\necho AS14421 | naabu -p 80,443\n\n216.101.17.249:80\n216.101.17.249:443\n216.101.17.248:443\n216.101.17.252:443\n216.101.17.251:80\n216.101.17.251:443\n216.101.17.250:443\n216.101.17.250:80\n```\nYou can also get output in json format using `-json` switch. This switch saves the output in the JSON lines format.\n\n```console\nnaabu -host 104.16.99.52 -json\n\n{\"ip\":\"104.16.99.52\",\"port\":443}\n{\"ip\":\"104.16.99.52\",\"port\":80}\n```\n\nThe ports discovered can be piped to other tools too. For example, you can pipe the ports discovered by naabu to [httpx](https://github.com/projectdiscovery/httpx) which will then find running http servers on the host.\n\n```console\necho hackerone.com | naabu -silent | httpx -silent\n\nhttp://hackerone.com:8443\nhttp://hackerone.com:443\nhttp://hackerone.com:8080\nhttp://hackerone.com:80\n```\n\nThe speed can be controlled by changing the value of `rate` flag that represent the number of packets per second. Increasing it while processing hosts may lead to increased false-positive rates. So it is recommended to keep it to a reasonable amount.\n\n# IPv4 and IPv6\n\nNaabu supports both IPv4 and IPv6. Both ranges can be piped together as input. If IPv6 is used, connectivity must be correctly configured, and the network interface must have an IPv6 address assigned (`inet6`) and a default gateway.\n\n```console\necho hackerone.com | dnsx -resp-only -a -aaaa -silent | naabu -p 80 -silent\n\n104.16.99.52:80\n104.16.100.52:80\n2606:4700::6810:6434:80\n2606:4700::6810:6334:80\n```\n\nThe option `-ip-version 6` makes the tool use IPv6 addresses while resolving domain names.\n\n```console\necho hackerone.com | ./naabu -p 80 -ip-version 6\n\n                  __\n  ___  ___  ___ _/ /  __ __\n / _ \\/ _ \\/ _ \\/ _ \\/ // /\n/_//_/\\_,_/\\_,_/_.__/\\_,_/ v2.0.8\n\n      projectdiscovery.io\n\nUse with caution. You are responsible for your actions\nDevelopers assume no liability and are not responsible for any misuse or damage.\n[INF] Running CONNECT scan with non root privileges\n[INF] Found 1 ports on host hackerone.com (2606:4700::6810:6334)\nhackerone.com:80\n```\n\nTo scan all the IPs of both version, `ip-version 4,6` can be used along with `-scan-all-ips` flag.\n\n```console\necho hackerone.com | ./naabu -iv 4,6 -sa -p 80 -silent\n\n[INF] Found 1 ports on host hackerone.com (104.16.100.52)\nhackerone.com:80\n[INF] Found 1 ports on host hackerone.com (104.16.99.52)\nhackerone.com:80\n[INF] Found 1 ports on host hackerone.com (2606:4700::6810:6334)\nhackerone.com:80\n[INF] Found 1 ports on host hackerone.com (2606:4700::6810:6434)\nhackerone.com:80\n```\n\n# Host Discovery\n\nNaabu optionally supports multiple options to perform host discovery. Host discovery is optional and can be enabled with the `-wn` flag. `-sn` flag instructs the tool to perform host discovery only.\n\nAvailable options to perform host discovery:\n\n- **ARP** ping (`-arp`)\n- TCP **SYN** ping (`-ps 80`)\n- TCP **ACK** ping (`-pa 443`)\n- ICMP **echo** ping (`-pe`)\n- ICMP **timestamp** ping (`-pp`)\n- ICMP **address mask** ping (`-pm`)\n- IPv6 **neighbor discovery** (`-nd`)\n\n# Configuration file\n\nNaabu supports config file as default located at `$HOME/.config/naabu/config.yaml`, It allows you to define any flag in the config file and set default values to include for all scans.\n\n\n# Nmap integration\n\nWe have integrated nmap support for service discovery or any additional scans supported by nmap on the found results by Naabu, make sure you have `nmap` installed to use this feature.\n\nTo use,`nmap-cli` flag can be used followed by nmap command, for example:-\n\n```console\necho hackerone.com | naabu -nmap-cli 'nmap -sV -oX nmap-output'\n                  __       \n  ___  ___  ___ _/ /  __ __\n / _ \\/ _ \\/ _ \\/ _ \\/ // /\n/_//_/\\_,_/\\_,_/_.__/\\_,_/ v2.0.0        \n\n    projectdiscovery.io\n\n[WRN] Use with caution. You are responsible for your actions\n[WRN] Developers assume no liability and are not responsible for any misuse or damage.\n[INF] Running TCP/ICMP/SYN scan with root privileges\n[INF] Found 4 ports on host hackerone.com (104.16.99.52)\n\nhackerone.com:443\nhackerone.com:80\nhackerone.com:8443\nhackerone.com:8080\n\n[INF] Running nmap command: nmap -sV -p 80,8443,8080,443 104.16.99.52\n\nStarting Nmap 7.01 ( https://nmap.org ) at 2020-09-23 05:02 UTC\nNmap scan report for 104.16.99.52\nHost is up (0.0021s latency).\nPORT     STATE SERVICE       VERSION\n80/tcp   open  http          cloudflare\n443/tcp  open  ssl/https     cloudflare\n8080/tcp open  http-proxy    cloudflare\n8443/tcp open  ssl/https-alt cloudflare\n```\n\n# CDN/WAF Exclusion\n\nNaabu also supports excluding CDN/WAF IPs being port scanned. If used, only `80` and `443` ports get scanned for those IPs. This feature can be enabled by using `exclude-cdn` flag.\n\nCurrently `cloudflare`, `akamai`, `incapsula` and `sucuri` IPs are supported for exclusions.\n\n# Scan Status\nNaabu exposes json scan info on a local port bound to localhost at `http://localhost:63636/metrics` (the port can be changed via the `-metrics-port` flag)\n\n# Using naabu as library\nThe following sample program scan the port `80` of `scanme.sh`. The results are returned via the `OnResult` callback:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/projectdiscovery/goflags\"\n\t\"github.com/projectdiscovery/naabu/v2/pkg/result\"\n\t\"github.com/projectdiscovery/naabu/v2/pkg/runner\"\n)\n\nfunc main() {\n\toptions := runner.Options{\n\t\tHost:      goflags.StringSlice{\"scanme.sh\"},\n\t\tScanType: \"s\",\n\t\tOnResult: func(hr *result.HostResult) {\n\t\t\tlog.Println(hr.Host, hr.Ports)\n\t\t},\n\t\tPorts: \"80\",\n\t}\n\n\tnaabuRunner, err := runner.NewRunner(\u0026options)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer naabuRunner.Close()\n\n\tnaabuRunner.RunEnumeration()\n}\n```\n\n# Notes\n\n- Naabu allows arbitrary binary execution as a feature to support [nmap integration](https://github.com/projectdiscovery/naabu#nmap-integration).\n- Naabu is designed to scan ports on multiple hosts / mass port scanning. \n- As default naabu is configured with a assumption that you are running it from VPS.\n- We suggest tuning the flags / rate if running naabu from local system.\n- For best results, run naabu as **root** user.\n\n-----\n\nNaabu is made with 🖤 by the [projectdiscovery](https://projectdiscovery.io) team. Community contributions have made the project what it is. \n\nSee the **[Thanks.md](https://github.com/projectdiscovery/naabu/blob/master/THANKS.md)** file for more details.\n","funding_links":[],"categories":["Go","Recon","Sec","Weapons","Go (531)","扫描器、资产收集、子域名"],"sub_categories":["Port Scanning","Kubernetes","Tools","网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectdiscovery%2Fnaabu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectdiscovery%2Fnaabu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectdiscovery%2Fnaabu/lists"}