-
Notifications
You must be signed in to change notification settings - Fork 807
Closed
Labels
BugAn error, flaw, misbehavior or failure in the Monkey or Monkey Island.An error, flaw, misbehavior or failure in the Monkey or Monkey Island.Complexity: MediumImpact: HighPlugins
Milestone
Description
Describe the bug
get_agent_id()
is declared to be a global singleton. As a result, when plugins (which are running in different processes) call get_agent_id()
, they do not receive the "cached" value, but instead receive a new value. This means that all agents which are spawned by a plugin exploiter will have the wrong parent ID.
To Reproduce
Steps to reproduce the behavior:
- Configure the Monkey to exploit a hadoop machine
- Run the monkye
- Examine the agent log on the attacker's machine. Note the AgentID in the log.
- Examine the agent log on the victim's machine. Note that what is passed as the parent ID does not match the attacker's agent ID.
Expected behavior
The parent ID sent to child agents should match the ID of parent agents.
Machine version (please complete the following information):
- OS: Windows or Linux
Recommended Solution
The agent ID should be passed from monkey.py
down to any components that need it.
Tasks
- Pass the ID down to components that require it (0d) @cakekoa
- Pass the agent ID to
Heart.__init__()
- Pass the agent ID to network scanners
- Ping scanner
- TCP scanner
- Pass the agent ID to credentials collectors
- SSH
- Mimikatz
- Pass the agent ID to ransomware
- Pass the agent ID to the plugin registry
- Pass the agent ID to
- Pass agent ID to exploiters (0d) - @shreyamalviya
-
Construct plugins (PluginLoader) with the agent IDnot needed, all of this is handled in the plugin registry - Modify exploiters (and exploiter wrapper?) to accept the agent ID in their constructors
- Modify infection_monkey.utils.commands to receive agent ID as a parameter
- Pass AgentID as a parameter from all callers
-
- Simplify
get_agent_id()
(the caching is no longer necessary) (0.25d) @cakekoa
Metadata
Metadata
Assignees
Labels
BugAn error, flaw, misbehavior or failure in the Monkey or Monkey Island.An error, flaw, misbehavior or failure in the Monkey or Monkey Island.Complexity: MediumImpact: HighPlugins