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

2261 move agent signals to common #2347

Merged

Conversation

ilija-lazoroski
Copy link
Contributor

What does this PR do?

Fixes part of #2261 .

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 the Monkey locally with relevant config/running Island/...}

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

@@ -36,7 +36,8 @@ def should_agent_stop(self) -> bool:
if not self._control_channel_server:
logger.error("Agent should stop because it can't connect to the C&C server.")
return True
return self._island_api_client.get_agent_signals(self._agent_id) is not None
agent_signals = self._island_api_client.get_agent_signals(self._agent_id)
return agent_signals.terminate is not None
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the agent do anything with the timestamp? Why send a timestamp if we're just using it as a bool?

Copy link
Collaborator

Choose a reason for hiding this comment

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

For now the agent doesn't use it. We may in the future. For example, we can set a hard limit on how long we're willing to wait for the agent to shut down. The agent can compare current time to the signal time and decide whether or not to kill everything.

The other thing is that we don't want the Island to assume how the data will be used. The Island needs to know when a signal was sent so it makes that data available. We don't want the island to send a boolean because that's all the agent needs. The island should just make the data available.

@mssalvatore mssalvatore marked this pull request as ready for review September 23, 2022 16:11
@mssalvatore mssalvatore merged commit a950555 into 2261-refactor-manual-agent-logic Sep 23, 2022
@mssalvatore mssalvatore deleted the 2261-move-agent-signals-to-common branch September 23, 2022 16:26
mssalvatore added a commit that referenced this pull request Sep 23, 2022
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