Credential-less discovery with Nmap is a fallback for when ServiceNow Discovery or Service Mapping cannot identify a server or application because its credentials are missing or misconfigured. A Windows MID Server with Nmap runs safe scans against the target and creates basic records. Later credentialed discovery reconciles the two sets of data.
What the fallback collects and where it stops
Credentialed discovery logs in to a device or application and reads its details directly. The Nmap route does not need that login. The MID Server sends network probes and reads the replies, so the output is basic. It covers a host name resolved by reverse DNS from the IPv4 address, the MAC address, the applications listening on open ports, and the operating system family and version.
The MAC address comes back for targets on the same subnet as the scanning MID Server. A host reached across a router will not show one.
Routers and switches are classified as generic hardware. The fallback does not create or update their dedicated classes, so plan credentialed discovery for network equipment if your CMDB relies on those classes. The class names involved are explained in the CMDB class guide.
Treat the fallback as a bridge. Run it on subnets you know well, where credentials are not a practical option, and do not use it as a long-term method for a host. When the credential fault is fixed and discovery runs again, the serial number, host name and system class from the credentialed run update the host CI the fallback created. A server can therefore appear first as generic hardware and later become a Linux or Windows server record.
How the scan moves through host and application discovery
Host discovery path
Host discovery starts when a scanned host is alive but not active, or when all configured credential-based classification probes have failed. The Credentialless Discovery Network Device pattern reads the port list from the IP Service table, [cmdb_ip_service]. By default all ports are available, and setting [cl_discovery] to false blocks a port. A host counts as up when Nmap reports its port state as open or open/filtered.
The operating system family decides the class of the host CI:
| Operating system family | Host CI table |
|---|---|
| AIX | cmdb_ci_aix_server |
| HP-UX | cmdb_ci_hpux_server |
| Linux | cmdb_ci_linux_server |
| Solaris | cmdb_ci_solaris_server |
| OS X or iOS | cmdb_ci_osx_server |
| Windows | cmdb_ci_win_server |
| Unsupported or undefined | cmdb_ci_hardware |
If an address resolves to several host names, the first one Nmap returns is used. With no configured name, the IP address becomes the host name.
Application discovery path
Application discovery runs later. Service Mapping launches it after the credential-based port classification steps have failed. For each open port, Nmap performs application and version detection, and the CredentialLessApplicationClassNameMapper script maps the product and service name to a supported application table.
| Product reported by Nmap | Table used for the CI |
|---|---|
| Apache httpd | cmdb_ci_apache_web_server |
| MySQL 5.5.51 | cmdb_ci_db_mysql_instance |
| nginx 1.4.6 | cmdb_ci_nginx_web_server |
| Oracle WebLogic Server | cmdb_ci_app_server_weblogic |
A product that matches no derived table goes into the base [cmdb_ci_appl] table, named in the form serviceProduct:serviceExtrainfo:serviceName with empty parts dropped. A Microsoft RPC endpoint with the service name msrpc, for example, becomes Microsoft Windows RPC:msrpc.
The difference between this route and the Service Mapping application path is set out in the Discovery vs Service Mapping comparison. When Nmap has to guess a service, it appends a question mark to the name. No application CI is created or updated in that case, so expect no record for that port.
Installing Nmap on a MID Server
The person running the install needs the agent_admin role. The MID Server must show a status of Up, be validated, and not already hold the Nmap capability. The install itself needs a local administrator login on the Windows host. After installation, non-admin users can run credential-less discovery.
Check the installation path first. Parentheses, curly braces and square brackets break the installer, which replaces them with spaces and cannot find the path. A folder named MID(1) is enough to cause the failure.
To install on a connected MID Server, open its record and select Enable Credential-less Discovery from the Related Links. The instance runs the installer from a download site inside a ServiceNow data center, and the Logs tab shows Running system command: installNmap. The dialog can be closed while the installer continues in the background.
Npcap, the Windows packet capture library Nmap relies on, installs with Nmap if it is missing. A newer Npcap already on the host is left in place, and an older one is upgraded.
On success, the installed version appears in the Nmap version field of the MID Server record, the related link changes to Disable Credential-less Discovery, and the Nmap capability appears on the Capabilities tab. On failure, an entry is written to the MID Server Issue table, [ecc_agent_issue]. A later successful run marks that issue as resolved. Uninstalling uses the same related link. It leaves Npcap in place, which has to be removed by hand once no other software depends on it.
Installing manually on a self-hosted network
Where the network blocks the download site, the install is manual and needs the admin or maint role. Read the expected version from the mid.nmap.version property in the MID Server Property table, [ecc_agent_property]. Download the matching installer, rename it to nmapInstaller.exe, and place it in an nmap folder inside the agent folder. Then run NmapInstallation.ps1 with seven parameters in order: the operation (install), the nmap root path, the installer path, the nmap.exe path, the Uninstall.exe path, the Npcap version and the safe script list. Copy the last two from the property table.
The Nmap capability still has to be added to the MID Server afterwards. Only a maint user can add it, so the team needs temporary maint access, requested through Customer Service and Support.
Settings and fields that shape the results
| Setting | Where it lives | Default | Effect |
|---|---|---|---|
| mid.discovery.credentialless.enable | System property | Enabled | Turns Nmap on or off for all connected MID Servers that have it installed. |
| mid.discovery.credentialless.alt_port_options | System property | Port list from the IP Service table | F runs the fast top-100 scan. T scans the top 1,000 ports, Nmap’s default. Applies from Patterns version 1.31.0. |
| mid.discovery.credentialless.include_os_scan_guess | MID Server Property table, added by hand | false | Lets Nmap guess an operating system when there is no exact match. |
| mid.discovery.credentialless.include_udp_scan | MID Server Property table, added by hand | false | Adds UDP checks to TCP scanning, which lengthens each scan. |
| cl_port | Application [cmdb_ci_appl] table | Optional field | Records the port scanned, so Discovery can match an existing CI or create one. |
| discovery_source | Configuration Item [cmdb_ci] table | Optional field | Carries the CredentiallessDiscovery choice when the fallback created the CI. |
UDP scanning needs care. The command timeout comes from the sa.local_command_timeout_ms MID Server parameter, 60 seconds when unset. Enabling UDP adds scan time, and a wide scan can take up to about 30 minutes, so raise the value if UDP scans time out. Setting alt_port_options to T widens the range and adds time on top.
The Nmap MID Server capability is added automatically on install and removed automatically on uninstall. Administrators cannot add or remove it by hand, and the ALL capability does not include it.
Service Mapping picks a MID Server by IP address and does not check for that capability. A server without Nmap can therefore be chosen, and the map then shows Nmap is not installed on MID Server at the affected CI. Install Nmap on each MID Server assigned to the IP ranges.
Several scripts must stay unchanged, including the PreLaunch script for the network device pattern and SetCredentialLessDeviceClassName. The CredentialLessApplicationClassNameMapper script is the exception. System administrators can change it, and a user with the agent_admin role can add CI tables to it.
Cloud environments and scope boundaries
Credential-less discovery is not suited to cloud accounts. For cloud accounts, the cloud discovery workspace guide covers the schedules and diagnostics that apply there. Scanning resources in Amazon Web Services, Microsoft Azure, IBM Cloud or Google Cloud Platform is often against provider terms. AWS requires permission through its penetration testing request process, permits testing of EC2 and RDS instances the customer owns, and expects scans inside an approved time window. A policy violation can result in removal from the service.
Scope also depends on MID Server selection. With the All option for IP ranges, each MID Server must be a Windows host with Nmap and reach the whole network. With a Specific MID Cluster, each member needs Nmap. With Auto-Select, at least one eligible server needs it.
Common setup mistakes and how to avoid them
- Installing Nmap on some MID Servers and not others. Service Mapping selects by IP address, so install Nmap on each MID Server assigned to the ranges.
- Ignoring the path rule. Brackets and parentheses in the installation path stop the installer.
- Widening the port range or enabling UDP without raising the timeout. Scans can then exceed the 60-second default and fail.
- Assuming a guessed application becomes a CI. A name carrying a question mark creates nothing.
- Uninstalling Nmap and assuming Npcap goes too. Npcap stays until it is removed by hand.
For faults that sit outside this fallback, see the Discovery troubleshooting guide.
Frequently asked questions
Does credential-less discovery replace credentialed discovery?
No. It is a fallback for hosts and applications that cannot be identified through credentials. When credentialed discovery succeeds later, the platform reconciles the data from both methods, and the host CI is refreshed from the credentialed run.
Why does a router or switch appear as generic hardware?
The fallback does not create or update the dedicated classes for routers and switches, so those devices are classified as hardware. Credentialed discovery is the route to the specific classes.
What does “Nmap is not installed on MID Server” mean?
Service Mapping selected a MID Server by IP address, and that server lacks the Nmap capability. Install Nmap on each MID Server assigned to the affected ranges, then check the Capabilities tab on each record.
When should UDP scanning be turned on?
Turn it on when a host needs a UDP response before it can be identified. The setting adds scan time, so raise sa.local_command_timeout_ms if UDP scans time out.