Nmap Usage and Impact in Applications Manager

Nmap Usage and Impact in Applications Manager

What is Nmap?

      Nmap (Network Mapper) is an opensource network discovery and security auditing utility.  It is a precompiled thirdparty binary bundled with Applications Manager for Windows, Linux.

Nmap Capabilities

Nmap is primarily used to:
  1. Identify open ports during device discovery.
  2. Identify the operating system of a device during discovery.
  3. Analyze SSL/TLS protocols and ciphers for SSL Certificate Monitors.
  4. Trace the network path over UDP for ISP Latency Monitors running on a Windows installation.
  5. Discover subdomains and related domains (DNS brute force, DNS zone walk, certificate Subject Alternative Names) for Domain Discovery from an HTTP(s) URL monitor.
Info
Windows Prerequisites
The following components are automatically installed during Applications Manager (APM) installation and do not require separate manual installation:
  1. Npcap OEM
  2. Microsoft Visual C++ Redistributable (vcredist_xx.exe)

Nmap Usage

ADDM

Discovery type
Condition
Nmap Usage
  Auto Discovery
 Automatic discovery is enabled during the initial startup of Applications Manager (standalone) for servers discovered through AD, and in the APM Plugin for servers shared from OpManager
  Perform an openport scan using the ports configured in the following file:
AppManager\working\conf\discovery\defaultPorts.properties
  Perform Application Discovery
  Enabled while adding/updating Windows/Linux server monitor
  Perform an openport scan using the ports configured in the following file:
AppManager\working\conf\discovery\defaultPorts.properties
  Network Discovery
  If No credentials supplied or authentication fails.
  Performs openport scanning on target server with the ports configured for the discovery profile and discovers Applications. To view or modify the configured ports, navigate to Discovery Profile → Edit → Select Application (the second page of the Network Discovery profile).

  Prerequisite: Enable "Discover unknown devices during ADDM discovery" under Settings → Add/Discover → Discovery → Discovery Settings.

  Refer to the ADDM help page

SSL/TLS Certificate Monitor

The SSL/TLS Certificate Monitor uses the Nmap NSE script sslenumciphers.nse to identify the SSL/TLS ciphers supported by a configured domain.
During every polling cycle:
  1. The monitor executes the Nmap sslenumciphers script.
  2. Supported protocols and cipher suites are collected.
  3. The retrieved information is analyzed for known SSL/TLS vulnerabilities.
  4. A security grade is assigned based on the detected vulnerabilities and cipher strength.
The sslenumciphers.nse script is used to identify:
  1. Supported SSL/TLS protocols
  2. Supported cipher suites
This information is displayed as part of the SSL Certificate Monitor's securityrelated information.

ISP Latency Monitor

The ISP Latency Monitor measures endtoend latency, hop count, jitter and packet loss to a host by running a traceroute during every polling cycle. The traceroute tool depends on the protocol selected in the monitor and on the operating system of the Applications Manager server:

Protocol
Windows Server
Linux Server
 ICMP
 Windows tracert
 System traceroute command
 TCP
 tracetcp.exe (bundled with APM)   
 System traceroute command
 UDP
 Nmap (bundled with APM)   
 System traceroute command

Nmap is used only when the monitor's Protocol is UDP and Applications Manager runs on Windows. Windows has no builtin UDP traceroute, so Nmap's traceroute option is used to send UDP probes to the configured port and record the responding router at each hop.
During every polling cycle of a UDP monitor on Windows:
  1. Applications Manager resolves the configured host (IPv4 preferred).
  2. Nmap is executed with the traceroute option against the resolved address and the configured port (maximum run time 2 minutes).
  3. The Nmap output is parsed into the list of hops. Each hop provides the router IP address and one roundtrip time; a hop that does not respond is recorded as a timeout.
  4. From the parsed hops the monitor derives latency, hop count and the ISP Path Nodes / ISP Path Links tables shown in the Network Path tab.
Notes
Note: The ICMP and TCP protocols, and all protocols on a Linux server, do not use Nmap

Domain Discovery (HTTP(s) URL Monitor)

Domain Discovery finds the root domain, subdomains and sibling domains around the host of an HTTP(s) URL monitor and suggests the standard web monitors (URL, SSL Certificate, DNS, Web Page Analyzer, Brand Reputation, Website Content, ISP Latency) for each discovered domain.
Discovery is not part of the polling cycle. It runs in the following cases:
  1. After an HTTP(s) URL monitor is added. When Domain Discovery is enabled, the Domain Discovery slider opens automatically once the monitor is created and runs the scan.
  2. When an administrator clicks the discovery option in the URL monitor's details page (or the scan option in the slider).
In the Enterprise Edition the scan runs on the managed server that owns the URL monitor.
Info
Prerequisite:  Domain Discovery is enabled under Settings > Discovery > Add/Discover > Domain Discovery (option "Enable Domain Discovery", enabled by default).
A scan runs four discovery methods in parallel. Three of them use Nmap NSE (Nmap Scripting Engine) scripts; the fourth is a plain HTTP crawl that does not use Nmap:

