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

Modify ExploiterResultData #1728

Merged
merged 12 commits into from
Feb 22, 2022

Conversation

shreyamalviya
Copy link
Contributor

What does this PR do?

Fixes a part of #1605.

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?

Testing Checklist

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

    Tested by {Running the Monkey locally with relevant config/running Island/...}

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

import pwd

try: # can't import on Windows
import pwd
Copy link
Contributor

Choose a reason for hiding this comment

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

This is solved by Vakaris in parsing credential telemetry. Check this commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to leave this in since this'll most likely get merged before that.

Copy link
Collaborator

@mssalvatore mssalvatore Feb 22, 2022

Choose a reason for hiding this comment

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

If we move this import to line 37, then we don't need to try/except the import, since _get_home_dirs() only runs if the check on line 24 passes.

Comment on lines 104 to 111
(
exploitation_result,
propagation_result,
os,
info,
attempts,
error_message,
) = self._puppet.exploit_host("PowerShellExploiter", "10.0.0.1", {}, None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of unpacking this, let's modify ExploitTelem to accept an ExploiterResultsData object.

@mssalvatore
Copy link
Collaborator

We may have missed this in planning, but do we need any changes on the Island side to process the propagated and exploited booleans differently?

@ilija-lazoroski
Copy link
Contributor

We may have missed this in planning, but do we need any changes on the Island side to process the propagated and exploited booleans differently?

I think we need to change it (monkey_island/cc/services/telemetry/processing/exploit.py), but I am not sure if it is part of this task.

@mssalvatore
Copy link
Collaborator

We may have missed this in planning, but do we need any changes on the Island side to process the propagated and exploited booleans differently?

I think we need to change it (monkey_island/cc/services/telemetry/processing/exploit.py), but I am not sure if it is part of this task.

Let's do it here. These changes effectively change the interface between the Island and the Agent, so we need the Island to properly handle the new cases.

Copy link
Contributor

@ilija-lazoroski ilija-lazoroski left a comment

Choose a reason for hiding this comment

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

LGTM, good job!

:param result: The result from the 'exploit_host' method
:param info: Information about the exploiter
:param attempts: Information about the exploiter's attempts
:param result: Data about the exploitation attempt (success status, info, attempts, etc)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We're using the word "attempt" in this comment to mean two different things.

@shreyamalviya shreyamalviya merged commit 96bd7bc into agent-refactor Feb 22, 2022
@shreyamalviya shreyamalviya deleted the 1605-modify-exploit-result-data branch February 22, 2022 15:08
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.

3 participants