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

Island: Change schema compiler to merge plugins and exploiters #2803

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

VakarisZ
Copy link
Contributor

@VakarisZ VakarisZ commented Jan 6, 2023

What does this PR do?

Exploiter plugins and hard-coded plugins must be merged to create a cohesive configuration schema

Fixes part of #2785

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?
  • Have you checked that you haven't introduced any duplicate code?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    Tested by running unit tests

  • If applicable, add screenshots or log transcripts of the feature working

@VakarisZ VakarisZ force-pushed the 2785-inject-exploiters-to-schema branch from 6c90ff0 to ac9cc22 Compare January 9, 2023 08:23
Comment on lines +5 to +6
"info": "Exploits a privilege escalation vulnerability (CVE-2020-1472) in a Windows "
"server domain controller (DC) by using the Netlogon Remote Protocol (MS-NRPC). "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the wrong description, will fix in later PR

@VakarisZ VakarisZ marked this pull request as ready for review January 9, 2023 11:57
Copy link
Collaborator

@mssalvatore mssalvatore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but I think we can improve a few names.


# Exploiters that are not plugins need to be added manually. This should be removed
# once all exploiters are turned into plugins
def _add_exploiters(self, schema: Dict[str, Any]) -> Dict[str, Any]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def _add_exploiters(self, schema: Dict[str, Any]) -> Dict[str, Any]:
def _add_non_plugin_exploiters(self, schema: Dict[str, Any]) -> Dict[str, Any]:

@staticmethod
def _get_plugin_type_string(plugin_type: AgentPluginType):
return plugin_type.name.lower()
def _add_properties_to_objects(self, schema: Dict[str, Any]) -> Dict[str, Any]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def _add_properties_to_objects(self, schema: Dict[str, Any]) -> Dict[str, Any]:
def _add_properties_field_to_plugin_types(self, schema: Dict[str, Any]) -> Dict[str, Any]:

^^ Not sure about this name, but something more descriptive would be good.

Exploiter plugins and hard-coded plugins must be merged to create a cohesive configuration schema
@VakarisZ VakarisZ merged commit 0eb88a9 into 2785-plugins-in-schema Jan 9, 2023
@VakarisZ VakarisZ deleted the 2785-inject-exploiters-to-schema branch January 9, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants