From 137afa64737e1cee88bf29f7d23628fd476f0753 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 24 Nov 2021 13:46:18 -0500 Subject: [PATCH] Agent: Don't register new signal handler in monkey.py (for now) The signal handler is not quite ready for prime time. Issue #1595 and issue #1597 will need to be resolved before the signal handler can be fully ready. For now, don't register the signal handler. --- monkey/infection_monkey/monkey.py | 8 -------- vulture_allowlist.py | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 09eef703d..76bcbdf02 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -13,23 +13,18 @@ from common.version import get_version from infection_monkey.config import WormConfiguration from infection_monkey.control import ControlClient from infection_monkey.exploit.HostExploiter import HostExploiter -from infection_monkey.master.mock_master import MockMaster from infection_monkey.model import DELAY_DELETE_CMD from infection_monkey.network.firewall import app as firewall from infection_monkey.network.HostFinger import HostFinger from infection_monkey.network.network_scanner import NetworkScanner from infection_monkey.network.tools import get_interface_to_target, is_running_on_island from infection_monkey.post_breach.post_breach_handler import PostBreach -from infection_monkey.puppet.mock_puppet import MockPuppet from infection_monkey.ransomware.ransomware_payload_builder import build_ransomware_payload from infection_monkey.system_info import SystemInfoCollector from infection_monkey.system_singleton import SystemSingleton from infection_monkey.telemetry.attack.t1106_telem import T1106Telem from infection_monkey.telemetry.attack.t1107_telem import T1107Telem from infection_monkey.telemetry.attack.victim_host_telem import VictimHostTelem -from infection_monkey.telemetry.messengers.legacy_telemetry_messenger_adapter import ( - LegacyTelemetryMessengerAdapter, -) from infection_monkey.telemetry.scan_telem import ScanTelem from infection_monkey.telemetry.state_telem import StateTelem from infection_monkey.telemetry.system_info_telem import SystemInfoTelem @@ -43,7 +38,6 @@ from infection_monkey.utils.monkey_dir import ( remove_monkey_dir, ) from infection_monkey.utils.monkey_log_path import get_monkey_log_path -from infection_monkey.utils.signal_handler import register_signal_handlers from infection_monkey.windows_upgrader import WindowsUpgrader MAX_DEPTH_REACHED_MESSAGE = "Reached max depth, skipping propagation phase." @@ -113,8 +107,6 @@ class InfectionMonkey(object): logger.info("Monkey is starting...") logger.debug("Starting the setup phase.") - mock_master = MockMaster(MockPuppet(), LegacyTelemetryMessengerAdapter()) - register_signal_handlers(mock_master) # Sets island's IP and port for monkey to communicate to self.set_default_server() diff --git a/vulture_allowlist.py b/vulture_allowlist.py index 9ad0ccc68..20c130c33 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -213,3 +213,4 @@ ControlChannel should_agent_stop get_credentials_for_propagation MockMaster +register_signal_handlers