Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service name inference by port in kat_nmap normalizer #2037

Closed
originalsouth opened this issue Nov 15, 2023 · 4 comments · Fixed by #2038
Closed

Service name inference by port in kat_nmap normalizer #2037

originalsouth opened this issue Nov 15, 2023 · 4 comments · Fixed by #2038
Labels
bug Something isn't working

Comments

@originalsouth
Copy link
Contributor

Question regarding the following lines of code:

service_name = service.service
if port == 80:
service_name = "http"
if port == 443:
service_name = "https"

Suppose one places a ssh server behind port 80 or port 443, do we really want to report http or https respectively?
Perhaps there are considerations for this behavior?

@originalsouth originalsouth added the bug Something isn't working label Nov 15, 2023
@noamblitz
Copy link
Contributor

No, then it should not be overwritten bij http or https. I remember a thing where nmap would identify services like http-web instead of http. Maybe this was implemented to overwrite those...?

@originalsouth
Copy link
Contributor Author

originalsouth commented Nov 15, 2023

No, then it should not be overwritten bij http or https. I remember a thing where nmap would identify services like http-web instead of http. Maybe this was implemented to overwrite those...?

Could very well be, nmap reports the following http type service names:

http
http-ocsp
http-proxy
http-proxy-ctrl
kazaa-http
ncacn_http
ntop-http
ssl/http
vnc-http

We could opt for a simplified re-classification where suited?
For instance:

http           -> http
http-proxy     -> http
ssl/http       -> https

See this comment for more background.

originalsouth added a commit that referenced this issue Nov 15, 2023
@noamblitz
Copy link
Contributor

Sounds better to me

@originalsouth
Copy link
Contributor Author

Addressed in 78a830e.

It is better to use tunnel type in stead of service name as that is the format used in the XML output (rather than the standard output).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants