与IPv4一起使用时出现奇怪的错误“((22-'无效参数'))”

时间:2019-01-22 12:34:55

标签: nmap

我有使用nmap的“((22-'Invalid arguments')')”。 我用谷歌搜索了https://seclists.org/nmap-dev/ 但是关于它,当我使用此错误时,它谈论的是IPv6 IPv4在任何地方都没有提及IPv4,为什么我会得到 这个奇怪的错误吗?

我输入了

nmap --send-eth --release-memory --nsock-engine=epoll --allports --fuzzy 
--randomize-hosts --log-errors  --max-os-tries=9 -n --reason --append-output 
--scanflags=URGACKPSHRSTSYNFIN --max-retries=6 --host-timeout=225s
 --stats-every=10m --ttl=255 --min-hostgroup=5 --max-hostgroup=25 
--max-rtt-timeout=60s --scan-delay=250ms --max-scan-delay=25s 
--stats-every=1 -v5 -sT -sV -A -p 80-82 0.18.0.0

得到了:

Starting Nmap 7.70 ( https://nmap.org ) at 2019-01-17 16:05 CET
NSE: Loaded 148 scripts for scanning.
NSE: Script Pre-scanning.
NSE: Starting runlevel 1 (of 2) scan.
Initiating NSE at 16:05
Completed NSE at 16:05, 0.00s elapsed
NSE: Starting runlevel 2 (of 2) scan.
Initiating NSE at 16:05
Completed NSE at 16:05, 0.00s elapsed
Initiating Ping Scan at 16:05
Scanning 0.18.0.0 [2 ports]
Stats: 0:00:01 elapsed; 0 hosts completed (0 up), 1 undergoing Ping Scan
Ping Scan Timing: About 0.00% done
Strange read error from 0.18.0.0 (22 - 'Invalid argument')
Strange read error from 0.18.0.0 (22 - 'Invalid argument')
Completed Ping Scan at 16:05, 0.50s elapsed (1 total hosts)
NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 2) scan.
Initiating NSE at 16:05
Completed NSE at 16:05, 0.00s elapsed
NSE: Starting runlevel 2 (of 2) scan.
Initiating NSE at 16:05
Completed NSE at 16:05, 0.00s elapsed
Read data files from: /usr/bin/../share/nmap
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 1.46 seconds

尝试较少争论时nmap -p 80-82 0.18.0.0 得到了:

Starting Nmap 7.70 ( https://nmap.org ) at 2019-01-17 16:24 CET
Strange read error from 0.18.0.0 (22 - 'Invalid argument')
Strange read error from 0.18.0.0 (22 - 'Invalid argument')
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 0.12 seconds

尝试使用ncat时,我得到了:

marc@platinum:~/NCat_test$ nc -vvv 0.18.0.0 80
0.18.0.0: inverse host lookup failed: Unknown host
(UNKNOWN) [0.18.0.0] 80 (http) : Invalid argument
 sent 0, rcvd 0

marc@platinum:~/NCat_test$ nc -vvv 0.18.0.0 81
0.18.0.0: inverse host lookup failed: Unknown host
(UNKNOWN) [0.18.0.0] 81 (hosts2-ns) : Invalid argument
 sent 0, rcvd 0

我仍然有“无效的论据”,但是这次不是22,而是获得了帖子编号和服务

80(http) 81(hosts2-ns)

这引发了一些问题

1)ncat和nmap的“无效参数”是否与同一件事相关?

2)我如何使nmap信息化而不是打印22?

3)我怎么能说由于防火墙而使远程端口真正关闭或真正打开并拒绝?

感谢您的帮助

1 个答案:

答案 0 :(得分:0)

0.0.0.0/8网络中的IP地址(第一个位置带有0的任何地址)保留为“当前网络”,仅作为源地址有效。 Nmap通常倾向于不禁止诸如无效地址或端口号之类的异常事件(大多数实现中类似地保留端口0),因为当您违反约定时会发生有趣的事情。但是,当Nmap调用系统的网络功能时,它们可能会产生这样的错误。