Probe every module default port in port scan
Description
With service discovery enabled (the default), Module.load() in nettacker/core/module.py
removes every payload whose library (http, ssh, ...) was not found by port_scan.
port_scan only probes the ports listed in nettacker/modules/scan/port.yaml. If a module's
default port is not on that list and the application is the only service of that kind on the
host, the payload is dropped and the scan ends with no any live service found to scan..
There is no error and no hint that the module never ran.
I compared every module's default ports with port.yaml. 7 modules use ports that
port_scan never probes:
| Port | Module |
|---|---|
| 4433 | sonicwall_sslvpn_cve_2024_53704_vuln (CISA KEV) |
| 4502, 4503 | adobe_aem_lastpatcheddate_scan |
| 5230 | memos_cve_2025_22952_ssrf_vuln |
| 7860 | langflow_cve_2025_3248_vuln (CISA KEV) |
| 17017 | smartermail_cve_2026_24423_vuln (CISA KEV), smartermail_version_scan |
| 32400 | plex_version_scan (PR #1878, #1863) |
For example, a default scan of a host that only exposes Langflow on 7860 never runs the Langflow KEV module.
Reproduction (master 49e2e849, Python 3.11.18, Plex Media Server in Docker on 32400,
nothing else listening)
nettacker -i 127.0.0.1 -m port_scan→ no events: port 32400 is never probed- With 32400 added to
port.yaml, the same command reportsport_scan | 32400 | running_service: http. Plex answers the probe immediately, so adding the port is enough. (screenshots attached)
Related but different
- #1357: the port is probed, but a TLS response is not recognised
- #1828: discovered ports are not propagated to modules (
portvsports) - #1710 / #1435: probe payloads / filtering modules before they run
This issue is about ports that
port_scannever connects to at all.
Proposed fix
- Add 4433, 4502, 4503, 5230, 7860, 17017 and 32400 to
port.yaml. - Add a unit test that fails if a module that service discovery can filter uses a port
port.yamldoes not probe, so new modules can't reintroduce the gap.
Screenshots-
I have the fix and the test ready (the test fails on master for the 6 affected modules). Can this be assigned to me?
OS: Windows 11 (WSL2 Ubuntu 24.04)
OS Version: 10.0.26200
Python Version: 3.11.18 (WSL), 3.12.10 (Windows)
@Sickwoman this was by design. Nettacker ports.yaml are aligned to NMAP default ports which is the gold standard in the infosec industry for the past 30 years. However I see the usefulness of having our module non-standard ports added to ports.yaml. Let's do it. Assigned to you.
Let's give it a try. I will make sure to give it a good shot.