guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.67k stars 785 forks source link

Map node shows running agent indefinitely #2493

Closed ilija-lazoroski closed 1 year ago

ilija-lazoroski commented 2 years ago

Describe the bug

If we configure the Agent to have 1 second of keep_tunnel_open_time, and the relay closes before the agent is able to send a shutdown signal, the map node shows a running agent.

To Reproduce

Steps to reproduce the behavior:

  1. Configure the Island to run Depth_4 test
  2. Configure keep_tunnel_open_time to be one second
  3. See map for a frozen running node
  4. Check the machine and confirm the agent has actually stopped

Expected behavior

The map node should be marked as dead but without a relay and shutdown signal, we can't really do it.

Possible solution

Fix the description in the UI about the keep_tunnel_open_time and add a minimum value that will not cause this issue.

Screenshots

Map after 15 minutes of waiting:

image

Agent tunneling-10 log: infection-monkey-agent-2022-10-26-10-07-30-vkl00k8g.log

Machine version (please complete the following information):

mssalvatore commented 2 years ago

This should be resolved by a combination of c88476011 and #2518.

shreyamalviya commented 1 year ago

Doesn't show any running agents now image