Method
Nmap script(s) 
What it finds
 DNS brute force 
 dnsbrute
 Subdomains of the root domain, by querying a wordlist of common host names.
 Certificate SAN 
 sslcert
 Host names listed in the Subject Alternative Name of the certificate served on the monitored TLS port. This is the only source of sibling (related) domains.
 DNS zone walk
 dnsnsecenum, dnszonetransfer
 Subdomains obtained from the domain's authoritative name servers through DNSSEC NSEC enumeration or an AXFR zone transfer, where the zone permits it.
 Web page crawl 
 (none does not use Nmap)
 Subdomains referenced by links, scripts, images, iframes and forms on the monitored page.

Notes
Note: Applications Manager bundles only the NSE scripts it uses (sslenumciphers, dnsbrute, sslcert, dnsnsecenum, dnszonetransfer).

Nmap Command Execution

Applications Manager executes Nmap using the extracted list of ports.
OpenPort discovery
  1.   nmap p <ports> open <IP address>   
Example
  1.   nmap p 161,4243,1433,80,90,8080,6379,9080,7001 open 0.0.0.0
Note: The open option displays only ports identified as open in the scan results.

Operating system detection
For operating system detection, Applications Manager executes the following Nmap command:
  1.   nmap O v <IP address> osscanguess hosttimeout 60
Example
  1.   nmap O v  0.0.0.0 osscanguess hosttimeout 60
ISP Latency Monitor: UDP traceroute (Windows only)
  1. nmap traceroute sU p <port> maxretries 0 T4 n <host>
Example 
  1.  nmap traceroute sU p 443 maxretries 0 T4 n 0.0.0.0
Notes
Notes:
  1. <port> is the port configured in the monitor (default: 443).
  2. For an IPv6 host, 6 is added before the arguments.
  3.  n disables reverse DNS lookups of the hops. maxretries 0 and T4 help keep the run short.
  4. The process is stopped after 2 minutes.

What happens if Nmap is unavailable?

If the Nmap installation is removed or the Nmap executable cannot be executed, Applications Manager does not stop functioning. Nmap is not required for normal monitoring of most existing monitors. However, SSL/TLS Certificate Monitors and ISP Latency Monitors may require Nmap for data collection, depending on the monitoring configuration. Other existing monitors can continue their normal monitoring activities without Nmap.

Nmap unavailability can affect the following discovery scenarios.

During port discovery

Applications Manager continues discovery without filtering the configured ports through Nmap.

As a result, more ports may need to be checked individually.

This can lead to:

  • Less efficient application identification

During credentialfailure discovery

If both credentialbased discovery methods fail and Nmap is unavailable, Applications Manager may not be able to identify applications through their open ports.

The device may therefore be discovered without the expected list of applications.

During Windows OS detection

If Nmap cannot identify the operating system, Applications Manager may not correctly determine that the target is a Windows system for Server discovery.

As a result, the discovery process may proceed with an inappropriate discovery method.

During SSL Certificate monitoring

If Nmap is unavailable, SSL/TLS cipher and vulnerability information cannot be collected.

The following information may therefore be unavailable:

  • Protocol/cipher details

  • Weak cipher information

  • SSL/TLS vulnerability indicators

  • Overall SSL/TLS security grade

However, certificaterelated functionality such as certificate expiry checking can continue independently.

During ISP Latency monitoring (UDP protocol)

Only ISP Latency Monitors configured to use the UDP protocol on Windows installations are affected.
If Nmap is unavailable when Applications Manager starts, a UDP monitor automatically falls back to the ICMP protocol (Windows tracert) and continues collecting data. The monitor displays the following message to indicate the change:
Quote
Windows agent does not support UDP protocol. ICMP protocol is used for monitoring the network path.
ICMP and TCP monitors on Windows, as well as all ISP Latency Monitors on Linux installations, do not depend on Nmap and are not affected.

During Domain Discovery from a URL monitor

If Nmap is unavailable, the DNS bruteforce, certificate SAN, and DNS zone walk methods return no results. The scan does not fail; only the web page crawl contributes to the results. As a result:
  1. Fewer subdomains are discovered, limited to those referenced on the monitored page.
  2. Sibling (related) domains are not discovered, as the certificate SAN method is their only source.
  3. The monitored host is always included, so its domain can still be used to suggest monitors for the URL monitor.
Domains cached from earlier scans, monitor suggestions generated from those domains, and monitors already added through Domain Discovery are not affected. Normal polling of these monitors does not use Nmap.

Steps to Remove the Nmap

  1. Navigate to the <AppManager_Home>\working directory.
  2. Take a backup of the Nmap folder if required.
  3. Delete the Nmap folder and its contents.
  4. Restart the Applications Manager service.
  5. Verify that Applications Manager starts successfully and functions as expected.