环境
云服务器CentOS 7.6
项目地址:https://github.com/projectdiscovery/naabu
安装
1.在安装 naabu 之前,请确保安装libpcap库:
yum install -y libpcap-devel
或apt install -y libpcap-dev
如果是CentOS 8.0安装失败,可能是源的问题,也可能是官方不支持了的原因
2.在github上下载二进制文件到本机中,再将它移动到CentOS中。
3.直接运行./naabu
,出现错误
error while loading shared libraries: libpcap.so.0.8: cannot open shared object file: No such file or directory
解决方法:
因为安装过libpcap-devel
,所以先查找一下libpcap文件
locate libpcap
发现了安装的是1.5.3版本,cd到/usr/lib64目录下,建一个软链接文件:
cd /usr/lib64
ln -s libpcap.so.1.5.3 libpcap.so.0.8
参考链接:https://github.com/knownsec/ksubdomain/issues/1
4.返回naabu所在目录,cd -
运行成功./naabu
使用
基础命令
./naabu -host url
具体用法
使用方法。
./naabu [flags]
INPUT:
-host string 要扫描端口的主机
-list, -l string 包含要扫描端口的主机列表的文件
-exclude-hosts, -eh string 指定一个用逗号分隔的列表,列出要从扫描中排除的目标(ip, cidr)。
-exclude-file, -ef string 指定一个以新行分隔的文件,包含要从扫描中排除的目标(ip, cidr)。
PORT:
-port, -p string 要扫描的端口(80, 80,443, 100-200
-top-ports, -tp string 要扫描的顶级端口 (默认为前100)
-exclud-ports, -ep string 要从扫描中排除的端口
-ports-file, -pf string 包含要扫描的端口的文件
-exclude-cdn, -ec 跳过对CDN的完整端口扫描(只检查80,443)。
RATE-LIMIT:
-c int 一般内部工作线程(默认为25)
-rate int 端口扫描探测请求的速率(默认为1000)。
OUTPUT:
-o, -output string 将输出写入的文件(可选)
-json 以JSON行格式写输出
CONFIGURATION:
-scan-all-ips 扫描所有的ips
-scan-type, -s string 端口扫描类型(SYN/CONNECT) (默认为s)
-source-ip string 来源Ip
-interface-list, -il 列出可用的接口和公共IP
-interface, -i string 用于端口扫描的网络接口
-nmap 在目标上调用nmap扫描(必须安装nmap)
-nmap-cli string 在找到的结果上运行nmap命令(例如:-nmap-cli 'nmap -sV')。
优化。
-retries int 端口扫描探测的重试次数(默认为3)
-timeout int 超时前等待的毫秒数(默认为1000)
-warm-up-time int 扫描阶段之间的时间(秒)(默认为2
-ping 使用ping探针来验证主机
-verify 用TCP验证再次验证端口
DEBUG:
-debug 启用调试信息
-v 显示Verbose输出
-no-color, -nc 在输出中不使用颜色
-silent 在输出中只显示找到的端口
-version 显示naabu的版本
-stats 显示运行中的扫描的统计信息