使用特定于IP地址的nmap的OS检测

问题描述 投票:2回答:1

我正在尝试使用nmap确定特定IP地址的OS。到目前为止,这是我的代码:

import java.io.*;

public class NmapFlags {
  public static void main(String[] args) throws Exception {
    try {

      String[] cmdarray = { "nmap", "-O", "66.110.59.130" };//

      // example trying to find the OS or device detials of this Ip address//
      Process process = Runtime.getRuntime().exec(cmdarray);
      BufferedReader r = new BufferedReader(new InputStreamReader(
          process.getInputStream()));
      String s;
      while ((s = r.readLine()) != null) {
        System.out.println(s);

      }

      r.close();

    } catch (IOException e) {
      e.printStackTrace();
    }
  }
}

运行此代码输出后,我得到的是:

All 1000 scanned ports on 66.110.59.130 are filtered
All 1000 scanned ports on 66.110.59.130 are filtered
Too many fingerprints match this host to give specific OS details
Too many fingerprints match this host to give specific OS details
OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 246.06 seconds
Nmap done: 1 IP address (1 host up) scanned in 246.06 seconds**

还有其他可用来检测设备类型的nmap标志吗?我尝试了-A选项。我需要在跟踪路由的每一跳处找到设备详细信息。

nmap
1个回答
3
投票

Nmap执行“主动指纹识别”(发送数据包然后分析响应)以猜测远程操作系统是什么。这些探针颇具侵入性,我建议您阅读有关它的更多信息(http://nmap.org/book/osdetect-fingerprint-format.html)。

“与该主机匹配的指纹过多,无法提供特定的OS详细信息”表示探针矛盾或过于广泛。例如,在NAT方案中,某些端口扫描返回路由器信息(例如Cisco iOS),另一些探针返回实际的主机规格(例如Windows)。

了解网络设计的最佳方法是根据不同的探测和输出,依靠您自己的判断。

IP ID序列,指纹分析和服务检测(-sV)可以帮助:

例如如果打开3389,则运行的操作系统是Windows。

例如如果IP ID顺序不同,则目标可能是多个(负载平衡)。

您对网络流量的分析将永远比nmap试图自动猜测的内容更加准确。

© www.soinside.com 2019 - 2024. All rights reserved.