Get Interfaces via API

Description

Displays information about the local network interfaces including: name, description, IPs, DNS servers, and ARP entries.

Overview

Leverages APIs to gather the following information about each interface:

  • Name
  • Description
  • Status (e.g. Up, Down)
  • Type (e.g. Ethernet, Loopback)
  • IPs
  • DNS servers
  • WINS servers
  • ARP entries.

Dependencies

  • recon

Operating Systems

  • Windows

Example Output

[
  {
    "InterfaceIndex": 1,
    "InterfaceName": "Loopback Pseudo-Interface 1",
    "InterfaceDescription": "Software Loopback Interface 1",
    "Status": "Up",
    "InterfaceType": "Loopback",
    "InterfaceIPs": [
      {
        "IP": "::1",
        "Netmask": "0.0.0.0"
      },
      {
        "IP": "127.0.0.1",
        "Netmask": "255.0.0.0"
      }
    ],
    "DnsServers": [
      "fec0:0:0:ffff::1%1",
      "fec0:0:0:ffff::2%1",
      "fec0:0:0:ffff::3%1"
    ],
    "DhcpServers": [],
    "WinsServers": [],
    "Gateways": [],
    "Entries": [
      {
        "Address": "224.0.0.22",
        "PhysicalAddress": "00-00-00-00-00-00",
        "EntryType": "Static"
      },
      {
        "Address": "239.255.255.250",
        "PhysicalAddress": "00-00-00-00-00-00",
        "EntryType": "Static"
      }
    ]
  },
  {
    "InterfaceIndex": 3,
    "InterfaceName": "Bluetooth Network Connection",
    "InterfaceDescription": "Bluetooth Device (Personal Area Network)",
    "Status": "Down",
    "InterfaceType": "Ethernet",
    "InterfaceIPs": [
      {
        "IP": "fe80::94af:e0eb:a646:a008%3",
        "Netmask": "0.0.0.0"
      },
      {
        "IP": "169.254.160.8",
        "Netmask": "255.255.0.0"
      }
    ],
    "DnsServers": [
      "fec0:0:0:ffff::1%1",
      "fec0:0:0:ffff::2%1",
      "fec0:0:0:ffff::3%1"
    ],
    "DhcpServers": [],
    "WinsServers": [],
    "Gateways": [],
    "Entries": [
      {
        "Address": "224.0.0.22",
        "PhysicalAddress": "01-00-5E-00-00-16",
        "EntryType": "Static"
      }
    ]
  },
  {
    "InterfaceIndex": 5,
    "InterfaceName": "Ethernet0",
    "InterfaceDescription": "Intel(R) 82574L Gigabit Network Connection",
    "Status": "Up",
    "InterfaceType": "Ethernet",
    "InterfaceIPs": [
      {
        "IP": "fe80::4d29:4f21:ff5:d73f%5",
        "Netmask": "0.0.0.0"
      },
      {
        "IP": "192.168.1.103",
        "Netmask": "255.255.255.0"
      }
    ],
    "DnsServers": [
      "192.168.1.2"
    ],
    "DhcpServers": [
      "192.168.1.2"
    ],
    "WinsServers": [
      "192.168.1.2"
    ],
    "Gateways": [
      "192.168.1.1"
    ],
    "Entries": [
      {
        "Address": "192.168.1.2",
        "PhysicalAddress": "00-0C-29-24-31-7C",
        "EntryType": "Dynamic"
      },
      {
        "Address": "192.168.1.104",
        "PhysicalAddress": "00-0C-29-76-5E-F8",
        "EntryType": "Dynamic"
      },
      {
        "Address": "192.168.1.255",
        "PhysicalAddress": "FF-FF-FF-FF-FF-FF",
        "EntryType": "Static"
      },
      {
        "Address": "224.0.0.22",
        "PhysicalAddress": "01-00-5E-00-00-16",
        "EntryType": "Static"
      },
      {
        "Address": "224.0.0.251",
        "PhysicalAddress": "01-00-5E-00-00-FB",
        "EntryType": "Static"
      },
      {
        "Address": "224.0.0.252",
        "PhysicalAddress": "01-00-5E-00-00-FC",
        "EntryType": "Static"
      },
      {
        "Address": "239.255.255.250",
        "PhysicalAddress": "01-00-5E-7F-FF-FA",
        "EntryType": "Static"
      },
      {
        "Address": "255.255.255.255",
        "PhysicalAddress": "FF-FF-FF-FF-FF-FF",
        "EntryType": "Static"
      }
    ]
  }
]
Scroll to Top