Bug#914916: nmap: Integrate prometheues port map into services file?

2018-11-29 Thread Daniel Miller
Nmap gets port names from IANA, with some community input for very common
services.
Port 9103 is frequently used by JetDirect printers, which is why it is
labeled that way.
Use -sV to probe the target and identify the service itself. Unidentified
services can be
submitted directly to the Nmap Project:
https://nmap.org/book/vscan-community.html

This is a better topic to discuss with Nmap development community, not the
Debian
package maintainers. Please open an issue on http://issues.nmap.org/ or
join the
Nmap developers mailing list: https://seclists.org/nmap-dev/

Dan


Bug#914916: nmap: Integrate prometheues port map into services file?

2018-11-28 Thread Witold Baryluk
Package: nmap
Version: 7.70+dfsg1-5
Severity: wishlist

$ grep prometheus /etc/collectd/collectd.conf.d/movax.conf 
LoadPlugin write_prometheus
$ grep 9103 -A 1 -B 1 /etc/collectd/collectd.conf 
#
#   Port "9103"
#
$

which is a default port assigned to collectd.

https://github.com/prometheus/prometheus/wiki/Default-port-allocations

These ports are http servers.

There is no single port because one machine / IP can have multiple
services (i.e. collectd, mysql, apache, node exporter, etc) at the same
time. In more complex scenarios (i.e. multiple services of same type on
single machine) a name/port discovery methods are used (i.e. via DNS SRV
or gce/ec2, etc).

When I scan it via nmap I got generic names:

Host is up (0.00038s latency).
Not shown: 999 closed ports
PORT  STATE SERVICE
22/tcpopen  ssh
9103/tcp  open  jetdirect
MAC Address: 00:xy:zz


Which is not quite correct.

There are some other ports there that might be missing from current
services file in nmap.

maybe jetdirect-or-prometheus-collectd-exporter ?

Or add some support for multiplies of names (with own ratios) into
services, so nmap can pretty print them and extend in the future.







-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-2-amd64 (SMP w/32 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages nmap depends on:
ii  libc62.27-8
ii  libgcc1  1:8.2.0-9
ii  liblinear3   2.1.0+dfsg-2
ii  liblua5.3-0  5.3.3-1
ii  libpcap0.8   1.8.1-6
ii  libpcre3 2:8.39-11
ii  libssh2-11.8.0-2
ii  libssl1.11.1.1-2
ii  libstdc++6   8.2.0-9
ii  nmap-common  7.70+dfsg1-5
ii  zlib1g   1:1.2.11.dfsg-1

nmap recommends no packages.

Versions of packages nmap suggests:
ii  ncat7.70+dfsg1-5
ii  ndiff   7.70+dfsg1-5
ii  zenmap  7.70+dfsg1-5

-- debconf-show failed