-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
While testing a new Apache OFBiz module on port 8443 specifically CVE-2023-51467, I noticed that Nettacker's service discovery does not detect HTTP services running over TLS.
The HTTP detection logic in port.yaml relies on plaintext HTTP response patterns such as:
HTTP/1.1
Content-Type
Server
However, when connecting to HTTPS services (e.g. port 8443), the socket receives TLS handshake bytes instead of HTTP headers. As a result, none of the HTTP regex patterns match and the service remains:
default_service: unknown
Because of this, modules that declare:
library: http
are removed during module scheduling when service discovery fails to detect HTTP.
The module itself works correctly when service discovery is bypassed using:
python3 nettacker.py -i localhost -m apache_ofbiz_cve_2023_51467_vuln -d
which confirms that the payload and detection logic are functioning as expected. The issue appears to be limited to the service discovery stage.
Additional issue
Attempting to bypass this by using another library such as:
library: network
causes a crash:
KeyError: 'network'
in:
nettacker/core/module.py line 105
This appears to be caused by the engine assuming that payload["library"] always exists in discovered_services.
Possible Improvements
Add HTTPS detection signatures in port.yaml based on TLS handshake bytes.
Make module scheduling resilient to libraries not present in discovered_services.
Allow HTTP modules to run on ports declared in their fuzzer configuration even when service detection fails.