diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 7e188b74d..e03296570 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -19,6 +19,7 @@ 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.ransomware import start_ransomware from infection_monkey.system_info import SystemInfoCollector from infection_monkey.system_singleton import SystemSingleton from infection_monkey.telemetry.attack.t1106_telem import T1106Telem @@ -232,6 +233,8 @@ class InfectionMonkey(object): if not self._keep_running: break + start_ransomware() + if (not is_empty) and (WormConfiguration.max_iterations > iteration_index + 1): time_to_sleep = WormConfiguration.timeout_between_iterations LOG.info("Sleeping %d seconds before next life cycle iteration", time_to_sleep) diff --git a/monkey/infection_monkey/ransomware/__init__.py b/monkey/infection_monkey/ransomware/__init__.py new file mode 100644 index 000000000..42bd69d20 --- /dev/null +++ b/monkey/infection_monkey/ransomware/__init__.py @@ -0,0 +1,10 @@ +import logging + +from infection_monkey.config import WormConfiguration + +LOG = logging.getLogger(__name__) + + +def start_ransomware(): + LOG.info(f"Windows dir configured for encryption is {WormConfiguration.windows_dir_ransom}") + LOG.info(f"Linux dir configured for encryption is {WormConfiguration.linux_dir_ransom}")