-
Notifications
You must be signed in to change notification settings - Fork 795
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
2857 security report get exploit on node fix #2876
2857 security report get exploit on node fix #2876
Conversation
monkey/monkey_island/cc/services/reporting/exploitations/monkey_exploitation.py
Outdated
Show resolved
Hide resolved
) | ||
successful_exploits = [e for e in successful_exploits if e.target in machine_ips and e.success] | ||
|
||
plugin_exploiter_manifests = plugin_manifests.get(AgentPluginType.EXPLOITER, {}) |
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.
It would be best to somehow add the hard-coded manifests to the repository. Otherwise the whole codebase needs to know what is hard-coded and what is not or that "hard-coded" plugins is even a thing
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.
That would require more work. We can discuss it over webex and decide. All in all, hard-coded exploiters will go away at some point so I don't know if it is worth it.
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 agree. They'll go away so it's not worth the effort.
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.
If we add a decorator to the plugin repository that would return hard-coded plugins if a plugin is missing it would allow us to simplify some code. This, we wouldn't need to add them in the AgentConfigurationSchemaCompiler
, etc. Deleting a single decorator is easier than going through the whole island code base to remove HARD_CODED_PLUGIN
references.
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.
Deleting a single decorator is easier than going through the whole island code base to remove HARD_CODED_PLUGIN references.
I agree, but it would introduce the case where I can ask the repository for all manifests and get a manifest for a plugin that doesn't exist. Theoretically this shouldn't be a problem, but it might be if I use the set of all manifests to query for specific plugins. Then I'll have to handle the case where the plugin doesn't exist. Maybe we'll need to handle that in the long run anyway, I'm not sure.
monkey/monkey_island/cc/services/reporting/exploitations/monkey_exploitation.py
Outdated
Show resolved
Hide resolved
monkey/monkey_island/cc/services/reporting/exploitations/monkey_exploitation.py
Outdated
Show resolved
Hide resolved
859ee85
to
d6f9123
Compare
monkey/monkey_island/cc/services/reporting/exploitations/monkey_exploitation.py
Outdated
Show resolved
Hide resolved
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.
One small request.
4039b76
to
76f41ec
Compare
get_exploits_used_on_node
monkey_exploitation
monkey_exploitation
76f41ec
to
6ffc75f
Compare
What does this PR do?
Fixes part of #2857
Fix reporting UTs is the only thing left
PR Checklist
Testing Checklist