-
Notifications
You must be signed in to change notification settings - Fork 807
Modify master.propagator
#2991
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
Modify master.propagator
#2991
Conversation
23a8f6e
to
6289403
Compare
98babeb
to
58a1b74
Compare
@@ -168,6 +170,23 @@ def _process_fingerprinter_results( | |||
for service, details in fd.services.items(): | |||
target_host.services.setdefault(service, {}).update(details) | |||
|
|||
for service in fd.services: | |||
# TODO: do we want to overwrite? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd imagine we'd like to append services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fingerprinter is maybe scanning only one service, but results should be stored in a collection being able to handle multiple services. So PortScanData
should probably have services
, as services on port 8080 could be both HTTP
and Tomcat
for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to limit to one service if we can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOMCAT
implies HTTP
, but more importantly, tomcat is more specific. There's only ever one service listening on a port (with some exceptions like virtual hosts that Infection Monkey isn't prepared to handle anyway).
If a services were to be identified as TOMCAT
, we wouldn't want the hadoop exploiter to attempt to exploit it just because there's an HTTP server in the mix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hadoop could exploit ports that only have one service: HTTP. There's only one service, but that service might be running a stack of technologies. Tomcat is tomcat, but it's also running in JVM, so tomcat exploiters and log4shell exploiters are both valid on it. It's also easier to fetch ports that are running HTTP with HTTP in fingerprint.services
filter instead of having to hard code which services are HTTP services and keeping that list up to date.
6289403
to
4d3696c
Compare
30fbb1e
to
9b47a96
Compare
349ea02
to
e6f7de3
Compare
e6f7de3
to
9ec38d8
Compare
…ervices in TargetHost
The Propagator does not expect previous TCP scan results, so it will "merge" the scan data by overwriting old scan data, in cases where there might be conflicting scan data for a given port. The fingerprint data is merged in a similar manner, but the service is only overwritten if the new service information is more descriptive than the existing info. Currently this means that the service is only updated if the new service is not UNKNOWN.
9ec38d8
to
57167ce
Compare
4f1da08
to
7fd862c
Compare
What does this PR do?
Fixes a part of #2136
PR Checklist
Testing Checklist