Skip to main content

What a scan touches and reads

This page is for the people who need to know what a Collector does on your network: security, network and server teams. A scan only reads: it changes nothing on the hosts it scans.

Network traffic​

A scan works through the addresses in its scan profile in this order:

  1. Ping. An ICMP echo to each address (IPv4). Where the Collector can't send ICMP, it skips this and relies on the next step.
  2. Port check. A TCP connection attempt to each address on these ports: 22, 80, 135, 443, 445, 515, 631, 3389, 5985, 5986, 8080 and 9100, plus the profile's SSH port if it's another one. With the profile's Port check set to Login ports only, it tries only the SSH port, 5985 and 5986 (see Login ports only). A profile given ports of its own through the API tries those, plus the SSH port, 5985 and 5986, and RDP and the printer ports unless it checks only the login ports. Each attempt waits up to a second, and up to 64 hosts are checked at once. A host that refuses a connection still counts as reachable.
  3. Name lookup. One reverse DNS lookup for each reachable host, through the Collector machine's own DNS servers.
  4. Logging in. On reachable hosts that a credential's Use only for list covers: SSH on the SSH port, then WinRM on 5986 and 5985. Hosts neither got into are asked over SNMP (UDP 161), where an SNMP credential covers them. A scan logs in to a limited number of hosts at once.

What security tools may notice:

  • The ping and port check reach every address in the profile's targets, including ports such as RDP (3389) and SMB (445). Intrusion detection may report this as a port scan. Ask your security team to allow the Collector's address, or set the profile's Port check to Login ports only.
  • Wrong credentials show as failed logins on the hosts.
  • SNMPv3 starts each conversation with a discovery request that names the user starhive-engine-discovery, which a device may log as an unknown user.
  • SNMPv2c communities are sent unencrypted.

Login ports only​

A profile's Port check set to Login ports only checks each address only on the ports the Collector logs in on: the profile's SSH port, 5985 and 5986. It's for a network where intrusion detection or a firewall team allows no more. What it costs:

  • A device is found only when it answers ping, or accepts or refuses a connection on one of those ports. One behind a firewall that silently drops them is found only by ping, and not at all where ping is blocked or the Collector can't send it. Such a device isn't asked over SNMP either, so a printer that answers only on its printer ports and SNMP is missed.
  • A printer that's found, but that no credential or SNMP identifies, is an unclassified device: its printer ports aren't tried.
  • A device that answers only on its printer ports or web interface is no longer found once its credential or SNMP stops working, so it becomes stale after three scans.

It needs Collector 0.4.3 or later, as an older one would check the other ports too. Once Starhive knows the profile's Collector runs an older release, it refuses the setting. Otherwise, such as for a Collector that hasn't checked in yet, its scans fail, saying to update it.

Presence check​

A profile with a Presence check has its Collector check whether the devices it found still answer. This runs on its own schedule, at the interval the profile sets (every 5, 15 or 60 minutes), including while a scan is running. For each device:

  1. Ping. An ICMP echo (IPv4), where the Collector may send one and the profile's scans ping. If the device answers, the check ends there.
  2. Port check. Only if the ping goes unanswered: a TCP connection attempt to the ports scans have found the device answering on, at most 32, all at once. The first that accepts or refuses a connection ends the check. Each attempt waits as long as the profile's scans wait.

Pings and connection attempts together go out no faster than the profile's scans, and at most 100 a second; a scan running at the same time keeps to its own rate. Only devices a scan already found are checked, never a whole range, and the Collector doesn't log in. A device that answers the ping, or accepts or refuses a connection, is online. Intrusion detection may still notice the regular connections, so tell your security team before turning it on.

What is read​

Linux​

Everything is read with ordinary commands that only read, none of which needs root:

  • Host: host name, fully qualified name, maker, model, chassis type, whether it's a virtual machine and on which hypervisor, memory, and its BIOS or UEFI version and release date.
  • Identity: serial number and hardware UUID, where the account may read them (see SSH).
  • Operating system: distribution, version, kernel, architecture, last boot, and whether it runs a desktop.
  • Processors: model, vendor, sockets, cores, threads, and maximum speed.
  • Network interfaces: name, MAC address, MTU, state, and IPv4 and IPv6 addresses.
  • Services: the services set to start with the host (enabled systemd units, or OpenRC services in a runlevel). Not whether each one is running at the moment.
  • Pending updates: how many packages the package manager would update, and how many of those fix a security issue (with apt and dnf). Counted from the package lists the host last downloaded: a scan never downloads them, so the counts are as current as the host's own last refresh.
  • Disks: each physical disk, or a virtual machine's disk, with its name, model, serial number, size, bus, and whether it's an SSD or a hard disk. A SAN disk seen over several paths is listed once. Partitions, volumes, RAID arrays and removable disks such as USB sticks, SD cards and eMMC aren't listed, so a board that boots from an SD card or eMMC shows no disks.
  • Network connections: the TCP ports the host listens on, and the connections it has open, with ss (or netstat where there's no ss), as any account may. Which program holds each is read only with the optional sudoers line. The Collector sends only a summary: each listening port, and the connections grouped by direction, port and other device. Connections with addresses on the public internet are counted together, not listed.
  • Installed software: the packages dpkg, rpm or apk installed, with version, architecture and, for rpm, vendor. Software installed in other ways, such as snaps, Flatpaks or programs unpacked by hand, isn't listed.

Windows​

The same kinds of facts, through the restricted endpoint: the computer and its chassis, BIOS serial, UUID, version and release date, operating system, processors, network adapters and their addresses, physical disks (on Windows 8 and Windows Server 2012 or later), the services set to start automatically, the installed Windows updates, the TCP connections and listening ports, and the installed programs from the registry. Connections are named by the service that holds them, never by a program's command line, which can hold secrets.

SNMP devices​

From the standard MIBs a device's agent offers:

  • System: name, description, location, contact, maker, and whether it routes or switches.
  • Hardware: chassis serial number, model, maker and software version.
  • Interfaces: name, MAC address, MTU, state, and IPv4 and IPv6 addresses.
  • Host resources: the kind of device, memory and printer model.
  • Printers: name, serial number, page count and supply levels.

How much a device tells depends on its agent and on what the SNMP user or community may read.

A scan reads only the system information listed above, from system files such as /etc/os-release and the Windows registry. It never reads users' files, documents, processes or data, on any host.

Scan results per host​

Each host in a scan gets one of these results, shown in its scan history:

ResultMeaning
Fully scannedLogged in, and everything was read.
Partly scannedLogged in, but some of it couldn't be read.
No credentialA management port is open, but no credential covers the host, or none was accepted.
Reachable onlyIt answered, but has no management port open and no SNMP agent answered. A wrong SNMPv2c community looks the same.
Host key changedIts SSH key, WinRM certificate or SNMPv3 engine changed, so no credential was sent. See Host keys.
ErrorThe connection failed.