Skip to content

HTTPS services on ports like 8443 not detected during service discovery, causing HTTP modules to be skipped #1357

@Gauravsharma2040

Description

@Gauravsharma2040

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions